CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Read parallel meshes

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By A_Pete

LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2014, 04:44
Default Read parallel meshes
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 14
dl6tud is on a distinguished road
I would like to read the meshes of all processors when computing in parallel. The idea is to have all meshes on each processor.

I create a "Time-Object" for each processor as

PtrList<Time> time(Pstream::nProcs());

forAll(time, procI)
new Time
args.globalCaseName()/fileName(word("processor") + name(procI))
Then, I create the meshes with
PtrList<fvMesh> pMesh(Pstream::nProcs());
forAll(pMesh, procI)
new fvMesh
The second step fails with

Message from processor 0 not fully consumed. messageSize:20620 bytes of which only 0 consumed.
At the moment I have no idea, why OF tries to communicate with the other processors when reading the meshes. Maybe for the boundaries?
dl6tud is offline   Reply With Quote

Old   March 5, 2014, 13:04
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,901
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough

Yes, the processor boundaries exchange information, so what you are trying to do will most probably not work.

May I ask, why you need all the meshes on every processor?

Kind regards,

Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   March 7, 2014, 03:45
Join Date: Jul 2011
Posts: 54
Rep Power: 14
A_Pete is on a distinguished road

what about using gather and scatter? Not sure what you exactly want to do with the mesh, but you could use gatherList.

//- Get local mesh on processor
fvMesh mesh(refCast<const fvMesh>(obr_));

//- Gather the meshes into PtrList on master processor
PtrList<fvMesh> pMesh(Pstream::nProcs());
pMesh[Pstream::myProcNo()] = mesh;
Depending on what you want to do afterwards, you could either use scatterList or put the mesh together again from the pMesh and then scatter just this fvMesh.
Behradskn likes this.
A_Pete is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 08:46
Case running in serial, but Parallel run gives error atmcfd OpenFOAM Running, Solving & CFD 18 March 26, 2016 12:40
How to setup a simple OpenFOAM cluster? TommiPLaiho OpenFOAM Installation 3 October 27, 2013 15:15
[Other] Creating large meshes (>10,000,00) in parallel fontania OpenFOAM Meshing & Mesh Conversion 4 April 16, 2012 16:14
Fluent parallel poovanna FLUENT 0 March 23, 2007 23:22

All times are GMT -4. The time now is 15:48.