WENO-OF / WENOEXT

Weighted essentially non-oscillatory library for the framework of OpenFOAM
GNU General Public License v3.0
119 stars 64 forks source link

Collated File I/O #26

Closed JanGaertner closed 3 years ago

JanGaertner commented 3 years ago

When the collated file I/O of OpenFOAM is used the WENO scheme gets stuck when it reconstructs the global mesh. The reason for this is found in two locations of which one can be fixed.

Using File Handler for Boundary Patch Stream

The file handler is used to get the file stream for the boundary patch pointers. This causes a problem as the collated file handler will be applied causing the mpi to get stuck. This can be easily solved by using readHeader() first and then readList.

Constructing the PolyMesh

When the polyMesh is constructed each constructor calls Foam::polyMesh::readTetBasePtIs(). Within this function the Foam::IOobject::typeHeaderOk() function is called to check the file header which in return calls the general function typeFilePath() defined in IOObject. This calls the Foam::IOobject::localFilePath() which uses the file handler.

In the file handler the filePath() function is either implemented in Foam::fileOperations::masterUncollatedFileOperation::filePath() or Foam::fileOperations::uncollatedFileOperation::filePath(). If the collated file I/O option is chosen the masterUncollatedFileOperations path is chosen and within this function the masterOp<>() function is called which then causes the MPI to get stuck as a gatherList is called. The MPI gets stuck as not all processors are calling this function, caused by each processor reconstructing only a part of the mesh and not the global mesh.