ENH: handle try-construct faMesh (#2399)
- a try/catch approach is not really robust enough (or even possible) since read failures likely do not occur on all ranks simultaneously. This leads to situations where the master has thrown an exception (and thus exiting the current routine) while other ranks are still waiting to receive data and the program blocks completely. Since this primarily affects data conversion routines such as foamToEnsight etc, treat similarly to lagrangian: check for the existence of essential files before proceeding or not. This is wrapped into a TryNew factory method: autoPtr<faMesh> faMeshPtr(faMesh::TryNew(mesh)); if (faMeshPtr) ...
Showing
- applications/utilities/postProcessing/dataConversion/foamToEnsight/createMeshAccounting.H 3 additions, 14 deletions...ssing/dataConversion/foamToEnsight/createMeshAccounting.H
- applications/utilities/postProcessing/dataConversion/foamToVTK/convertAreaFields.H 2 additions, 11 deletions...stProcessing/dataConversion/foamToVTK/convertAreaFields.H
- src/finiteArea/Make/files 1 addition, 0 deletionssrc/finiteArea/Make/files
- src/finiteArea/faMesh/faMesh.H 17 additions, 2 deletionssrc/finiteArea/faMesh/faMesh.H
- src/finiteArea/faMesh/faMeshNew.C 157 additions, 0 deletionssrc/finiteArea/faMesh/faMeshNew.C
Please register or sign in to comment