CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   how does mpirun read in the processorN directory contents? (

LauraSumner March 14, 2017 09:06

how does mpirun read in the processorN directory contents?
I am trying to solve a problem which requires me to know the first set of coordinates located in the "points" file within each processor directory after I decompose my field.

I am trying to find the place where OpenFOAM accesses this information. Does anyone know in which file this occurs when the mpirun is operated in parallel?

I know that polyMesh accesses this information, but I need to be able to distinguish which part of my geometry the solver is working on.

Hope this makes sense!


deepsterblue March 14, 2017 09:21

Hello Laura,

Try this:
const point& procPoint = mesh.points()[0];

Pout << "First point: " << procPoint << endl;

Where "mesh" is the appropriate polyMesh / fvMesh at the top level of your solver. This should give you the processor and first coordinate for each. This also assumes that each processor has at least one point on it, but that's easy to check before-hand.

LauraSumner March 14, 2017 09:31

Hi Sandeep,

Thanks! That was exactly what I needed! :)


All times are GMT -4. The time now is 03:39.