From f7f9add56c1660b470df276ca028b4296f922a16 Mon Sep 17 00:00:00 2001 From: Ryan Aronson Date: Mon, 12 Aug 2024 19:17:20 +0200 Subject: [PATCH] Changing GEOSX to GEOS in external mesh import --- .../Class09Pb3/class09_pb3_benchmark.xml | 2 +- .../Class09Pb3/class09_pb3_benchmark_mc.xml | 2 +- .../Class09Pb3/class09_pb3_benchmark_mct.xml | 2 +- .../Egg/deadOilEggVTK_benchmark.xml | 2 +- .../benchmarks/Egg/deadOilEgg_benchmark.xml | 2 +- .../staircase_co2_wells_hybrid_3d.xml | 2 +- .../PoroElastic_hybridHexPrism_co2_base.xml | 2 +- .../smallEggModel/smallEggModel.xml | 2 +- .../PoroElastic_efem-edfm_eggModel_large.xml | 2 +- .../PoroElastic_efem-edfm_eggModel_small.xml | 2 +- .../verticalFault_ExternalMesh.vtm | 2 +- .../singlePhaseFlow/incompressible_pebi3d.xml | 2 +- ...moPoroElastic_efem-edfm_eggModel_small.xml | 2 +- .../generators/ExternalMeshGeneratorBase.cpp | 20 +++++++++---------- .../generators/ExternalMeshGeneratorBase.hpp | 16 +++++++-------- .../mesh/generators/MeshGeneratorBase.hpp | 8 ++++---- src/coreComponents/schema/docs/VTKMesh.rst | 4 ++-- 17 files changed, 37 insertions(+), 37 deletions(-) diff --git a/inputFiles/compositionalMultiphaseWell/benchmarks/Class09Pb3/class09_pb3_benchmark.xml b/inputFiles/compositionalMultiphaseWell/benchmarks/Class09Pb3/class09_pb3_benchmark.xml index d0c07591e87..dbc28b749b6 100644 --- a/inputFiles/compositionalMultiphaseWell/benchmarks/Class09Pb3/class09_pb3_benchmark.xml +++ b/inputFiles/compositionalMultiphaseWell/benchmarks/Class09Pb3/class09_pb3_benchmark.xml @@ -16,7 +16,7 @@ logLevel="5" file="../../../../../GEOSDATA/DataSets/Class09_p3/Johansen_faces.vtu" fieldsToImport="{ perm, poro }" - fieldNamesInGEOSX="{ rockPerm_permeability, rockPorosity_referencePorosity }" > + fieldNamesInGEOS="{ rockPerm_permeability, rockPorosity_referencePorosity }" > + fieldNamesInGEOS="{ rockPerm_permeability, rockPorosity_referencePorosity }" > + fieldNamesInGEOS="{ rockPerm_permeability, rockPorosity_referencePorosity }" > + fieldNamesInGEOS="{ rockPerm_permeability }"> + fieldNamesInGEOS="{ rockPerm_permeability }"> diff --git a/inputFiles/poromechanics/PoroElastic_hybridHexPrism_co2_base.xml b/inputFiles/poromechanics/PoroElastic_hybridHexPrism_co2_base.xml index 865a4850f1a..26c4b973932 100644 --- a/inputFiles/poromechanics/PoroElastic_hybridHexPrism_co2_base.xml +++ b/inputFiles/poromechanics/PoroElastic_hybridHexPrism_co2_base.xml @@ -10,7 +10,7 @@ partitionMethod="ptscotch" scale="{ 50, 50, 50 }" fieldsToImport="{ PORO, NTG, DENSITY, BULKMOD }" - fieldNamesInGEOSX="{ rockPorosity_referencePorosity, netToGross, skeleton_density, skeleton_bulkModulus }" + fieldNamesInGEOS="{ rockPorosity_referencePorosity, netToGross, skeleton_density, skeleton_bulkModulus }" file="../singlePhaseFlow/pebi3d_with_properties.vtu"/> diff --git a/inputFiles/poromechanics/nonlinearAcceleration/smallEggModel/smallEggModel.xml b/inputFiles/poromechanics/nonlinearAcceleration/smallEggModel/smallEggModel.xml index caf219bb716..0ab2e1e9527 100755 --- a/inputFiles/poromechanics/nonlinearAcceleration/smallEggModel/smallEggModel.xml +++ b/inputFiles/poromechanics/nonlinearAcceleration/smallEggModel/smallEggModel.xml @@ -69,7 +69,7 @@ file="../../../GEOSDATA/DataSets/Egg/egg_withBurdens_small.vts" regionAttribute="elementRegionMarker" fieldsToImport="{ PERM }" - fieldNamesInGEOSX="{ rockPermeability_permeability }"/> + fieldNamesInGEOS="{ rockPermeability_permeability }"/> diff --git a/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_large.xml b/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_large.xml index 20566c84bac..506201fab18 100644 --- a/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_large.xml +++ b/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_large.xml @@ -63,7 +63,7 @@ file="../../../GEOSDATA/DataSets/Egg/egg_withBurdens_large.vts" regionAttribute="regionAttribute" fieldsToImport="{ PERM }" - fieldNamesInGEOSX="{ rockPermeability_permeability }"/> + fieldNamesInGEOS="{ rockPermeability_permeability }"/> diff --git a/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_small.xml b/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_small.xml index 074d11adb4e..3a8e2c869ad 100644 --- a/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_small.xml +++ b/inputFiles/poromechanicsFractures/PoroElastic_efem-edfm_eggModel_small.xml @@ -63,7 +63,7 @@ file="../../../GEOSDATA/DataSets/Egg/egg_withBurdens_small.vts" regionAttribute="elementRegionMarker" fieldsToImport="{ PERM }" - fieldNamesInGEOSX="{ rockPermeability_permeability }"/> + fieldNamesInGEOS="{ rockPermeability_permeability }"/> diff --git a/inputFiles/poromechanicsFractures/verticalFault_ExternalMesh.vtm b/inputFiles/poromechanicsFractures/verticalFault_ExternalMesh.vtm index 14785b5f2ab..abb0265a6ca 100644 --- a/inputFiles/poromechanicsFractures/verticalFault_ExternalMesh.vtm +++ b/inputFiles/poromechanicsFractures/verticalFault_ExternalMesh.vtm @@ -5,7 +5,7 @@ name="main" file="Domain_Mesh_FaultModel.vtu" fieldsToImport="{ YoungModulus, PoissonRatio }" - fieldNamesInGEOSX="{ rock_youngModulus, rock_poissonRatio }" + fieldNamesInGEOS="{ rock_youngModulus, rock_poissonRatio }" /> diff --git a/inputFiles/thermoPoromechanicsFractures/ThermoPoroElastic_efem-edfm_eggModel_small.xml b/inputFiles/thermoPoromechanicsFractures/ThermoPoroElastic_efem-edfm_eggModel_small.xml index d2b84ef7de2..7b3d9723f66 100644 --- a/inputFiles/thermoPoromechanicsFractures/ThermoPoroElastic_efem-edfm_eggModel_small.xml +++ b/inputFiles/thermoPoromechanicsFractures/ThermoPoroElastic_efem-edfm_eggModel_small.xml @@ -66,7 +66,7 @@ file="../../../GEOSDATA/DataSets/Egg/egg_withBurdens_small.vts" regionAttribute="elementRegionMarker" fieldsToImport="{ PERM }" - fieldNamesInGEOSX="{ rockPermeability_permeability }"/> + fieldNamesInGEOS="{ rockPermeability_permeability }"/> diff --git a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp index b28cbdd405b..2392a89874b 100644 --- a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp +++ b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp @@ -46,20 +46,20 @@ ExternalMeshGeneratorBase::ExternalMeshGeneratorBase( string const & name, setInputFlag( InputFlags::OPTIONAL ). setDescription( "Volumic fields to be imported from the external mesh file" ); - registerWrapper( viewKeyStruct::volumicFieldsInGEOSXString(), &m_volumicFieldsInGEOSX ). + registerWrapper( viewKeyStruct::volumicFieldsInGEOSString(), &m_volumicFieldsInGEOS ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). setInputFlag( InputFlags::OPTIONAL ). - setDescription( "Names of the volumic fields in GEOSX to import into" ); + setDescription( "Names of the volumic fields in GEOS to import into" ); registerWrapper( viewKeyStruct::surfacicFieldsToImportString(), &m_surfacicFieldsToImport ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Surfacic fields to be imported from the external mesh file" ); - registerWrapper( viewKeyStruct::surfacicFieldsInGEOSXString(), &m_surfacicFieldsInGEOSX ). + registerWrapper( viewKeyStruct::surfacicFieldsInGEOSString(), &m_surfacicFieldsInGEOS ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). setInputFlag( InputFlags::OPTIONAL ). - setDescription( "Names of the surfacic fields in GEOSX to import into" ); + setDescription( "Names of the surfacic fields in GEOS to import into" ); } void ExternalMeshGeneratorBase::postInputInitialization() @@ -73,8 +73,8 @@ void ExternalMeshGeneratorBase::postInputInitialization() " must contain the same number of values.", InputError ); }; - checkSizes( m_volumicFieldsToImport, m_volumicFieldsInGEOSX, viewKeyStruct::volumicFieldsToImportString(), viewKeyStruct::volumicFieldsInGEOSXString() ); - checkSizes( m_surfacicFieldsToImport, m_surfacicFieldsInGEOSX, viewKeyStruct::surfacicFieldsToImportString(), viewKeyStruct::surfacicFieldsInGEOSXString() ); + checkSizes( m_volumicFieldsToImport, m_volumicFieldsInGEOS, viewKeyStruct::volumicFieldsToImportString(), viewKeyStruct::volumicFieldsInGEOSString() ); + checkSizes( m_surfacicFieldsToImport, m_surfacicFieldsInGEOS, viewKeyStruct::surfacicFieldsToImportString(), viewKeyStruct::surfacicFieldsInGEOSString() ); auto const checkDuplicates = [this]( arrayView1d< string const > v, string const & key ) { @@ -86,8 +86,8 @@ void ExternalMeshGeneratorBase::postInputInitialization() "' already present in list of fields to import.", InputError ); }; - checkDuplicates( m_volumicFieldsInGEOSX, viewKeyStruct::volumicFieldsInGEOSXString() ); - checkDuplicates( m_surfacicFieldsInGEOSX, viewKeyStruct::surfacicFieldsInGEOSXString() ); + checkDuplicates( m_volumicFieldsInGEOS, viewKeyStruct::volumicFieldsInGEOSString() ); + checkDuplicates( m_surfacicFieldsInGEOS, viewKeyStruct::surfacicFieldsInGEOSString() ); // Building the fields mapping from the two separated input/output vectors. auto const buildMapping = [&]( arrayView1d< string const > from, @@ -101,8 +101,8 @@ void ExternalMeshGeneratorBase::postInputInitialization() return mapping; }; - MeshGeneratorBase::m_volumicFields = buildMapping( m_volumicFieldsToImport.toViewConst(), m_volumicFieldsInGEOSX.toViewConst() ); - MeshGeneratorBase::m_surfacicFields = buildMapping( m_surfacicFieldsToImport.toViewConst(), m_surfacicFieldsInGEOSX.toViewConst() ); + MeshGeneratorBase::m_volumicFields = buildMapping( m_volumicFieldsToImport.toViewConst(), m_volumicFieldsInGEOS.toViewConst() ); + MeshGeneratorBase::m_surfacicFields = buildMapping( m_surfacicFieldsToImport.toViewConst(), m_surfacicFieldsInGEOS.toViewConst() ); } } // namespace geos diff --git a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.hpp b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.hpp index fe918574461..84ccc63eb69 100644 --- a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.hpp +++ b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.hpp @@ -49,9 +49,9 @@ class ExternalMeshGeneratorBase : public MeshGeneratorBase constexpr static char const * scaleString() { return "scale"; } constexpr static char const * translateString() { return "translate"; } constexpr static char const * volumicFieldsToImportString() { return "fieldsToImport"; } - constexpr static char const * volumicFieldsInGEOSXString() { return "fieldNamesInGEOSX"; } + constexpr static char const * volumicFieldsInGEOSString() { return "fieldNamesInGEOS"; } constexpr static char const * surfacicFieldsToImportString() { return "surfacicFieldsToImport"; } - constexpr static char const * surfacicFieldsInGEOSXString() { return "surfacicFieldsInGEOSX"; } + constexpr static char const * surfacicFieldsInGEOSString() { return "surfacicFieldsInGEOS"; } }; /// @endcond @@ -66,17 +66,17 @@ class ExternalMeshGeneratorBase : public MeshGeneratorBase /// Scale factor that will be applied to the point coordinates (after translation) R1Tensor m_scale; - /// Names of the fields to be copied from an external reader into GEOSX data structure + /// Names of the fields to be copied from an external reader into GEOS data structure array1d< string > m_volumicFieldsToImport; - /// String array of the GEOSX user declared volumic fields - array1d< string > m_volumicFieldsInGEOSX; + /// String array of the GEOS user declared volumic fields + array1d< string > m_volumicFieldsInGEOS; - /// Names of the surfacic fields to be copied from an external reader into GEOSX data structure + /// Names of the surfacic fields to be copied from an external reader into GEOS data structure array1d< string > m_surfacicFieldsToImport; - /// String array of the GEOSX user declared surfacic fields - array1d< string > m_surfacicFieldsInGEOSX; + /// String array of the GEOS user declared surfacic fields + array1d< string > m_surfacicFieldsInGEOS; }; } // namespace geos diff --git a/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp b/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp index b7f8fbf2e2b..2c802fb332d 100644 --- a/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp +++ b/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp @@ -114,22 +114,22 @@ class MeshGeneratorBase : public dataRepository::Group virtual void freeResources() {} /** - * @brief Get the name mapping between mesh volumic field names and internal GEOSX volumic field names. + * @brief Get the name mapping between mesh volumic field names and internal GEOS volumic field names. * @return The string to string mapping of field names. */ std::map< string, string > const & getVolumicFieldsMapping() const { return m_volumicFields; } /** - * @brief Get the name mapping between mesh surfacic field names and internal GEOSX surfacic field names. + * @brief Get the name mapping between mesh surfacic field names and internal GEOS surfacic field names. * @return The string to string mapping of field names. */ std::map< string, string > const & getSurfacicFieldsMapping() const { return m_surfacicFields; } protected: - /// Mapping from volumic field source to GEOSX field. + /// Mapping from volumic field source to GEOS field. std::map< string, string > m_volumicFields; - /// Mapping from surfacic field source to GEOSX field. + /// Mapping from surfacic field source to GEOS field. std::map< string, string > m_surfacicFields; private: diff --git a/src/coreComponents/schema/docs/VTKMesh.rst b/src/coreComponents/schema/docs/VTKMesh.rst index 688b0d98319..3c6616c3087 100644 --- a/src/coreComponents/schema/docs/VTKMesh.rst +++ b/src/coreComponents/schema/docs/VTKMesh.rst @@ -4,7 +4,7 @@ Name Type Default Description ====================== ======================== ========= ============================================================================================================================================================================================================================================================================================================================================================================================================================================================================ faceBlocks groupNameRef_array {} For multi-block files, names of the face mesh block. -fieldNamesInGEOSX groupNameRef_array {} Names of the volumic fields in GEOSX to import into +fieldNamesInGEOS groupNameRef_array {} Names of the volumic fields in GEOS to import into fieldsToImport groupNameRef_array {} Volumic fields to be imported from the external mesh file file path required Path to the mesh file logLevel integer 0 Log level @@ -15,7 +15,7 @@ partitionMethod geos_vtk_PartitionMethod parmetis Method (library) used partitionRefinement integer 1 Number of partitioning refinement iterations (defaults to 1, recommended value).A value of 0 disables graph partitioning and keeps simple kd-tree partitions (not recommended). Values higher than 1 may lead to slightly improved partitioning, but yield diminishing returns. regionAttribute groupNameRef attribute Name of the VTK cell attribute to use as region marker scale R1Tensor {1,1,1} Scale the coordinates of the vertices by given scale factors (after translation) -surfacicFieldsInGEOSX groupNameRef_array {} Names of the surfacic fields in GEOSX to import into +surfacicFieldsInGEOS groupNameRef_array {} Names of the surfacic fields in GEOS to import into surfacicFieldsToImport groupNameRef_array {} Surfacic fields to be imported from the external mesh file translate R1Tensor {0,0,0} Translate the coordinates of the vertices by a given vector (prior to scaling) useGlobalIds integer 0 Controls the use of global IDs in the input file for cells and points. If set to 0 (default value), the GlobalId arrays in the input mesh are used if available, and generated otherwise. If set to a negative value, the GlobalId arrays in the input mesh are not used, and generated global Ids are automatically generated. If set to a positive value, the GlobalId arrays in the input mesh are used and required, and the simulation aborts if they are not available