Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,30 @@ using namespace geos::dataRepository;


template< class V >
void TestMeshImport( string const & meshFilePath, V const & validate, string const fractureName="" )
void TestMeshImport( string const & meshFilePath, V const & validate, string const fractureName="", string const scatterMethod="" )
{
// Automatically use global IDs when fractures are present
string const useGlobalIdsStr = fractureName.empty() ? "0" : "1";

string scatterAttr;
if( !scatterMethod.empty() )
{
scatterAttr = GEOS_FMT( "scatterMethod=\"{}\"", scatterMethod );
}

string const pattern = R"xml(
<Mesh>
<VTKMesh
name="mesh"
file="{}"
partitionRefinement="0"
useGlobalIds="{}"
{}
{} />
</Mesh>
)xml";
string const meshNode = GEOS_FMT( pattern, meshFilePath, useGlobalIdsStr,
scatterAttr,
fractureName.empty() ? "" : "faceBlocks=\"{" + fractureName + "}\"" );

xmlWrapper::xmlDocument xmlDocument;
Expand Down
6 changes: 6 additions & 0 deletions src/coreComponents/mesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ if( ENABLE_VTK )
generators/VTKHierarchicalDataSource.hpp
generators/VTKMeshGenerator.hpp
generators/VTKMeshGeneratorTools.hpp
generators/VTKMeshScattering.hpp
generators/VTKWellGenerator.hpp
generators/VTKSuperCellPartitioning.hpp
generators/VTKUtilities.hpp
Expand All @@ -224,6 +225,7 @@ if( ENABLE_VTK )
generators/VTKHierarchicalDataSource.cpp
generators/VTKMeshGenerator.cpp
generators/VTKMeshGeneratorTools.cpp
generators/VTKMeshScattering.cpp
generators/VTKWellGenerator.cpp
generators/VTKSuperCellPartitioning.cpp
generators/VTKUtilities.cpp
Expand Down Expand Up @@ -270,3 +272,7 @@ if( GEOS_ENABLE_TESTS )
add_subdirectory( unitTests )
endif( )

# Add benchmarks subdirectory
if( ENABLE_VTK )
add_subdirectory( benchmarks )
endif()
15 changes: 15 additions & 0 deletions src/coreComponents/mesh/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Mesh benchmarks
#

set( dependencyList mesh ${parallelDeps} ${tplDependencyList} )

blt_add_executable(
NAME benchmarkScatterMethods
SOURCES benchmarkScatterMethods.cpp
OUTPUT_DIR ${BENCHMARK_OUTPUT_DIRECTORY}
DEPENDS_ON ${dependencyList}
FOLDER coreComponents/mesh/benchmarks
)

install(TARGETS benchmarkScatterMethods DESTINATION ${CMAKE_INSTALL_PREFIX}/benchmarks)
Loading
Loading