33 if (mpi->
rank == rank) {
35 out = fopen(filename,
"w");
37 fprintf(stderr,
"Error in IBWriteBodySTL(): Unable to open file ");
38 fprintf(stderr,
"%s for writing on rank %d.\n",filename,mpi->
rank);
41 fprintf(out,
"solid TEST\n");
43 for (n = 0; n < body->
nfacets; n++) {
44 fprintf(out,
" facet normal %1.16e %1.16e %1.16e\n",
46 fprintf(out,
" outer loop\n");
47 fprintf(out,
" vertex %1.16e %1.16e %1.16e\n",
49 fprintf(out,
" vertex %1.16e %1.16e %1.16e\n",
51 fprintf(out,
" vertex %1.16e %1.16e %1.16e\n",
53 fprintf(out,
" endloop\n");
54 fprintf(out,
" endfacet\n");
56 fprintf(out,
"endsolid TEST\n");
Structure defining a body.
MPI related function definitions.
Some basic definitions and macros.
int IBWriteBodySTL(Body3D *body, char *filename, void *m, int rank, int *stat)
Structures and function definitions for immersed boundaries.
Structure of MPI-related variables.