Merge 3D mpi versions

This commit is contained in:
2024-01-31 17:40:36 +01:00
parent d53da89b95
commit 91cbb29f6e
52 changed files with 149 additions and 2344 deletions

View File

@@ -1,11 +1,9 @@
/*
* Copyright (C) 2024 NHR@FAU, University Erlangen-Nuremberg.
* Copyright (C) NHR@FAU, University Erlangen-Nuremberg.
* All rights reserved.
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file.
*/
#include <float.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -73,6 +71,13 @@ int main(int argc, char** argv)
printf("Solution took %.2fs\n", timeStop - timeStart);
}
#ifdef _VTK_WRITER_MPI
VtkOptions opts = { .grid = s.grid, .comm = s.comm };
vtkOpen(&opts, s.problem);
vtkScalar(&opts, "pressure", s.p);
vtkVector(&opts, "velocity", (VtkVector) { s.u, s.v, s.w });
vtkClose(&opts);
#else
double *pg, *ug, *vg, *wg;
if (commIsMaster(&s.comm)) {
@@ -104,6 +109,7 @@ int main(int argc, char** argv)
vtkVector(&opts, "velocity", (VtkVector) { ug, vg, wg });
vtkClose(&opts);
}
#endif
commFinalize(&s.comm);
return EXIT_SUCCESS;