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/)
-   -   loop over mesh points in parallel run (https://www.cfd-online.com/Forums/openfoam-programming-development/195013-loop-over-mesh-points-parallel-run.html)

nimasam October 29, 2017 10:10

loop over mesh points in parallel run
 
i would like to change the mesh points based on a function during run, the algorithm works fine in serial, but for parallel run, mesh.points() only returns the position of points in one processor. do you have any ideas, how to access to each processors mesh data?

Jibran October 30, 2017 04:33

Quote:

Originally Posted by nimasam (Post 669611)
i would like to change the mesh points based on a function during run, the algorithm works fine in serial, but for parallel run, mesh.points() only returns the position of points in one processor. do you have any ideas, how to access to each processors mesh data?

Hi,

You can use the globalMeshData class to get this information. Specifically, I would recommend to have a look at the volPointInterpolation class where the member functions syncUntransformedData() and pushUntransformedData() use this information.


All times are GMT -4. The time now is 11:02.