Skip to content
Snippets Groups Projects

[gridcreator] Fix gmsh grids for parallel alugrid runs

Merged Timo Koch requested to merge feature/dune-alugrid-gmsh-parallel into master
1 file
+ 18
2
Compare changes
  • Side-by-side
  • Inline
+ 18
2
@@ -254,11 +254,27 @@ protected:
if(domainMarkers)
{
enableGmshDomainMarkers_ = true;
gridPtr() = std::shared_ptr<Grid>(Dune::GmshReader<Grid>::read(fileName, boundaryMarkers_, elementMarkers_, verbose, boundarySegments));
if (Dune::MPIHelper::getCollectiveCommunication().rank() == 0)
{
gridPtr() = std::shared_ptr<Grid>(Dune::GmshReader<Grid>::read(fileName, boundaryMarkers_, elementMarkers_, verbose, boundarySegments));
}
else
{
Dune::GridFactory<Grid> factory;
gridPtr() = std::shared_ptr<Grid>(factory.createGrid());
}
}
else
{
gridPtr() = std::shared_ptr<Grid>(Dune::GmshReader<Grid>::read(fileName, verbose, boundarySegments));
if (Dune::MPIHelper::getCollectiveCommunication().rank() == 0)
{
gridPtr() = std::shared_ptr<Grid>(Dune::GmshReader<Grid>::read(fileName, verbose, boundarySegments));
}
else
{
Dune::GridFactory<Grid> factory;
gridPtr() = std::shared_ptr<Grid>(factory.createGrid());
}
}
}
}
Loading