Skip to content

Commit

Permalink
Disable generation of globalIDs in GEOS for fracture meshes (#3200)
Browse files Browse the repository at this point in the history
* disable generation of globalIDs in GEOS for fracture meshes

---------

Co-authored-by: Matteo Cusini <[email protected]>
Co-authored-by: TotoGaz <[email protected]>
  • Loading branch information
3 people authored and Algiane committed Jul 30, 2024
1 parent 9b95aca commit df77ead
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/coreComponents/mesh/ElementType.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ ENUM_STRINGS( ElementType,

/// String available for mesh errors
inline auto constexpr generalMeshErrorAdvice = "Consider checking the validity of your mesh with "
"the `mesh_doctor` GEOS python tools (documentation at"
"the `mesh_doctor` GEOS python tools (documentation at "
"https://geosx-geosx.readthedocs-hosted.com/en/latest/docs/sphinx/pythonTools/mesh_doctor.html).";

} // namespace geos
Expand Down
6 changes: 4 additions & 2 deletions src/coreComponents/mesh/generators/VTKUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ findNeighborRanks( std::vector< vtkBoundingBox > boundingBoxes )
}


vtkSmartPointer< vtkDataSet > manageGlobalIds( vtkSmartPointer< vtkDataSet > mesh, int useGlobalIds )
vtkSmartPointer< vtkDataSet > manageGlobalIds( vtkSmartPointer< vtkDataSet > mesh, int useGlobalIds, bool isFractured )
{
auto hasGlobalIds = []( vtkSmartPointer< vtkDataSet > m ) -> bool
{
Expand Down Expand Up @@ -776,6 +776,8 @@ vtkSmartPointer< vtkDataSet > manageGlobalIds( vtkSmartPointer< vtkDataSet > mes
}
else
{
GEOS_ERROR_IF( isFractured, "Automatic generation of global IDs for fractured meshes is disabled. Please split with mesh_doctor. \n" << generalMeshErrorAdvice );

GEOS_LOG_RANK_0( "Generating global Ids from VTK mesh" );
output = generateGlobalIDs( mesh );
}
Expand Down Expand Up @@ -910,7 +912,7 @@ redistributeMeshes( integer const logLevel,
}

// Generate global IDs for vertices and cells, if needed
vtkSmartPointer< vtkDataSet > mesh = manageGlobalIds( loadedMesh, useGlobalIds );
vtkSmartPointer< vtkDataSet > mesh = manageGlobalIds( loadedMesh, useGlobalIds, !std::empty( fractures ) );

if( MpiWrapper::commRank( comm ) != ( MpiWrapper::commSize( comm ) - 1 ) )
{
Expand Down

0 comments on commit df77ead

Please sign in to comment.