CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Size of sub-meshes during a parallel run (https://www.cfd-online.com/Forums/openfoam-programming-development/127058-size-sub-meshes-during-parallel-run.html)

Sylv December 2, 2013 11:29

Size of sub-meshes during a parallel run
 
Dear Foamer,

During the parallel run of any OpenFOAM solver (pimpleFoam in my case), each processor has its own sub-mesh (stored in case/porcessorX/constant), which is a part of the global mesh. Moreover, each processor has no idea about the sub-meshes stored in the other processor.

How can I get the list of the cellCenter or the faceCenter of each sub-meshes? For example, I tried with mesh().C(), but the output size is the same for all sub-meshes, which is not possible (the scotch decomposition never gives sub-meshes with *exactly* the same size...). Here is a piece of code I added after the line #include "createMesh.H":
Code:

#include "createMesh.H"

Pout << "nb of cell center in processor"<< Pstream::myProcNo() << " = " << mesh.C().size() << endl;

And the output is the following (parallel run on 2 cpus):
Code:

[1] nb of cell center in processor1 = 1011456
[0] nb of cell center in processor0 = 1011456

Any ideas?

Cheers,
Marcel


All times are GMT -4. The time now is 13:30.