Skip to content
  • Mark OLESEN's avatar
    730ce92b
    ENH: handle try-construct faMesh (#2399) · 730ce92b
    Mark OLESEN authored
    - 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) ...
    730ce92b
    ENH: handle try-construct faMesh (#2399)
    Mark OLESEN authored
    - 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) ...
Loading