From f72a0491dff849fb907bbc981502813419ce84a3 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 7 Aug 2025 15:36:56 +0200 Subject: [PATCH 1/3] first pass appling stdMap --- .../codingUtilities/RTTypes.hpp | 2 +- .../codingUtilities/tests/testGeosxTraits.cpp | 14 ++++---- .../codingUtilities/tests/testUtilities.cpp | 2 +- src/coreComponents/common/MpiWrapper.hpp | 12 +++---- .../common/StdContainerWrappers.hpp | 10 +++--- .../common/format/table/TableData.hpp | 2 +- .../common/format/table/TableFormatter.cpp | 2 +- .../dataRepository/LogLevelsRegistry.hpp | 2 +- .../FieldSpecificationManager.cpp | 2 +- src/coreComponents/fileIO/silo/SiloFile.cpp | 2 +- .../fileIO/vtk/VTKPolyDataWriterInterface.hpp | 2 +- .../TwoPointFluxApproximation.cpp | 2 +- .../linearAlgebra/DofManager.cpp | 4 +-- .../linearAlgebra/DofManager.hpp | 2 +- .../interfaces/direct/SuperLUDist.cpp | 4 +-- .../interfaces/petsc/PetscPreconditioner.cpp | 2 +- .../trilinos/TrilinosPreconditioner.cpp | 12 +++---- .../mesh/CellElementRegionSelector.cpp | 2 +- .../mesh/CellElementRegionSelector.hpp | 8 ++--- .../mesh/FaceElementSubRegion.cpp | 34 +++++++++---------- src/coreComponents/mesh/FieldIdentifiers.hpp | 6 ++-- src/coreComponents/mesh/MeshManager.cpp | 2 +- src/coreComponents/mesh/MeshManager.hpp | 2 +- src/coreComponents/mesh/MeshObjectPath.cpp | 6 ++-- src/coreComponents/mesh/MeshObjectPath.hpp | 10 +++--- .../mesh/generators/CellBlockManager.cpp | 4 +-- .../mesh/generators/CellBlockManager.hpp | 10 +++--- .../mesh/generators/CellBlockManagerABC.hpp | 4 +-- .../generators/ExternalMeshGeneratorBase.cpp | 4 +-- .../mesh/generators/InternalMeshGenerator.cpp | 6 ++-- .../mesh/generators/InternalMeshGenerator.hpp | 2 +- .../generators/InternalWellboreGenerator.cpp | 2 +- .../generators/InternalWellboreGenerator.hpp | 2 +- .../mesh/generators/MeshGeneratorBase.hpp | 8 ++--- .../mesh/generators/VTKFaceBlockUtilities.cpp | 20 +++++------ .../mesh/generators/VTKMeshGenerator.hpp | 2 +- .../mesh/generators/VTKMeshGeneratorTools.cpp | 2 +- .../mesh/generators/VTKUtilities.cpp | 30 ++++++++-------- .../mesh/generators/VTKUtilities.hpp | 12 +++---- .../mpiCommunications/CommunicationTools.cpp | 10 +++--- .../mpiCommunications/CommunicationTools.hpp | 2 +- .../physicsSolvers/PhysicsSolverBase.hpp | 2 +- .../fluidFlow/CompositionalMultiphaseBase.cpp | 4 +-- .../fluidFlow/FlowSolverBase.cpp | 6 ++-- .../fluidFlow/FlowSolverBase.hpp | 4 +-- .../fluidFlow/ImmiscibleMultiphaseFlow.cpp | 2 +- .../ReactiveCompositionalMultiphaseOBL.cpp | 2 +- .../fluidFlow/SinglePhaseBase.cpp | 4 +-- ...lidMechanicsAugmentedLagrangianContact.hpp | 14 ++++---- ...olidMechanicsLagrangeContactBubbleStab.hpp | 12 +++---- .../fluidFlowTests/testFlowStatistics.cpp | 4 +-- .../fluidFlowTests/testTransmissibility.cpp | 2 +- .../linearAlgebraTests/testDofManager.cpp | 12 +++---- 53 files changed, 168 insertions(+), 168 deletions(-) diff --git a/src/coreComponents/codingUtilities/RTTypes.hpp b/src/coreComponents/codingUtilities/RTTypes.hpp index b5327b4fcb6..cd77f1632b3 100644 --- a/src/coreComponents/codingUtilities/RTTypes.hpp +++ b/src/coreComponents/codingUtilities/RTTypes.hpp @@ -127,7 +127,7 @@ class rtTypes /** * @brief the regex map type to store and find the regexes by the associated rtTypeName. */ - using RegexMapType = std::map< string, Regex >; + using RegexMapType = stdMap< string, Regex >; /** * @brief Custom types are useful to customize the regexes of an existing type. The type name diff --git a/src/coreComponents/codingUtilities/tests/testGeosxTraits.cpp b/src/coreComponents/codingUtilities/tests/testGeosxTraits.cpp index 48e0bcd0fa3..484a42b4004 100644 --- a/src/coreComponents/codingUtilities/tests/testGeosxTraits.cpp +++ b/src/coreComponents/codingUtilities/tests/testGeosxTraits.cpp @@ -52,11 +52,11 @@ TEST( testGeosxTraits, HasMemberFunction_at ) static_assert( HasMemberFunction_at< string >, "Should be true." ); static_assert( HasMemberFunction_at< stdVector< int > >, "Should be true." ); static_assert( HasMemberFunction_at< stdVector< double > >, "Should be true." ); - static_assert( HasMemberFunction_at< std::map< int, string > >, "Should be true." ); + static_assert( HasMemberFunction_at< stdMap< int, string > >, "Should be true." ); static_assert( HasMemberFunction_at< std::unordered_map< int, string > >, "Should be true." ); static_assert( !HasMemberFunction_at< int >, "Should be false." ); - static_assert( !HasMemberFunction_at< std::map< string, string > >, "Should be false." ); + static_assert( !HasMemberFunction_at< stdMap< string, string > >, "Should be false." ); static_assert( !HasMemberFunction_at< array1d< localIndex > >, "Should be false." ); } @@ -66,7 +66,7 @@ HAS_MEMBER_FUNCTION_NO_RTYPE( insert, TEST( testGeosxTraits, HasMemberFunction_insert ) { static_assert( HasMemberFunction_insert< stdVector< int > >, "Should be true." ); - static_assert( HasMemberFunction_insert< std::map< string, int > >, "Should be true." ); + static_assert( HasMemberFunction_insert< stdMap< string, int > >, "Should be true." ); static_assert( HasMemberFunction_insert< std::list< stdVector< int > > >, "Should be true." ); static_assert( !HasMemberFunction_insert< int >, "Should be false." ); @@ -79,7 +79,7 @@ TEST( testGeosxTraits, HasAlias_value_type ) static_assert( HasAlias_value_type< array1d< double > >, "Should be true." ); static_assert( HasAlias_value_type< array5d< array1d< R1Tensor > > >, "Should be true." ); static_assert( HasAlias_value_type< stdVector< int > >, "Should be true." ); - static_assert( HasAlias_value_type< std::map< string, string > >, "Should be true." ); + static_assert( HasAlias_value_type< stdMap< string, string > >, "Should be true." ); static_assert( !HasAlias_value_type< int >, "Should be false." ); static_assert( !HasAlias_value_type< double >, "Should be false." ); @@ -108,7 +108,7 @@ TEST( testGeosxTraits, HasMemberFunction_data ) static_assert( HasMemberFunction_data< array5d< array1d< R1Tensor > > >, "Should be true." ); static_assert( HasMemberFunction_data< stdVector< int > >, "Should be true." ); - static_assert( !HasMemberFunction_data< std::map< string, string > >, "Should be false." ); + static_assert( !HasMemberFunction_data< stdMap< string, string > >, "Should be false." ); static_assert( !HasMemberFunction_data< int >, "Should be false." ); static_assert( !HasMemberFunction_data< double >, "Should be false." ); } @@ -118,7 +118,7 @@ TEST( testGeosxTraits, HasMemberFunction_size ) static_assert( HasMemberFunction_size< array1d< double > >, "Should be true." ); static_assert( HasMemberFunction_size< array5d< array1d< R1Tensor > > >, "Should be true." ); static_assert( HasMemberFunction_size< stdVector< int > >, "Should be true." ); - static_assert( HasMemberFunction_size< std::map< string, string > >, "Should be true." ); + static_assert( HasMemberFunction_size< stdMap< string, string > >, "Should be true." ); static_assert( !HasMemberFunction_size< int >, "Should be false." ); static_assert( !HasMemberFunction_size< double >, "Should be false." ); @@ -132,7 +132,7 @@ TEST( testGeosxTraits, HasMemberFunction_resize ) static_assert( HasMemberFunction_resize< ArrayOfArrays< int > >, "Should be true." ); static_assert( HasMemberFunction_resize< ArrayOfSets< int > >, "Should be true." ); - static_assert( !HasMemberFunction_resize< std::map< string, string > >, "Should be false." ); + static_assert( !HasMemberFunction_resize< stdMap< string, string > >, "Should be false." ); static_assert( !HasMemberFunction_resize< int >, "Should be false." ); static_assert( !HasMemberFunction_resize< double >, "Should be false." ); diff --git a/src/coreComponents/codingUtilities/tests/testUtilities.cpp b/src/coreComponents/codingUtilities/tests/testUtilities.cpp index 9fc042ff113..42396e7a68c 100644 --- a/src/coreComponents/codingUtilities/tests/testUtilities.cpp +++ b/src/coreComponents/codingUtilities/tests/testUtilities.cpp @@ -23,7 +23,7 @@ using namespace geos; TEST( Utilities, MapExtraction ) { - std::map< string, int > const m{ + stdMap< string, int > const m{ { "k0", 0 }, { "k1", 1 }, { "k2", 2 } diff --git a/src/coreComponents/common/MpiWrapper.hpp b/src/coreComponents/common/MpiWrapper.hpp index b884e15a8bc..4b91a1be7a1 100644 --- a/src/coreComponents/common/MpiWrapper.hpp +++ b/src/coreComponents/common/MpiWrapper.hpp @@ -317,9 +317,9 @@ struct MpiWrapper ///@} #if !defined(GEOS_USE_MPI) - static std::map< int, std::pair< int, void * > > & getTagToPointersMap() + static stdMap< int, std::pair< int, void * > > & getTagToPointersMap() { - static std::map< int, std::pair< int, void * > > tagToPointers; + static stdMap< int, std::pair< int, void * > > tagToPointers; return tagToPointers; } #endif @@ -1169,8 +1169,8 @@ int MpiWrapper::iRecv( T * const buf, "Attempting to use an MPI_Request that is still in use." ); return MPI_Irecv( buf, count, internal::getMpiType< T >(), source, tag, comm, request ); #else - std::map< int, std::pair< int, void * > > & pointerMap = getTagToPointersMap(); - std::map< int, std::pair< int, void * > >::iterator iPointer = pointerMap.find( tag ); + stdMap< int, std::pair< int, void * > > & pointerMap = getTagToPointersMap(); + stdMap< int, std::pair< int, void * > >::iterator iPointer = pointerMap.find( tag ); if( iPointer==pointerMap.end() ) { @@ -1252,8 +1252,8 @@ int MpiWrapper::iSend( T const * const buf, "Attempting to use an MPI_Request that is still in use." ); return MPI_Isend( buf, count, internal::getMpiType< T >(), dest, tag, comm, request ); #else - std::map< int, std::pair< int, void * > > & pointerMap = getTagToPointersMap(); - std::map< int, std::pair< int, void * > >::iterator iPointer = pointerMap.find( tag ); + stdMap< int, std::pair< int, void * > > & pointerMap = getTagToPointersMap(); + stdMap< int, std::pair< int, void * > >::iterator iPointer = pointerMap.find( tag ); if( iPointer==pointerMap.end() ) { diff --git a/src/coreComponents/common/StdContainerWrappers.hpp b/src/coreComponents/common/StdContainerWrappers.hpp index 1c27a877ccd..77bca8cdbfd 100644 --- a/src/coreComponents/common/StdContainerWrappers.hpp +++ b/src/coreComponents/common/StdContainerWrappers.hpp @@ -145,7 +145,7 @@ namespace internal /** * Wrapper for the underlying map that allows toggling between bounds-checked access * (using at()) and unchecked access (using operator[]). - * @tparam MapType The type of the underlying map (e.g., std::map). + * @tparam MapType The type of the underlying map (e.g., stdMap). * @tparam Allocator Allocator type for the vector. * @tparam USE_STD_CONTAINER_BOUNDS_CHECKING A boolean flag to enable or disable bounds checking. */ @@ -154,7 +154,7 @@ template< typename MapType, class StdMapWrapper : public MapType { public: - /// Type alias for the base class (i.e., std::map) + /// Type alias for the base class (i.e., stdMap) using Base = MapType; using KeyType = typename Base::key_type; using MappedType = typename Base::mapped_type; @@ -205,9 +205,9 @@ class StdMapWrapper : public MapType } //namespace internal /** - * type alias for std::map - * @tparam Key The unique std::map key. - * @tparam T Type of elements in the std::map. + * type alias for stdMap + * @tparam Key The unique stdMap key. + * @tparam T Type of elements in the stdMap. * @tparam Compare The comparison function used to order the keys. Defaults to std::less. * @tparam Allocator Allocator type for the map. Defaults to std::allocator> */ diff --git a/src/coreComponents/common/format/table/TableData.hpp b/src/coreComponents/common/format/table/TableData.hpp index d7f2392828a..c9cd1cbfb38 100644 --- a/src/coreComponents/common/format/table/TableData.hpp +++ b/src/coreComponents/common/format/table/TableData.hpp @@ -193,7 +193,7 @@ class TableData2D private: /// @brief all cell values by their [ row ][ column ] - std::map< RowType, std::map< ColumnType, string > > m_data; + stdMap< RowType, stdMap< ColumnType, string > > m_data; /// @brief Store all column values when adding cell std::set< real64 > m_columnValues; diff --git a/src/coreComponents/common/format/table/TableFormatter.cpp b/src/coreComponents/common/format/table/TableFormatter.cpp index 9be9e832810..9a86cfe008a 100644 --- a/src/coreComponents/common/format/table/TableFormatter.cpp +++ b/src/coreComponents/common/format/table/TableFormatter.cpp @@ -262,7 +262,7 @@ void TableTextFormatter::populateHeaderCellsLayout( PreparedTableLayout const & } // number of times we will divide the each headers in the headerCellsLayout (key is the Column ptr) - std::map< std::ptrdiff_t, size_t > subdivsCount; + stdMap< std::ptrdiff_t, size_t > subdivsCount; for( auto it = tableLayout.beginDeepFirst(); it != tableLayout.endDeepFirst(); ++it ) { diff --git a/src/coreComponents/dataRepository/LogLevelsRegistry.hpp b/src/coreComponents/dataRepository/LogLevelsRegistry.hpp index b6d14fc4e0c..8ee87286ef4 100644 --- a/src/coreComponents/dataRepository/LogLevelsRegistry.hpp +++ b/src/coreComponents/dataRepository/LogLevelsRegistry.hpp @@ -52,7 +52,7 @@ class LogLevelsRegistry * @brief Map for building the log level string for each wrapper. * key : a logLevel condition, values : a set of description for a corresponding loglevel. */ - std::map< integer, stdVector< std::string > > m_logLevelsDescriptions; + stdMap< integer, stdVector< std::string > > m_logLevelsDescriptions; }; diff --git a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp index d7535e79a41..ba988dc8d0a 100644 --- a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp +++ b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp @@ -68,7 +68,7 @@ void FieldSpecificationManager::expandObjectCatalogs() void FieldSpecificationManager::validateBoundaryConditions( MeshLevel & mesh ) const { string invalidRegion = ""; - std::map< std::string, std::vector< string > > allPresentFieldsName; + stdMap< std::string, std::vector< string > > allPresentFieldsName; std::set< string > allPresentSets; mesh.getElemManager().forElementSubRegions< CellElementSubRegion >( [&]( CellElementSubRegion const & subRegion ) diff --git a/src/coreComponents/fileIO/silo/SiloFile.cpp b/src/coreComponents/fileIO/silo/SiloFile.cpp index 99be8dbb9ff..4dfa32c5bea 100644 --- a/src/coreComponents/fileIO/silo/SiloFile.cpp +++ b/src/coreComponents/fileIO/silo/SiloFile.cpp @@ -1223,7 +1223,7 @@ void SiloFile::writeElementRegionSilo( ElementRegionBase const & elemRegion, Group fakeGroup( elemRegion.getName(), conduitNode ); localIndex numElems = 0; - stdVector< std::map< string, WrapperBase const * > > viewPointers; + stdVector< stdMap< string, WrapperBase const * > > viewPointers; viewPointers.resize( elemRegion.numSubRegions() ); elemRegion.forElementSubRegionsIndex< ElementSubRegionBase >( diff --git a/src/coreComponents/fileIO/vtk/VTKPolyDataWriterInterface.hpp b/src/coreComponents/fileIO/vtk/VTKPolyDataWriterInterface.hpp index 5e399e7d4df..70d5db4711d 100644 --- a/src/coreComponents/fileIO/vtk/VTKPolyDataWriterInterface.hpp +++ b/src/coreComponents/fileIO/vtk/VTKPolyDataWriterInterface.hpp @@ -377,7 +377,7 @@ class VTKPolyDataWriterInterface integer m_numberOfTargetProcesses; /// Map a region name to the array of ranks outputed for it - std::map< string, stdVector< integer > > m_targetProcessesId; + stdMap< string, stdVector< integer > > m_targetProcessesId; }; } // namespace vtk diff --git a/src/coreComponents/finiteVolume/TwoPointFluxApproximation.cpp b/src/coreComponents/finiteVolume/TwoPointFluxApproximation.cpp index ef1844d6ec3..8ce8ed1c1f0 100644 --- a/src/coreComponents/finiteVolume/TwoPointFluxApproximation.cpp +++ b/src/coreComponents/finiteVolume/TwoPointFluxApproximation.cpp @@ -884,7 +884,7 @@ void TwoPointFluxApproximation::computeAquiferStencil( DomainPartition & domain, // Step 1: count individual aquifers - std::map< string, localIndex > aquiferNameToAquiferId; + stdMap< string, localIndex > aquiferNameToAquiferId; localIndex aquiferCounter = 0; fsManager.forSubGroups< AquiferBoundaryCondition >( [&] ( AquiferBoundaryCondition const & bc ) diff --git a/src/coreComponents/linearAlgebra/DofManager.cpp b/src/coreComponents/linearAlgebra/DofManager.cpp index 4625bca014c..70700f0e658 100644 --- a/src/coreComponents/linearAlgebra/DofManager.cpp +++ b/src/coreComponents/linearAlgebra/DofManager.cpp @@ -1569,7 +1569,7 @@ void DofManager::reorderByRank() { GEOS_LAI_ASSERT( !m_reordered ); - std::map< string, array1d< localIndex > > permutations; + stdMap< string, array1d< localIndex > > permutations; // First loop: compute the local permutation for( FieldDescription & field : m_fields ) @@ -1599,7 +1599,7 @@ void DofManager::reorderByRank() // ( MeshBody name, MeshLevel name), and a value that is another map with a // key that indicates the name of the object that contains the field to be // synced, and a value that contans the name of the field to be synced. - std::map< std::pair< string, string >, FieldIdentifiers > fieldsToBeSync; + stdMap< std::pair< string, string >, FieldIdentifiers > fieldsToBeSync; // adjust index arrays for owned locations for( FieldDescription const & field : m_fields ) diff --git a/src/coreComponents/linearAlgebra/DofManager.hpp b/src/coreComponents/linearAlgebra/DofManager.hpp index e6cbdb6a892..b7ff4a8aca9 100644 --- a/src/coreComponents/linearAlgebra/DofManager.hpp +++ b/src/coreComponents/linearAlgebra/DofManager.hpp @@ -642,7 +642,7 @@ class DofManager stdVector< FieldDescription > m_fields; /// Table of connector types within and between fields - std::map< std::pair< localIndex, localIndex >, CouplingDescription > m_coupling; + stdMap< std::pair< localIndex, localIndex >, CouplingDescription > m_coupling; /// Flag indicating that DOFs have been reordered rank-wise. bool m_reordered = false; diff --git a/src/coreComponents/linearAlgebra/interfaces/direct/SuperLUDist.cpp b/src/coreComponents/linearAlgebra/interfaces/direct/SuperLUDist.cpp index e4c1bdaa8a0..e6c097bb0fa 100644 --- a/src/coreComponents/linearAlgebra/interfaces/direct/SuperLUDist.cpp +++ b/src/coreComponents/linearAlgebra/interfaces/direct/SuperLUDist.cpp @@ -56,7 +56,7 @@ namespace */ colperm_t const & getColPermType( LinearSolverParameters::Direct::ColPerm const & value ) { - static std::map< LinearSolverParameters::Direct::ColPerm, colperm_t > const optionMap = + static stdMap< LinearSolverParameters::Direct::ColPerm, colperm_t > const optionMap = { { LinearSolverParameters::Direct::ColPerm::none, NATURAL }, { LinearSolverParameters::Direct::ColPerm::MMD_AtplusA, MMD_AT_PLUS_A }, @@ -77,7 +77,7 @@ colperm_t const & getColPermType( LinearSolverParameters::Direct::ColPerm const */ rowperm_t const & getRowPermType( LinearSolverParameters::Direct::RowPerm const & value ) { - static std::map< LinearSolverParameters::Direct::RowPerm, rowperm_t > const optionMap = + static stdMap< LinearSolverParameters::Direct::RowPerm, rowperm_t > const optionMap = { { LinearSolverParameters::Direct::RowPerm::none, NOROWPERM }, { LinearSolverParameters::Direct::RowPerm::mc64, LargeDiag_MC64 }, diff --git a/src/coreComponents/linearAlgebra/interfaces/petsc/PetscPreconditioner.cpp b/src/coreComponents/linearAlgebra/interfaces/petsc/PetscPreconditioner.cpp index 822bf336aae..93cb2a2db98 100644 --- a/src/coreComponents/linearAlgebra/interfaces/petsc/PetscPreconditioner.cpp +++ b/src/coreComponents/linearAlgebra/interfaces/petsc/PetscPreconditioner.cpp @@ -59,7 +59,7 @@ void convertRigidBodyModes( LinearSolverParameters const & params, PCType getPetscSmootherType( LinearSolverParameters::PreconditionerType const & type ) { - static std::map< LinearSolverParameters::PreconditionerType, PCType > const typeMap = + static stdMap< LinearSolverParameters::PreconditionerType, PCType > const typeMap = { { LinearSolverParameters::PreconditionerType::iluk, PCILU }, { LinearSolverParameters::PreconditionerType::ic, PCICC }, diff --git a/src/coreComponents/linearAlgebra/interfaces/trilinos/TrilinosPreconditioner.cpp b/src/coreComponents/linearAlgebra/interfaces/trilinos/TrilinosPreconditioner.cpp index 1f2bfb02faf..94c721eab95 100644 --- a/src/coreComponents/linearAlgebra/interfaces/trilinos/TrilinosPreconditioner.cpp +++ b/src/coreComponents/linearAlgebra/interfaces/trilinos/TrilinosPreconditioner.cpp @@ -82,7 +82,7 @@ namespace string getMLCycleType( LinearSolverParameters::AMG::CycleType const & value ) { - static std::map< LinearSolverParameters::AMG::CycleType, string > const optionMap = + static stdMap< LinearSolverParameters::AMG::CycleType, string > const optionMap = { { LinearSolverParameters::AMG::CycleType::V, "MGV" }, { LinearSolverParameters::AMG::CycleType::W, "MGW" }, @@ -94,7 +94,7 @@ string getMLCycleType( LinearSolverParameters::AMG::CycleType const & value ) string getMLSmootherType( LinearSolverParameters::AMG::SmootherType const & value ) { - static std::map< LinearSolverParameters::AMG::SmootherType, string > const optionMap = + static stdMap< LinearSolverParameters::AMG::SmootherType, string > const optionMap = { { LinearSolverParameters::AMG::SmootherType::default_, "Chebyshev" }, { LinearSolverParameters::AMG::SmootherType::jacobi, "Jacobi" }, @@ -115,7 +115,7 @@ string getMLSmootherType( LinearSolverParameters::AMG::SmootherType const & valu string getMLCoarseType( LinearSolverParameters::AMG::CoarseType const & value ) { - static std::map< LinearSolverParameters::AMG::CoarseType, string > const optionMap = + static stdMap< LinearSolverParameters::AMG::CoarseType, string > const optionMap = { { LinearSolverParameters::AMG::CoarseType::default_, "Amesos-KLU" }, { LinearSolverParameters::AMG::CoarseType::jacobi, "Jacobi" }, @@ -134,7 +134,7 @@ string getMLCoarseType( LinearSolverParameters::AMG::CoarseType const & value ) string getMLPreOrPostSmoothingType( LinearSolverParameters::AMG::PreOrPost const & value ) { - static std::map< LinearSolverParameters::AMG::PreOrPost, string > const optionMap = + static stdMap< LinearSolverParameters::AMG::PreOrPost, string > const optionMap = { { LinearSolverParameters::AMG::PreOrPost::pre, "pre" }, { LinearSolverParameters::AMG::PreOrPost::post, "post" }, @@ -184,7 +184,7 @@ createMLOperator( LinearSolverParameters const & params, Ifpack::EPrecType getIfpackPrecondType( LinearSolverParameters::PreconditionerType const & type ) { - static std::map< LinearSolverParameters::PreconditionerType, Ifpack::EPrecType > const typeMap = + static stdMap< LinearSolverParameters::PreconditionerType, Ifpack::EPrecType > const typeMap = { { LinearSolverParameters::PreconditionerType::iluk, Ifpack::ILU }, { LinearSolverParameters::PreconditionerType::ilut, Ifpack::ILUT }, @@ -203,7 +203,7 @@ Ifpack::EPrecType getIfpackPrecondType( LinearSolverParameters::PreconditionerTy } string getIfpackRelaxationType( LinearSolverParameters::PreconditionerType const & type ) { - static std::map< LinearSolverParameters::PreconditionerType, string > const typeMap = + static stdMap< LinearSolverParameters::PreconditionerType, string > const typeMap = { { LinearSolverParameters::PreconditionerType::jacobi, "Jacobi" }, { LinearSolverParameters::PreconditionerType::fgs, "Gauss-Seidel" }, diff --git a/src/coreComponents/mesh/CellElementRegionSelector.cpp b/src/coreComponents/mesh/CellElementRegionSelector.cpp index 7a8af8a7568..6121006ba66 100644 --- a/src/coreComponents/mesh/CellElementRegionSelector.cpp +++ b/src/coreComponents/mesh/CellElementRegionSelector.cpp @@ -27,7 +27,7 @@ using ViewKeys = CellElementRegion::viewKeyStruct; CellElementRegionSelector::CellElementRegionSelector( Group const & cellBlocks, - std::map< integer, std::set< string > > const & regionsCellBlocks ) + stdMap< integer, std::set< string > > const & regionsCellBlocks ) { // The owners lists need to be initialized so we will be able to verify later that it is not empty. diff --git a/src/coreComponents/mesh/CellElementRegionSelector.hpp b/src/coreComponents/mesh/CellElementRegionSelector.hpp index 824e227f0de..f2518a50596 100644 --- a/src/coreComponents/mesh/CellElementRegionSelector.hpp +++ b/src/coreComponents/mesh/CellElementRegionSelector.hpp @@ -41,7 +41,7 @@ class CellElementRegionSelector * @param cellBlocksRegion A map of the cellblocks name lists for each region attributes value. */ CellElementRegionSelector( dataRepository::Group const & cellBlocks, - std::map< integer, std::set< string > > const & cellBlocksRegion ); + stdMap< integer, std::set< string > > const & cellBlocksRegion ); /** * @brief Select the mesh cell-blocks for the specified region following the user inputs. @@ -67,16 +67,16 @@ class CellElementRegionSelector static constexpr string_view cellBlockTypeSeparator = "_"; /// @brief A map that link every cell-block name to the CellElementRegion(s) that references it. - std::map< string, stdVector< CellElementRegion const * > > m_cellBlocksOwners; + stdMap< string, stdVector< CellElementRegion const * > > m_cellBlocksOwners; /// @brief A map that link every region attribute values to the CellElementRegion(s) that references it. - std::map< string, stdVector< CellElementRegion const * > > m_regionAttributesOwners; + stdMap< string, stdVector< CellElementRegion const * > > m_regionAttributesOwners; /** * @brief A map of the cellblocks name lists for each region attributes value. Internal attribute type * is integer to facilitate comparison with cellBlock qualifiers. */ - std::map< string, std::set< string > const & > m_regionAttributesCellBlocks; + stdMap< string, std::set< string > const & > m_regionAttributesCellBlocks; /** * @return A set of the FNMatch pattern from the provided lists. diff --git a/src/coreComponents/mesh/FaceElementSubRegion.cpp b/src/coreComponents/mesh/FaceElementSubRegion.cpp index 52b19f0953b..0148925b3bf 100644 --- a/src/coreComponents/mesh/FaceElementSubRegion.cpp +++ b/src/coreComponents/mesh/FaceElementSubRegion.cpp @@ -525,9 +525,9 @@ void FaceElementSubRegion::fixUpDownMaps( bool const clearIfUnmapped ) * the lowest id among all the collocated nodes sharing the same position. * That way, it's possible to know if two nodes are collocated of each other by checking if they share the same lowest id. */ -std::map< globalIndex, globalIndex > buildReferenceCollocatedNodes( ArrayOfArrays< array1d< globalIndex > > const & elem2dToCollocatedNodesBuckets ) +stdMap< globalIndex, globalIndex > buildReferenceCollocatedNodes( ArrayOfArrays< array1d< globalIndex > > const & elem2dToCollocatedNodesBuckets ) { - std::map< globalIndex, globalIndex > referenceCollocatedNodes; // Will be returned. + stdMap< globalIndex, globalIndex > referenceCollocatedNodes; // Will be returned. // Since some 2d elem may share some nodes, some of the collocated nodes buckets will be duplicated. // We want to remove this. @@ -571,8 +571,8 @@ std::map< globalIndex, globalIndex > buildReferenceCollocatedNodes( ArrayOfArray * There will be multiple edges with the same pair of reference collocated nodes. * This information is contained in the returned mapping. */ -std::map< std::pair< globalIndex, globalIndex >, std::set< localIndex > > -buildCollocatedEdgeBuckets( std::map< globalIndex, globalIndex > const & referenceCollocatedNodes, +stdMap< std::pair< globalIndex, globalIndex >, std::set< localIndex > > +buildCollocatedEdgeBuckets( stdMap< globalIndex, globalIndex > const & referenceCollocatedNodes, arrayView1d< globalIndex const > const nl2g, arrayView2d< localIndex const > const edgeToNodes ) { @@ -589,7 +589,7 @@ buildCollocatedEdgeBuckets( std::map< globalIndex, globalIndex > const & referen // because we want to be sure to test all the combinations of nodes, // and therefore not to forget any possible edge. // It's important to note that the key of `edgeIds` are the global indices of the nodes, in no particular order. - std::map< std::pair< globalIndex, globalIndex >, localIndex > edgesIds; + stdMap< std::pair< globalIndex, globalIndex >, localIndex > edgesIds; for( localIndex lei = 0; lei < edgeToNodes.size( 0 ); ++lei ) { auto const & nodes = edgeToNodes[lei]; @@ -605,7 +605,7 @@ buildCollocatedEdgeBuckets( std::map< globalIndex, globalIndex > const & referen // Those two nodes are the lowest index of collocated nodes. As such, those two nodes may not form an existing edge. // But this trick lets us define some kind of _hash_ that allows to compare the location of the edges: // edges sharing the same hash lie in the same position. - std::map< std::pair< globalIndex, globalIndex >, std::set< localIndex > > collocatedEdgeBuckets; + stdMap< std::pair< globalIndex, globalIndex >, std::set< localIndex > > collocatedEdgeBuckets; for( auto const & p: edgesIds ) { static constexpr auto nodeNotFound = "Internal error when trying to access the reference collocated node for global node {}."; @@ -636,10 +636,10 @@ buildCollocatedEdgeBuckets( std::map< globalIndex, globalIndex > const & referen * @param edgeGhostRanks The ghost rank of the edges. * @return The computed mapping. */ -std::map< localIndex, localIndex > buildReferenceCollocatedEdges( std::map< std::pair< globalIndex, globalIndex >, std::set< localIndex > > const & collocatedEdgeBuckets, +stdMap< localIndex, localIndex > buildReferenceCollocatedEdges( stdMap< std::pair< globalIndex, globalIndex >, std::set< localIndex > > const & collocatedEdgeBuckets, arrayView1d< integer const > const edgeGhostRanks ) { - std::map< localIndex, localIndex > referenceCollocatedEdges; + stdMap< localIndex, localIndex > referenceCollocatedEdges; // We want to consider in priority the edges that are owned by the rank. // So this comparator takes the ghost rank into account and favors lower values of the ghost rank. @@ -692,7 +692,7 @@ SortedArray< localIndex > makeSortedArrayIota( localIndex newSize, localIndex va */ ArrayOfArrays< geos::localIndex > build2dFaceTo2dElems( ArrayOfArraysView< localIndex const > const elem2dToEdges, map< localIndex, localIndex > const & edgesTo2dFaces, - std::map< geos::localIndex, geos::localIndex > const & referenceCollocatedEdges ) + stdMap< geos::localIndex, geos::localIndex > const & referenceCollocatedEdges ) { ArrayOfArrays< localIndex > face2dTo2dElems; @@ -793,8 +793,8 @@ void fillMissing2dElemToNodes( ArrayOfArrays< array1d< globalIndex > > const & e void fillMissing2dElemToEdges( ArrayOfArraysView< localIndex const > const elem2dToNodes, ArrayOfSetsView< localIndex const > const nodesToEdges, arrayView1d< globalIndex const > const nl2g, - std::map< globalIndex, globalIndex > const & referenceCollocatedNodes, - std::map< std::pair< globalIndex, globalIndex >, std::set< localIndex > > const & collocatedEdgeBuckets, + stdMap< globalIndex, globalIndex > const & referenceCollocatedNodes, + stdMap< std::pair< globalIndex, globalIndex >, std::set< localIndex > > const & collocatedEdgeBuckets, ArrayOfArrays< localIndex > & elem2dToEdges ) { localIndex const num2dElems = elem2dToNodes.size(); @@ -812,7 +812,7 @@ void fillMissing2dElemToEdges( ArrayOfArraysView< localIndex const > const elem2 // `nodesOfEdgesTouching2dElem` deals with the edges that have at least one point touching the 2d element. // While `nodesOfEdgesOf2dElem` deals with the edges for which all two nodes are on the 2d element. // For both mappings, the key is the edge index and the values are the local nodes indices of the concerned edges. - std::map< localIndex, stdVector< localIndex > > nodesOfEdgesTouching2dElem, nodesOfEdgesOf2dElem; + stdMap< localIndex, stdVector< localIndex > > nodesOfEdgesTouching2dElem, nodesOfEdgesOf2dElem; for( localIndex const & n: elem2dToNodes[e2d] ) { for( localIndex const & e: nodesToEdges[n] ) @@ -858,7 +858,7 @@ void fillMissing2dElemToEdges( ArrayOfArraysView< localIndex const > const elem2 * The 2d face ordering is more or less random (actually it's sorted on the index of the reference edge). * But the ordering is not critical as long as it's consistent withing the fracture. */ -array1d< localIndex > build2dFaceToEdge( std::map< localIndex, localIndex > const & referenceCollocatedEdges ) +array1d< localIndex > build2dFaceToEdge( stdMap< localIndex, localIndex > const & referenceCollocatedEdges ) { std::set< localIndex > const referenceEdges = mapValues< std::set >( referenceCollocatedEdges ); @@ -943,12 +943,12 @@ void FaceElementSubRegion::fixSecondaryMappings( NodeManager const & nodeManager ArrayOfArraysView< localIndex const > const faceToNodes = faceManager.nodeList().toViewConst(); // First let's create the reference mappings for both nodes and edges. - std::map< globalIndex, globalIndex > const referenceCollocatedNodes = buildReferenceCollocatedNodes( m_2dElemToCollocatedNodesBuckets ); + stdMap< globalIndex, globalIndex > const referenceCollocatedNodes = buildReferenceCollocatedNodes( m_2dElemToCollocatedNodesBuckets ); fillMissing2dElemToNodes( m_2dElemToCollocatedNodesBuckets, nodeManager.globalToLocalMap(), m_toNodesRelation ); - std::map< std::pair< globalIndex, globalIndex >, std::set< localIndex > > const collocatedEdgeBuckets = buildCollocatedEdgeBuckets( referenceCollocatedNodes, nl2g, edgeManager.nodeList() ); - std::map< localIndex, localIndex > const referenceCollocatedEdges = buildReferenceCollocatedEdges( collocatedEdgeBuckets, edgeManager.ghostRank() ); + stdMap< std::pair< globalIndex, globalIndex >, std::set< localIndex > > const collocatedEdgeBuckets = buildCollocatedEdgeBuckets( referenceCollocatedNodes, nl2g, edgeManager.nodeList() ); + stdMap< localIndex, localIndex > const referenceCollocatedEdges = buildReferenceCollocatedEdges( collocatedEdgeBuckets, edgeManager.ghostRank() ); m_2dFaceToEdge = build2dFaceToEdge( referenceCollocatedEdges ); m_edgesTo2dFaces = buildEdgesToFace2d( m_2dFaceToEdge.toViewConst() ); @@ -980,7 +980,7 @@ void FaceElementSubRegion::fixSecondaryMappings( NodeManager const & nodeManager // We are building the mapping that connects all the reference (collocated) nodes of any face to the elements those nodes are touching. // Using this nodal information will let us reconnect the fracture 2d element to its 3d neighbor. - std::map< std::set< globalIndex >, std::set< ElemPath > > faceRefNodesToElems; + stdMap< std::set< globalIndex >, std::set< ElemPath > > faceRefNodesToElems; elemManager.forElementSubRegionsComplete< CellElementSubRegion >( [&]( localIndex const er, localIndex const esr, ElementRegionBase const & GEOS_UNUSED_PARAM( region ), diff --git a/src/coreComponents/mesh/FieldIdentifiers.hpp b/src/coreComponents/mesh/FieldIdentifiers.hpp index 7964e6aaa1c..35eaa972895 100644 --- a/src/coreComponents/mesh/FieldIdentifiers.hpp +++ b/src/coreComponents/mesh/FieldIdentifiers.hpp @@ -76,9 +76,9 @@ class FieldIdentifiers /** * @brief Get the Fields object which is the map containing the fields existing for each location. * - * @return std::map< string, string_array > const& + * @return stdMap< string, string_array > const& */ - std::map< string, string_array > const & getFields() const + stdMap< string, string_array > const & getFields() const { return m_fields; } @@ -128,7 +128,7 @@ class FieldIdentifiers private: /// - std::map< string, string_array > m_fields; + stdMap< string, string_array > m_fields; struct keysStruct { diff --git a/src/coreComponents/mesh/MeshManager.cpp b/src/coreComponents/mesh/MeshManager.cpp index ccc62b7672d..fe4100933ab 100644 --- a/src/coreComponents/mesh/MeshManager.cpp +++ b/src/coreComponents/mesh/MeshManager.cpp @@ -164,7 +164,7 @@ void MeshManager::importFields( MeshGeneratorBase const & generator, string const & regionName, ElementSubRegionBase & subRegion, MeshGeneratorBase::Block const block, - std::map< string, string > const & fieldsMapping, + stdMap< string, string > const & fieldsMapping, FieldIdentifiers & fieldsToBeSync ) { std::unordered_set< string > const materialWrapperNames = getMaterialWrapperNames( subRegion ); diff --git a/src/coreComponents/mesh/MeshManager.hpp b/src/coreComponents/mesh/MeshManager.hpp index d2f7eff56d0..886d85692d8 100644 --- a/src/coreComponents/mesh/MeshManager.hpp +++ b/src/coreComponents/mesh/MeshManager.hpp @@ -88,7 +88,7 @@ class MeshManager : public dataRepository::Group string const & regionName, ElementSubRegionBase & subRegion, MeshGeneratorBase::Block block, - std::map< string, string > const & fieldsMapping, + stdMap< string, string > const & fieldsMapping, FieldIdentifiers & fieldsToBeSync ); private: diff --git a/src/coreComponents/mesh/MeshObjectPath.cpp b/src/coreComponents/mesh/MeshObjectPath.cpp index a17d040036c..a57eb776404 100644 --- a/src/coreComponents/mesh/MeshObjectPath.cpp +++ b/src/coreComponents/mesh/MeshObjectPath.cpp @@ -187,7 +187,7 @@ MeshObjectPath::fillPathTokens( string const & path, template< typename SUBNODE > -static SUBNODE & insertPathNode( std::map< string, SUBNODE > & node, string const & name ) +static SUBNODE & insertPathNode( stdMap< string, SUBNODE > & node, string const & name ) { return node[ name ]; } @@ -251,14 +251,14 @@ void MeshObjectPath::processPathTokens( stdVector< string > const & pathTokens, pathTokens[0], m_pathPermutations, [this, &pathTokens] ( MeshBody const & meshBody, - std::map< string, std::map< string, stdVector< string > > > & meshBodyNode ) + stdMap< string, stdMap< string, stdVector< string > > > & meshBodyNode ) { dataRepository::Group const & meshLevels = meshBody.getMeshLevels(); processTokenRecursive< MeshLevel >( meshLevels, pathTokens[1], meshBodyNode, [this, &pathTokens]( MeshLevel const & meshLevel, - std::map< string, stdVector< string > > & meshLevelNode ) + stdMap< string, stdVector< string > > & meshLevelNode ) { if( m_objectType == ObjectTypes::elems ) { diff --git a/src/coreComponents/mesh/MeshObjectPath.hpp b/src/coreComponents/mesh/MeshObjectPath.hpp index c757d8ad2ad..c55fc3fa73f 100644 --- a/src/coreComponents/mesh/MeshObjectPath.hpp +++ b/src/coreComponents/mesh/MeshObjectPath.hpp @@ -44,7 +44,7 @@ class MeshObjectPath * The third key is the name of an ElementRegion * The third value is a vector of subregion names */ - using permutationMapType = std::map< string, std::map< string, std::map< string, stdVector< string > > > >; + using permutationMapType = stdMap< string, stdMap< string, stdMap< string, stdVector< string > > > >; /** * @brief Contains enums for the types of objects @@ -177,13 +177,13 @@ class MeshObjectPath */ template< typename OBJECT_TYPE, typename FUNC > - void forObjectsInPath( std::pair< string const, std::map< string, stdVector< string > > > const & levelPair, + void forObjectsInPath( std::pair< string const, stdMap< string, stdVector< string > > > const & levelPair, MeshLevel & meshLevel, FUNC && func ) const; template< typename OBJECT_TYPE, typename FUNC > - void forObjectsInPath( std::pair< string const, std::map< string, stdVector< string > > > const & levelPair, + void forObjectsInPath( std::pair< string const, stdMap< string, stdVector< string > > > const & levelPair, MeshLevel const & meshLevel, FUNC && func ) const; @@ -273,7 +273,7 @@ bool MeshObjectPath::checkObjectTypeConsistency() const template< typename OBJECT_TYPE, typename FUNC > -void MeshObjectPath::forObjectsInPath( std::pair< string const, std::map< string, stdVector< string > > > const & levelPair, +void MeshObjectPath::forObjectsInPath( std::pair< string const, stdMap< string, stdVector< string > > > const & levelPair, MeshLevel & meshLevel, FUNC && func ) const { @@ -285,7 +285,7 @@ void MeshObjectPath::forObjectsInPath( std::pair< string const, std::map< string template< typename OBJECT_TYPE, typename FUNC > -void MeshObjectPath::forObjectsInPath( std::pair< string const, std::map< string, stdVector< string > > > const & levelPair, +void MeshObjectPath::forObjectsInPath( std::pair< string const, stdMap< string, stdVector< string > > > const & levelPair, MeshLevel const & meshLevel, FUNC && func ) const { diff --git a/src/coreComponents/mesh/generators/CellBlockManager.cpp b/src/coreComponents/mesh/generators/CellBlockManager.cpp index 3dc72468165..035754b8892 100644 --- a/src/coreComponents/mesh/generators/CellBlockManager.cpp +++ b/src/coreComponents/mesh/generators/CellBlockManager.cpp @@ -816,12 +816,12 @@ arrayView1d< globalIndex > CellBlockManager::getNodeLocalToGlobal() return m_nodeLocalToGlobal.toView(); } -std::map< string, SortedArray< localIndex > > const & CellBlockManager::getNodeSets() const +stdMap< string, SortedArray< localIndex > > const & CellBlockManager::getNodeSets() const { return m_nodeSets; } -std::map< string, SortedArray< localIndex > > & CellBlockManager::getNodeSets() +stdMap< string, SortedArray< localIndex > > & CellBlockManager::getNodeSets() { return m_nodeSets; } diff --git a/src/coreComponents/mesh/generators/CellBlockManager.hpp b/src/coreComponents/mesh/generators/CellBlockManager.hpp index 4e8d2688564..f884e5d0460 100644 --- a/src/coreComponents/mesh/generators/CellBlockManager.hpp +++ b/src/coreComponents/mesh/generators/CellBlockManager.hpp @@ -91,7 +91,7 @@ class CellBlockManager : public CellBlockManagerABC */ arrayView1d< globalIndex > getNodeLocalToGlobal(); - std::map< string, SortedArray< localIndex > > const & getNodeSets() const override; + stdMap< string, SortedArray< localIndex > > const & getNodeSets() const override; /** * @brief Returns a mutable reference to the node sets. @@ -101,7 +101,7 @@ class CellBlockManager : public CellBlockManagerABC * While the values are sorted arrays which sizes are meant to be managed by the client code. * This member function is meant to be used like a setter. */ - std::map< string, SortedArray< localIndex > > & getNodeSets(); + stdMap< string, SortedArray< localIndex > > & getNodeSets(); /** * @brief Defines the number of nodes and resizes some underlying arrays appropriately. @@ -158,7 +158,7 @@ class CellBlockManager : public CellBlockManagerABC Group & getCellBlocks() override; - std::map< integer, std::set< string > > const & getRegionAttributesCellBlocks() const override + stdMap< integer, std::set< string > > const & getRegionAttributesCellBlocks() const override { return m_regionAttributesCellBlocks; } Group const & getFaceBlocks() const override; @@ -281,9 +281,9 @@ class CellBlockManager : public CellBlockManagerABC array1d< globalIndex > m_nodeLocalToGlobal; - std::map< string, SortedArray< localIndex > > m_nodeSets; + stdMap< string, SortedArray< localIndex > > m_nodeSets; - std::map< integer, std::set< string > > m_regionAttributesCellBlocks; + stdMap< integer, std::set< string > > m_regionAttributesCellBlocks; real64 m_globalLength; diff --git a/src/coreComponents/mesh/generators/CellBlockManagerABC.hpp b/src/coreComponents/mesh/generators/CellBlockManagerABC.hpp index c68c2a1bf13..ae98b4f2b01 100644 --- a/src/coreComponents/mesh/generators/CellBlockManagerABC.hpp +++ b/src/coreComponents/mesh/generators/CellBlockManagerABC.hpp @@ -124,7 +124,7 @@ class CellBlockManagerABC : public dataRepository::Group /** * @return A map of the cellblocks list for each region attribute values. */ - virtual std::map< integer, std::set< string > > const & getRegionAttributesCellBlocks() const = 0; + virtual stdMap< integer, std::set< string > > const & getRegionAttributesCellBlocks() const = 0; /** * @brief Total number of nodes across all the cell blocks. @@ -211,7 +211,7 @@ class CellBlockManagerABC : public dataRepository::Group * @brief Returns the node sets. Key of the map is the name of the set. * @return A reference to constant map. */ - virtual std::map< string, SortedArray< localIndex > > const & getNodeSets() const = 0; + virtual stdMap< string, SortedArray< localIndex > > const & getNodeSets() const = 0; /** * @brief Getter for the global length diff --git a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp index 910e9b38087..d76a79ce8ab 100644 --- a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp +++ b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp @@ -89,9 +89,9 @@ void ExternalMeshGeneratorBase::postInputInitialization() // Building the fields mapping from the two separated input/output vectors. auto const buildMapping = [&]( string_array const & from, - string_array const & to ) -> std::map< string, string > + string_array const & to ) -> stdMap< string, string > { - std::map< string, string > mapping; + stdMap< string, string > mapping; for( size_t i = 0; i < from.size(); i++ ) { mapping[from[i]] = to[i]; diff --git a/src/coreComponents/mesh/generators/InternalMeshGenerator.cpp b/src/coreComponents/mesh/generators/InternalMeshGenerator.cpp index e151c0edbfd..a0ec25a0019 100644 --- a/src/coreComponents/mesh/generators/InternalMeshGenerator.cpp +++ b/src/coreComponents/mesh/generators/InternalMeshGenerator.cpp @@ -640,8 +640,8 @@ void InternalMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockMa // Calculate number of elements in this partition from each region, and the // total number of nodes - std::map< string, int > numElemsInRegions; - std::map< string, ElementType > elemTypeInRegions; + stdMap< string, int > numElemsInRegions; + stdMap< string, ElementType > elemTypeInRegions; array1d< integer > firstElemIndexForBlockInPartition[3]; array1d< integer > lastElemIndexForBlockInPartition[3]; @@ -794,7 +794,7 @@ void InternalMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockMa { array1d< integer > numElements; string_array elementRegionNames; - std::map< string, localIndex > localElemIndexInRegion; + stdMap< string, localIndex > localElemIndexInRegion; for( auto const & numElemsInRegion : numElemsInRegions ) { diff --git a/src/coreComponents/mesh/generators/InternalMeshGenerator.hpp b/src/coreComponents/mesh/generators/InternalMeshGenerator.hpp index cc977d5f9d9..bf7d893160f 100644 --- a/src/coreComponents/mesh/generators/InternalMeshGenerator.hpp +++ b/src/coreComponents/mesh/generators/InternalMeshGenerator.hpp @@ -134,7 +134,7 @@ class InternalMeshGenerator : public MeshGeneratorBase * @param[in,out] X The nodes coordinates. * @param[in,out] nodeSets The name to node sets mapping. */ - virtual void coordinateTransformation( arrayView2d< real64, nodes::REFERENCE_POSITION_USD > X, std::map< string, SortedArray< localIndex > > & nodeSets ) + virtual void coordinateTransformation( arrayView2d< real64, nodes::REFERENCE_POSITION_USD > X, stdMap< string, SortedArray< localIndex > > & nodeSets ) { GEOS_UNUSED_VAR( X ); GEOS_UNUSED_VAR( nodeSets ); diff --git a/src/coreComponents/mesh/generators/InternalWellboreGenerator.cpp b/src/coreComponents/mesh/generators/InternalWellboreGenerator.cpp index 008ff4f91f3..73a92da42a0 100644 --- a/src/coreComponents/mesh/generators/InternalWellboreGenerator.cpp +++ b/src/coreComponents/mesh/generators/InternalWellboreGenerator.cpp @@ -349,7 +349,7 @@ void InternalWellboreGenerator::setConnectivityForPeriodicBoundaries( int ( & gl } } -void InternalWellboreGenerator::coordinateTransformation( arrayView2d< real64, nodes::REFERENCE_POSITION_USD > X, std::map< string, SortedArray< localIndex > > & nodeSets ) +void InternalWellboreGenerator::coordinateTransformation( arrayView2d< real64, nodes::REFERENCE_POSITION_USD > X, stdMap< string, SortedArray< localIndex > > & nodeSets ) { localIndex const numNodes = X.size( 0 ); diff --git a/src/coreComponents/mesh/generators/InternalWellboreGenerator.hpp b/src/coreComponents/mesh/generators/InternalWellboreGenerator.hpp index 5076a9e39c1..af745d02f7d 100644 --- a/src/coreComponents/mesh/generators/InternalWellboreGenerator.hpp +++ b/src/coreComponents/mesh/generators/InternalWellboreGenerator.hpp @@ -64,7 +64,7 @@ class InternalWellboreGenerator : public InternalMeshGenerator localIndex ( &nodeOfBox )[8] ) override final; void coordinateTransformation( arrayView2d< real64, nodes::REFERENCE_POSITION_USD > X, - std::map< string, SortedArray< localIndex > > & nodeSets ) override final; + stdMap< string, SortedArray< localIndex > > & nodeSets ) override final; inline bool isCartesian() const override final { diff --git a/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp b/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp index d71de5cac30..03ae359a7ac 100644 --- a/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp +++ b/src/coreComponents/mesh/generators/MeshGeneratorBase.hpp @@ -117,20 +117,20 @@ class MeshGeneratorBase : public dataRepository::Group * @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; } + stdMap< string, string > const & getVolumicFieldsMapping() const { return m_volumicFields; } /** * @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; } + stdMap< string, string > const & getSurfacicFieldsMapping() const { return m_surfacicFields; } protected: /// Mapping from volumic field source to GEOS field. - std::map< string, string > m_volumicFields; + stdMap< string, string > m_volumicFields; /// Mapping from surfacic field source to GEOS field. - std::map< string, string > m_surfacicFields; + stdMap< string, string > m_surfacicFields; private: /** diff --git a/src/coreComponents/mesh/generators/VTKFaceBlockUtilities.cpp b/src/coreComponents/mesh/generators/VTKFaceBlockUtilities.cpp index 424dd5aa97f..0af1a8da92b 100644 --- a/src/coreComponents/mesh/generators/VTKFaceBlockUtilities.cpp +++ b/src/coreComponents/mesh/generators/VTKFaceBlockUtilities.cpp @@ -53,7 +53,7 @@ class ElementToFace CellBlock const & cb = cellBlocks.getGroup< CellBlock >( c ); auto const & l2g = cb.localToGlobalMapConstView(); - std::map< globalIndex, localIndex > g2l; + stdMap< globalIndex, localIndex > g2l; for( auto l = 0; l < l2g.size(); ++l ) { @@ -103,13 +103,13 @@ class ElementToFace private: /// global element index to the local cell block index - std::map< globalIndex, localIndex > m_elementToCellBlock; + stdMap< globalIndex, localIndex > m_elementToCellBlock; /// Cell block index to a mapping from global element index to the local (to the cell block) element index. - std::map< localIndex, std::map< globalIndex, localIndex > > m_cbe; + stdMap< localIndex, stdMap< globalIndex, localIndex > > m_cbe; /// Cell block index to a mapping from global element index to the faces indices. - std::map< localIndex, arrayView2d< localIndex const > > m_cbf; + stdMap< localIndex, arrayView2d< localIndex const > > m_cbf; }; } // end of namespace internal @@ -280,7 +280,7 @@ array1d< localIndex > buildFace2dToEdge( vtkIdTypeArray const * globalPtIds, CollocatedNodes const & collocatedNodes, ArrayOfArraysView< localIndex const > nodeToEdges ) { - std::map< globalIndex, stdVector< localIndex > > n2e; + stdMap< globalIndex, stdVector< localIndex > > n2e; for( auto i = 0; i < nodeToEdges.size(); ++i ) { stdVector< localIndex > es; @@ -308,7 +308,7 @@ array1d< localIndex > buildFace2dToEdge( vtkIdTypeArray const * globalPtIds, allDuplicatedNodesOfEdge.emplace_back( d ); } } - std::map< vtkIdType, int > edgeCount; + stdMap< vtkIdType, int > edgeCount; for( vtkIdType const & d: allDuplicatedNodesOfEdge ) { localIndex const dd = LvArray::integerConversion< localIndex >( d ); @@ -442,7 +442,7 @@ Elem2dTo3dInfo buildElem2dTo3dElemAndFaces( vtkSmartPointer< vtkDataSet > faceMe vtkIdTypeArray const * globalPtIds = vtkIdTypeArray::FastDownCast( mesh->GetPointData()->GetGlobalIds() ); vtkIdTypeArray const * globalCellIds = vtkIdTypeArray::FastDownCast( mesh->GetCellData()->GetGlobalIds() ); - std::map< vtkIdType, localIndex > ng2l; // global to local mapping for nodes. + stdMap< vtkIdType, localIndex > ng2l; // global to local mapping for nodes. for( vtkIdType i = 0; i < globalPtIds->GetNumberOfValues(); ++i ) { ng2l[globalPtIds->GetValue( i )] = i; @@ -451,7 +451,7 @@ Elem2dTo3dInfo buildElem2dTo3dElemAndFaces( vtkSmartPointer< vtkDataSet > faceMe // Let's build the elem2d to elem3d mapping. // We need to find the 3d elements (and only the 3d elements, so we can safely ignore the others). // First we compute the mapping from all the boundary nodes to the 3d elements that rely on those nodes. - std::map< vtkIdType, stdVector< vtkIdType > > nodesToCellsFull; + stdMap< vtkIdType, stdVector< vtkIdType > > nodesToCellsFull; for( vtkIdType i = 0; i < boundary->GetNumberOfCells(); ++i ) { vtkIdType const cellId = boundaryCells->GetValue( i ); @@ -468,7 +468,7 @@ Elem2dTo3dInfo buildElem2dTo3dElemAndFaces( vtkSmartPointer< vtkDataSet > faceMe } // Then we only keep the duplicated nodes. It's only for optimisation purpose. - std::map< vtkIdType, std::set< vtkIdType > > nodesToCells; + stdMap< vtkIdType, std::set< vtkIdType > > nodesToCells; { // scope reduction std::set< vtkIdType > allDuplicatedNodes; for( std::size_t i = 0; i < collocatedNodes.size(); ++i ) @@ -526,7 +526,7 @@ Elem2dTo3dInfo buildElem2dTo3dElemAndFaces( vtkSmartPointer< vtkDataSet > faceMe } // Here, we collect all the 3d elements that are concerned by at least one of those duplicated elements. - std::map< vtkIdType, std::set< vtkIdType > > elem3dToDuplicatedNodes; + stdMap< vtkIdType, std::set< vtkIdType > > elem3dToDuplicatedNodes; for( vtkIdType const & n: duplicatedPointOfElem2d ) { auto const ncs = nodesToCells.find( n ); diff --git a/src/coreComponents/mesh/generators/VTKMeshGenerator.hpp b/src/coreComponents/mesh/generators/VTKMeshGenerator.hpp index 5f3e99e3a0c..4c9998d1c1b 100644 --- a/src/coreComponents/mesh/generators/VTKMeshGenerator.hpp +++ b/src/coreComponents/mesh/generators/VTKMeshGenerator.hpp @@ -149,7 +149,7 @@ class VTKMeshGenerator : public ExternalMeshGeneratorBase string_array m_faceBlockNames; /// Maps the face block name to its vtk mesh instance. - std::map< string, vtkSmartPointer< vtkDataSet > > m_faceBlockMeshes; + stdMap< string, vtkSmartPointer< vtkDataSet > > m_faceBlockMeshes; /// Names of VTK nodesets to import string_array m_nodesetNames; diff --git a/src/coreComponents/mesh/generators/VTKMeshGeneratorTools.cpp b/src/coreComponents/mesh/generators/VTKMeshGeneratorTools.cpp index bd90fbc839f..dac362159a9 100644 --- a/src/coreComponents/mesh/generators/VTKMeshGeneratorTools.cpp +++ b/src/coreComponents/mesh/generators/VTKMeshGeneratorTools.cpp @@ -204,7 +204,7 @@ exchangeBoundingBoxes( vtkDataSet & dataSet, MPI_Comm mpiComm ) // https://gitlab.kitware.com/vtk/vtk/-/blob/1f0e4b2d0be7cd328795131642b5bf7984f681c1/Parallel/DIY/vtkDIYGhostUtilities.txx#L300 // It makes some simplifications (e.g. just one input dataset per rank). - using BlockType = std::map< int, vtkBoundingBox >; + using BlockType = stdMap< int, vtkBoundingBox >; diy::mpi::communicator comm( mpiComm ); diy::Master master( comm, 1, -1, diff --git a/src/coreComponents/mesh/generators/VTKUtilities.cpp b/src/coreComponents/mesh/generators/VTKUtilities.cpp index e56c8cc0c53..0095fee52cd 100644 --- a/src/coreComponents/mesh/generators/VTKUtilities.cpp +++ b/src/coreComponents/mesh/generators/VTKUtilities.cpp @@ -262,7 +262,7 @@ buildElemToNodesImpl( AllMeshes & meshes, localIndex const num3dCells = LvArray::integerConversion< localIndex >( meshes.getMainMesh()->GetNumberOfCells() ); localIndex num2dCells = 0; - std::map< string, CollocatedNodes > collocatedNodesMap; + stdMap< string, CollocatedNodes > collocatedNodesMap; for( auto & [fractureName, fractureMesh]: meshes.getFaceBlocks() ) { num2dCells += fractureMesh->GetNumberOfCells(); @@ -572,7 +572,7 @@ AllMeshes loadAllMeshes( Path const & filePath, { int const lastRank = MpiWrapper::commSize() - 1; vtkSmartPointer< vtkDataSet > main = loadMesh( filePath, mainBlockName ); - std::map< string, vtkSmartPointer< vtkDataSet > > faces; + stdMap< string, vtkSmartPointer< vtkDataSet > > faces; for( string const & faceBlockName: faceBlockNames ) { @@ -661,7 +661,7 @@ AllMeshes redistributeByCellGraph( AllMeshes & input, }(); // Extract the partition information related to the fracture mesh. - std::map< string, array1d< pmet_idx_t > > newFracturePartitions; + stdMap< string, array1d< pmet_idx_t > > newFracturePartitions; vtkIdType fracOffset = input.getMainMesh()->GetNumberOfCells(); for( auto const & nf: input.getFaceBlocks() ) { @@ -683,7 +683,7 @@ AllMeshes redistributeByCellGraph( AllMeshes & input, vtkSmartPointer< vtkPartitionedDataSet > const splitMesh = splitMeshByPartition( input.getMainMesh(), numRanks, newPartitions.toViewConst() ); vtkSmartPointer< vtkUnstructuredGrid > finalMesh = vtk::redistribute( *splitMesh, MPI_COMM_GEOS ); // ... and then for the fractures. - std::map< string, vtkSmartPointer< vtkDataSet > > finalFractures; + stdMap< string, vtkSmartPointer< vtkDataSet > > finalFractures; for( auto const & [fractureName, fracture]: input.getFaceBlocks() ) { vtkSmartPointer< vtkPartitionedDataSet > const splitFracMesh = splitMeshByPartition( fracture, numRanks, newFracturePartitions[fractureName].toViewConst() ); @@ -901,7 +901,7 @@ ensureNoEmptyRank( vtkSmartPointer< vtkDataSet > mesh, AllMeshes redistributeMeshes( integer const logLevel, vtkSmartPointer< vtkDataSet > loadedMesh, - std::map< string, vtkSmartPointer< vtkDataSet > > & namesToFractures, + stdMap< string, vtkSmartPointer< vtkDataSet > > & namesToFractures, MPI_Comm const comm, PartitionMethod const method, int const partitionRefinement, @@ -1110,10 +1110,10 @@ ElementType convertVtkToGeosxElementType( vtkCell *cell ) * @param[in] mesh a vtk grid * @return a map of cells grouped by type */ -std::map< ElementType, stdVector< vtkIdType > > +stdMap< ElementType, stdVector< vtkIdType > > splitCellsByType( vtkDataSet & mesh ) { - std::map< ElementType, stdVector< vtkIdType > > typeToCells; + stdMap< ElementType, stdVector< vtkIdType > > typeToCells; vtkIdType const numCells = mesh.GetNumberOfCells(); // Count the number of each cell type @@ -1187,7 +1187,7 @@ splitCellsByType( vtkDataSet & mesh ) * @return a map of cell lists grouped by type */ CellMapType -splitCellsByTypeAndAttribute( std::map< ElementType, stdVector< vtkIdType > > & typeToCells, +splitCellsByTypeAndAttribute( stdMap< ElementType, stdVector< vtkIdType > > & typeToCells, vtkDataArray * const attributeDataArray ) { CellMapType typeToAttributeToCells; @@ -1647,7 +1647,7 @@ CellMapType buildCellMap( vtkDataSet & mesh, string const & attributeName ) { // First, pass through all VTK cells and split them int sub-lists based on type. - std::map< ElementType, stdVector< vtkIdType > > typeToCells = splitCellsByType( mesh ); + stdMap< ElementType, stdVector< vtkIdType > > typeToCells = splitCellsByType( mesh ); // Now, actually split into groups according to region attribute, if present vtkDataArray * const attributeDataArray = @@ -1902,7 +1902,7 @@ void printMeshStatistics( vtkDataSet &, CellMapType const & cellMap, MPI_Comm const comm ) { - auto accumulateElemsCount = []( std::map< ElementType, globalIndex > & elemsTarget ) -> globalIndex + auto accumulateElemsCount = []( stdMap< ElementType, globalIndex > & elemsTarget ) -> globalIndex { return std::accumulate( std::begin( elemsTarget ), std::end( elemsTarget ), globalIndex{0}, @@ -1913,10 +1913,10 @@ void printMeshStatistics( vtkDataSet &, int const rank = MpiWrapper::commRank( comm ); int const size = MpiWrapper::commSize( comm ); - std::map< ElementType, globalIndex > totalLocalElems; - std::map< ElementType, globalIndex > minLocalElemsCounts; - std::map< ElementType, globalIndex > avgLocalElemsCounts; - std::map< ElementType, globalIndex > maxLocalElemsCounts; + stdMap< ElementType, globalIndex > totalLocalElems; + stdMap< ElementType, globalIndex > minLocalElemsCounts; + stdMap< ElementType, globalIndex > avgLocalElemsCounts; + stdMap< ElementType, globalIndex > maxLocalElemsCounts; for( auto const & typeToCells : cellMap ) { @@ -2142,7 +2142,7 @@ void writeSurfaces( integer const logLevel, { return; } - std::map< string, SortedArray< localIndex > > & nodeSets = cellBlockManager.getNodeSets(); + stdMap< string, SortedArray< localIndex > > & nodeSets = cellBlockManager.getNodeSets(); for( auto const & surfaceCells: cellMap.at( ElementType::Polygon ) ) { diff --git a/src/coreComponents/mesh/generators/VTKUtilities.hpp b/src/coreComponents/mesh/generators/VTKUtilities.hpp index a6f574e8c5f..5b8ce2ccdd0 100644 --- a/src/coreComponents/mesh/generators/VTKUtilities.hpp +++ b/src/coreComponents/mesh/generators/VTKUtilities.hpp @@ -56,7 +56,7 @@ ENUM_STRINGS( PartitionMethod, * This should be an unordered_map, but some outdated standard libraries on some systems * do not provide std::hash specialization for enums. This is not performance critical though. */ -using CellMapType = std::map< ElementType, std::unordered_map< int, stdVector< vtkIdType > > >; +using CellMapType = stdMap< ElementType, std::unordered_map< int, stdVector< vtkIdType > > >; /** * @brief Return a VTK controller for multiprocessing. @@ -78,7 +78,7 @@ class AllMeshes * @param faceBlocks The fractures meshes. */ AllMeshes( vtkSmartPointer< vtkDataSet > const & main, - std::map< string, vtkSmartPointer< vtkDataSet > > const & faceBlocks ) + stdMap< string, vtkSmartPointer< vtkDataSet > > const & faceBlocks ) : m_main( main ), m_faceBlocks( faceBlocks ) { } @@ -94,7 +94,7 @@ class AllMeshes /** * @return a mapping linking the name of each face block to its mesh. */ - std::map< string, vtkSmartPointer< vtkDataSet > > & getFaceBlocks() + stdMap< string, vtkSmartPointer< vtkDataSet > > & getFaceBlocks() { return m_faceBlocks; } @@ -112,7 +112,7 @@ class AllMeshes * @brief Defines the face blocks/fractures. * @param faceBlocks A map which connects each name of the face block to its mesh. */ - void setFaceBlocks( std::map< string, vtkSmartPointer< vtkDataSet > > const & faceBlocks ) + void setFaceBlocks( stdMap< string, vtkSmartPointer< vtkDataSet > > const & faceBlocks ) { m_faceBlocks = faceBlocks; } @@ -122,7 +122,7 @@ class AllMeshes vtkSmartPointer< vtkDataSet > m_main; /// The face meshes (namely the fractures). - std::map< string, vtkSmartPointer< vtkDataSet > > m_faceBlocks; + stdMap< string, vtkSmartPointer< vtkDataSet > > m_faceBlocks; }; /** @@ -158,7 +158,7 @@ findNeighborRanks( stdVector< vtkBoundingBox > boundingBoxes ); AllMeshes redistributeMeshes( integer const logLevel, vtkSmartPointer< vtkDataSet > loadedMesh, - std::map< string, vtkSmartPointer< vtkDataSet > > & namesToFractures, + stdMap< string, vtkSmartPointer< vtkDataSet > > & namesToFractures, MPI_Comm const comm, PartitionMethod const method, int const partitionRefinement, diff --git a/src/coreComponents/mesh/mpiCommunications/CommunicationTools.cpp b/src/coreComponents/mesh/mpiCommunications/CommunicationTools.cpp index 074c7b02b96..c0a7718ca1f 100644 --- a/src/coreComponents/mesh/mpiCommunications/CommunicationTools.cpp +++ b/src/coreComponents/mesh/mpiCommunications/CommunicationTools.cpp @@ -293,7 +293,7 @@ void CommunicationTools::assignNewGlobalIndices( ObjectManagerBase & manager, void CommunicationTools::assignNewGlobalIndices( ElementRegionManager & elementManager, - std::map< std::pair< localIndex, localIndex >, std::set< localIndex > > const & newElems ) + stdMap< std::pair< localIndex, localIndex >, std::set< localIndex > > const & newElems ) { localIndex numberOfNewObjectsHere = 0; for( auto const & iter : newElems ) @@ -446,7 +446,7 @@ CommunicationTools:: * @param mpiRankToNodes For each involved mpi rank, all the nodes that need to be sent. * @return The sanitized mapping: only the ranks with the minimal MPI rank will be in charged of sending the proper nodes. */ -std::map< int, array1d< globalIndex > > reorganizeRequestedNodes( std::map< int, array1d< globalIndex > > const & mpiRankToNodes ) +stdMap< int, array1d< globalIndex > > reorganizeRequestedNodes( stdMap< int, array1d< globalIndex > > const & mpiRankToNodes ) { class MinInt { @@ -466,9 +466,9 @@ std::map< int, array1d< globalIndex > > reorganizeRequestedNodes( std::map< int, int m_value = std::numeric_limits< int >::max(); }; - std::map< int, array1d< globalIndex > > minMpiRankToNodes; // Will be returned. + stdMap< int, array1d< globalIndex > > minMpiRankToNodes; // Will be returned. - std::map< globalIndex, MinInt > nodeToMpiRank; + stdMap< globalIndex, MinInt > nodeToMpiRank; for( auto const & [mpiRank, nodes]: mpiRankToNodes ) { for( globalIndex const & gi: nodes ) @@ -496,7 +496,7 @@ void CommunicationTools::findMatchedPartitionBoundaryNodes( NodeManager & nodeMa auto const & g2l = nodeManager.globalToLocalMap(); integer const numNeighbors = LvArray::integerConversion< integer >( allNeighbors.size() ); - std::map< int, array1d< globalIndex > > requestedMatchesMap; // The key of the map is the MPI rank of the `neighbor`, not the index. + stdMap< int, array1d< globalIndex > > requestedMatchesMap; // The key of the map is the MPI rank of the `neighbor`, not the index. { array1d< array1d< globalIndex > > const neighborBoundaryNodes = this->buildNeighborPartitionBoundaryObjects( nodeManager, allNeighbors ); diff --git a/src/coreComponents/mesh/mpiCommunications/CommunicationTools.hpp b/src/coreComponents/mesh/mpiCommunications/CommunicationTools.hpp index 83ab6a92c49..742cab1874b 100644 --- a/src/coreComponents/mesh/mpiCommunications/CommunicationTools.hpp +++ b/src/coreComponents/mesh/mpiCommunications/CommunicationTools.hpp @@ -73,7 +73,7 @@ class CommunicationTools std::set< localIndex > const & indexList ); static void assignNewGlobalIndices( ElementRegionManager & elementManager, - std::map< std::pair< localIndex, localIndex >, std::set< localIndex > > const & newElems ); + stdMap< std::pair< localIndex, localIndex >, std::set< localIndex > > const & newElems ); void setupGhosts( MeshLevel & meshLevel, stdVector< NeighborCommunicator > & neighbors, diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp b/src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp index c42693925ec..f6cfd852492 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp @@ -1071,7 +1071,7 @@ class PhysicsSolverBase : public ExecutableGroup std::function< void( CRSMatrix< real64, globalIndex >, array1d< real64 > ) > m_assemblyCallback; /// Timers for the aggregate profiling of the solver - std::map< std::string, std::chrono::system_clock::duration > m_timers; + stdMap< std::string, std::chrono::system_clock::duration > m_timers; private: /// List of names of regions the solver will be applied to diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index 96deb0b5f71..6053633b69c 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -1095,7 +1095,7 @@ void CompositionalMultiphaseBase::computeHydrostaticEquilibrium( DomainPartition // Step 1: count individual equilibriums (there may be multiple ones) - std::map< string, localIndex > equilNameToEquilId; + stdMap< string, localIndex > equilNameToEquilId; localIndex equilCounter = 0; fsManager.forSubGroups< EquilibriumInitialCondition >( [&] ( EquilibriumInitialCondition const & bc ) @@ -1529,7 +1529,7 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, // Step 1: count individual source flux boundary conditions - std::map< string, localIndex > bcNameToBcId; + stdMap< string, localIndex > bcNameToBcId; localIndex bcCounter = 0; fsManager.forSubGroups< SourceFluxBoundaryCondition >( [&] ( SourceFluxBoundaryCondition const & bc ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp index faaf94487f1..a739d96cf2d 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp @@ -648,7 +648,7 @@ void FlowSolverBase::updatePorosityAndPermeability( SurfaceElementSubRegion & su void FlowSolverBase::findMinMaxElevationInEquilibriumTarget( DomainPartition & domain, // cannot be const... - std::map< string, localIndex > const & equilNameToEquilId, + stdMap< string, localIndex > const & equilNameToEquilId, arrayView1d< real64 > const & maxElevation, arrayView1d< real64 > const & minElevation ) const { @@ -701,7 +701,7 @@ void FlowSolverBase::findMinMaxElevationInEquilibriumTarget( DomainPartition & d void FlowSolverBase::computeSourceFluxSizeScalingFactor( real64 const & time, real64 const & dt, DomainPartition & domain, // cannot be const... - std::map< string, localIndex > const & bcNameToBcId, + stdMap< string, localIndex > const & bcNameToBcId, arrayView1d< globalIndex > const & bcAllSetsSize ) const { FieldSpecificationManager & fsManager = FieldSpecificationManager::getInstance(); @@ -768,7 +768,7 @@ void FlowSolverBase::saveAquiferConvergedState( real64 const & time, // Step 1: count individual aquifers - std::map< string, localIndex > aquiferNameToAquiferId; + stdMap< string, localIndex > aquiferNameToAquiferId; localIndex aquiferCounter = 0; fsManager.forSubGroups< AquiferBoundaryCondition >( [&] ( AquiferBoundaryCondition const & bc ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.hpp b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.hpp index 110c27f293e..e67bae98e2e 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.hpp @@ -183,7 +183,7 @@ class FlowSolverBase : public PhysicsSolverBase * @param[out] minElevation the min elevation for each initial condition */ void findMinMaxElevationInEquilibriumTarget( DomainPartition & domain, // cannot be const... - std::map< string, localIndex > const & equilNameToEquilId, + stdMap< string, localIndex > const & equilNameToEquilId, arrayView1d< real64 > const & maxElevation, arrayView1d< real64 > const & minElevation ) const; @@ -198,7 +198,7 @@ class FlowSolverBase : public PhysicsSolverBase void computeSourceFluxSizeScalingFactor( real64 const & time, real64 const & dt, DomainPartition & domain, // cannot be const... - std::map< string, localIndex > const & bcNameToBcId, + stdMap< string, localIndex > const & bcNameToBcId, arrayView1d< globalIndex > const & bcAllSetsSize ) const; integer numberOfDofsPerCell() const { return m_numDofPerCell; } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ImmiscibleMultiphaseFlow.cpp b/src/coreComponents/physicsSolvers/fluidFlow/ImmiscibleMultiphaseFlow.cpp index 8bf52f5b351..31c73baa1ca 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ImmiscibleMultiphaseFlow.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ImmiscibleMultiphaseFlow.cpp @@ -896,7 +896,7 @@ void ImmiscibleMultiphaseFlow::applySourceFluxBC( real64 const time, // Step 1: count individual source flux boundary conditions - std::map< string, localIndex > bcNameToBcId; + stdMap< string, localIndex > bcNameToBcId; localIndex bcCounter = 0; fsManager.forSubGroups< SourceFluxBoundaryCondition >( [&] ( SourceFluxBoundaryCondition const & bc ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp index 9c458cfdc01..fe1443d824c 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp @@ -777,7 +777,7 @@ void ReactiveCompositionalMultiphaseOBL::applySourceFluxBC( real64 const time, // Step 1: count individual source flux boundary conditions - std::map< string, localIndex > bcNameToBcId; + stdMap< string, localIndex > bcNameToBcId; localIndex bcCounter = 0; fsManager.forSubGroups< SourceFluxBoundaryCondition >( [&] ( SourceFluxBoundaryCondition const & bc ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index acad649f2ba..9e3cc362ab6 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -404,7 +404,7 @@ void SinglePhaseBase::computeHydrostaticEquilibrium( DomainPartition & domain ) // Step 1: count individual equilibriums (there may be multiple ones) - std::map< string, localIndex > equilNameToEquilId; + stdMap< string, localIndex > equilNameToEquilId; localIndex equilCounter = 0; fsManager.forSubGroups< EquilibriumInitialCondition >( [&] ( EquilibriumInitialCondition const & bc ) @@ -938,7 +938,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, // Step 1: count individual source flux boundary conditions - std::map< string, localIndex > bcNameToBcId; + stdMap< string, localIndex > bcNameToBcId; localIndex bcCounter = 0; fsManager.forSubGroups< SourceFluxBoundaryCondition >( [&] ( SourceFluxBoundaryCondition const & bc ) diff --git a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.hpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.hpp index 04ad72ab3e7..4d5d3ddf0d6 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.hpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.hpp @@ -102,7 +102,7 @@ class SolidMechanicsAugmentedLagrangianContact : public ContactSolverBase void forFiniteElementOnFractureSubRegions( string const & meshName, LAMBDA && lambda ) const { - std::map< string, + stdMap< string, array1d< localIndex > > const & faceTypesToFaceElements = m_faceTypesToFaceElements.at( meshName ); for( const auto & [finiteElementName, faceElementList] : faceTypesToFaceElements ) @@ -129,7 +129,7 @@ class SolidMechanicsAugmentedLagrangianContact : public ContactSolverBase bool const isStickState = true; - std::map< string, array1d< localIndex > > const & + stdMap< string, array1d< localIndex > > const & faceTypesToFaceElements = m_faceTypesToFaceElementsStick.at( meshName ); for( const auto & [finiteElementName, faceElementList] : faceTypesToFaceElements ) @@ -156,7 +156,7 @@ class SolidMechanicsAugmentedLagrangianContact : public ContactSolverBase bool const isStickState = false; - std::map< string, array1d< localIndex > > const & + stdMap< string, array1d< localIndex > > const & faceTypesToFaceElements = m_faceTypesToFaceElementsSlip.at( meshName ); for( const auto & [finiteElementName, faceElementList] : faceTypesToFaceElements ) @@ -218,16 +218,16 @@ class SolidMechanicsAugmentedLagrangianContact : public ContactSolverBase void computeTolerances( DomainPartition & domain ) const; /// Finite element type to face element index map - std::map< string, std::map< string, array1d< localIndex > > > m_faceTypesToFaceElements; + stdMap< string, stdMap< string, array1d< localIndex > > > m_faceTypesToFaceElements; /// Finite element type to face element index map (stick mode) - std::map< string, std::map< string, array1d< localIndex > > > m_faceTypesToFaceElementsStick; + stdMap< string, stdMap< string, array1d< localIndex > > > m_faceTypesToFaceElementsStick; /// Finite element type to face element index map (slip mode) - std::map< string, std::map< string, array1d< localIndex > > > m_faceTypesToFaceElementsSlip; + stdMap< string, stdMap< string, array1d< localIndex > > > m_faceTypesToFaceElementsSlip; /// Finite element type to finite element object map - std::map< string, std::unique_ptr< geos::finiteElement::FiniteElementBase > > m_faceTypeToFiniteElements; + stdMap< string, std::unique_ptr< geos::finiteElement::FiniteElementBase > > m_faceTypeToFiniteElements; struct viewKeyStruct : ContactSolverBase::viewKeyStruct { diff --git a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.hpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.hpp index 9c62fcc90b7..cdada46d1a6 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.hpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.hpp @@ -127,7 +127,7 @@ class SolidMechanicsLagrangeContactBubbleStab : public ContactSolverBase template< typename LAMBDA > void forFiniteElementOnFractureSubRegions( string const & meshName, LAMBDA && lambda ) const { - std::map< string, + stdMap< string, array1d< localIndex > > const & faceTypesToFaceElements = m_faceTypesToFaceElements.at( meshName ); for( const auto & [finiteElementName, faceElementList] : faceTypesToFaceElements ) @@ -152,7 +152,7 @@ class SolidMechanicsLagrangeContactBubbleStab : public ContactSolverBase { bool const isStickState = true; - std::map< string, array1d< localIndex > > const & + stdMap< string, array1d< localIndex > > const & faceTypesToFaceElements = m_faceTypesToFaceElementsStick.at( meshName ); for( const auto & [finiteElementName, faceElementList] : faceTypesToFaceElements ) @@ -217,16 +217,16 @@ class SolidMechanicsLagrangeContactBubbleStab : public ContactSolverBase SparsityPatternView< globalIndex > const & pattern ) const; /// Finite element type to face element index map - std::map< string, std::map< string, array1d< localIndex > > > m_faceTypesToFaceElements; + stdMap< string, stdMap< string, array1d< localIndex > > > m_faceTypesToFaceElements; /// Finite element type to face element index map (stick mode) - std::map< string, std::map< string, array1d< localIndex > > > m_faceTypesToFaceElementsStick; + stdMap< string, stdMap< string, array1d< localIndex > > > m_faceTypesToFaceElementsStick; /// Finite element type to face element index map (slip mode) - std::map< string, std::map< string, array1d< localIndex > > > m_faceTypesToFaceElementsSlip; + stdMap< string, stdMap< string, array1d< localIndex > > > m_faceTypesToFaceElementsSlip; /// Finite element type to finite element object map - std::map< string, std::unique_ptr< geos::finiteElement::FiniteElementBase > > m_faceTypeToFiniteElements; + stdMap< string, std::unique_ptr< geos::finiteElement::FiniteElementBase > > m_faceTypeToFiniteElements; struct viewKeyStruct : ContactSolverBase::viewKeyStruct { diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp index 1ce3a8aad3f..f75aba05a2d 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp @@ -39,7 +39,7 @@ CommandLineOptions g_commandLineOptions; struct TestInputs { string xmlInput; - std::map< string, string > tableFiles; + stdMap< string, string > tableFiles; string sourceFluxName; string sinkFluxName; @@ -149,7 +149,7 @@ class FlowStatisticsTest : public ::testing::Test { public: - void writeTableFiles( std::map< string, string > const & files ) + void writeTableFiles( stdMap< string, string > const & files ) { for( auto const & [fileName, content] : files ) { diff --git a/src/coreComponents/unitTests/fluidFlowTests/testTransmissibility.cpp b/src/coreComponents/unitTests/fluidFlowTests/testTransmissibility.cpp index ddc0d074630..874f4f3bc79 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testTransmissibility.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testTransmissibility.cpp @@ -120,7 +120,7 @@ enum class Axis : integer { X = 0, Y = 1, Z = 2 }; * @brief a map of the half transmissibilities, from the first to the second cell identified by the * key global id. */ -using TransmissibilityMap = std::map< std::pair< globalIndex, globalIndex >, real64 >; +using TransmissibilityMap = stdMap< std::pair< globalIndex, globalIndex >, real64 >; /** * @brief the parameters for a given test instance. diff --git a/src/coreComponents/unitTests/linearAlgebraTests/testDofManager.cpp b/src/coreComponents/unitTests/linearAlgebraTests/testDofManager.cpp index c7a0dc9212d..95580913fc4 100644 --- a/src/coreComponents/unitTests/linearAlgebraTests/testDofManager.cpp +++ b/src/coreComponents/unitTests/linearAlgebraTests/testDofManager.cpp @@ -505,7 +505,7 @@ class DofManagerMatrixTest : public DofManagerTestBase }; void addFields( stdVector< FieldDesc > fields, - std::map< std::pair< string, string >, CouplingDesc > couplings = {} ) + stdMap< std::pair< string, string >, CouplingDesc > couplings = {} ) { for( FieldDesc const & f : fields ) { @@ -539,14 +539,14 @@ class DofManagerSparsityTest : public DofManagerMatrixTest< LAI > using Base::addFields; void test( stdVector< FieldDesc > fields, - std::map< std::pair< string, string >, CouplingDesc > couplings = {} ); + stdMap< std::pair< string, string >, CouplingDesc > couplings = {} ); }; TYPED_TEST_SUITE_P( DofManagerSparsityTest ); template< typename LAI > void DofManagerSparsityTest< LAI >::test( stdVector< FieldDesc > fields, - std::map< std::pair< string, string >, CouplingDesc > couplings ) + stdMap< std::pair< string, string >, CouplingDesc > couplings ) { addFields( fields, couplings ); @@ -856,13 +856,13 @@ class DofManagerRestrictorTest : public DofManagerMatrixTest< LAI > void test( stdVector< FieldDesc > fields, stdVector< DofManager::SubComponent > selection, - std::map< std::pair< string, string >, CouplingDesc > couplings = {} ); + stdMap< std::pair< string, string >, CouplingDesc > couplings = {} ); }; template< typename LAI > void DofManagerRestrictorTest< LAI >::test( stdVector< FieldDesc > fields, stdVector< DofManager::SubComponent > selection, - std::map< std::pair< string, string >, CouplingDesc > couplings ) + stdMap< std::pair< string, string >, CouplingDesc > couplings ) { addFields( fields, couplings ); @@ -900,7 +900,7 @@ void DofManagerRestrictorTest< LAI >::test( stdVector< FieldDesc > fields, } // Filter the couplings of selected fields - std::map< std::pair< string, string >, CouplingDesc > couplingsSelected; + stdMap< std::pair< string, string >, CouplingDesc > couplingsSelected; for( auto it = couplings.begin(); it != couplings.end(); ++it ) { std::pair< string, string > const & fieldNames = it->first; From b0a7883aea2f85ed0dd686466466c6f19d205933 Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 25 Aug 2025 14:41:11 +0200 Subject: [PATCH 2/3] xsd --- src/coreComponents/schema/schema.xsd | 13 +++++++++++++ src/coreComponents/schema/schema.xsd.other | 6 ++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 1872c78a1fb..09e5b146167 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -595,6 +595,10 @@ + + + + @@ -5456,6 +5460,7 @@ Information output from lower logLevels is added with the desired log level + @@ -5548,6 +5553,14 @@ Information output from lower logLevels is added with the desired log level + + + + + + + + diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index 7e346b0e2c0..59d5acdfa68 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -486,7 +486,7 @@ - + @@ -1441,12 +1441,13 @@ - + + @@ -1539,6 +1540,7 @@ + From b5387d2a64aacec3e1d2ffe4d4e6289b72800367 Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 25 Aug 2025 15:01:06 +0200 Subject: [PATCH 3/3] Uncrustify --- src/coreComponents/common/format/table/TableData.hpp | 2 +- src/coreComponents/mesh/FaceElementSubRegion.cpp | 2 +- .../contact/SolidMechanicsAugmentedLagrangianContact.hpp | 2 +- .../contact/SolidMechanicsLagrangeContactBubbleStab.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/common/format/table/TableData.hpp b/src/coreComponents/common/format/table/TableData.hpp index f076a91260f..d089b1b9e2b 100644 --- a/src/coreComponents/common/format/table/TableData.hpp +++ b/src/coreComponents/common/format/table/TableData.hpp @@ -188,9 +188,9 @@ class TableData2D /** * @brief Add a cell to the table. If necessary, create automatically the containing column & row. * @tparam T The value passed to addCell (can be any type). - * @param value CellData value to be added. * @param rowValue The value of the row containing the cell. * @param columnValue The value of the column containing the cell. + * @param value CellData value to be added. */ template< typename T > void addCell( RowType rowValue, ColumnType columnValue, T const & value ); diff --git a/src/coreComponents/mesh/FaceElementSubRegion.cpp b/src/coreComponents/mesh/FaceElementSubRegion.cpp index 3507d6d7f44..70250dc76b3 100644 --- a/src/coreComponents/mesh/FaceElementSubRegion.cpp +++ b/src/coreComponents/mesh/FaceElementSubRegion.cpp @@ -637,7 +637,7 @@ buildCollocatedEdgeBuckets( stdMap< globalIndex, globalIndex > const & reference * @return The computed mapping. */ stdMap< localIndex, localIndex > buildReferenceCollocatedEdges( stdMap< std::pair< globalIndex, globalIndex >, std::set< localIndex > > const & collocatedEdgeBuckets, - arrayView1d< integer const > const edgeGhostRanks ) + arrayView1d< integer const > const edgeGhostRanks ) { stdMap< localIndex, localIndex > referenceCollocatedEdges; diff --git a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.hpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.hpp index 4d5d3ddf0d6..44260b296ed 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.hpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.hpp @@ -103,7 +103,7 @@ class SolidMechanicsAugmentedLagrangianContact : public ContactSolverBase { stdMap< string, - array1d< localIndex > > const & faceTypesToFaceElements = m_faceTypesToFaceElements.at( meshName ); + array1d< localIndex > > const & faceTypesToFaceElements = m_faceTypesToFaceElements.at( meshName ); for( const auto & [finiteElementName, faceElementList] : faceTypesToFaceElements ) { diff --git a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.hpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.hpp index cdada46d1a6..61079b90f84 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.hpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.hpp @@ -128,7 +128,7 @@ class SolidMechanicsLagrangeContactBubbleStab : public ContactSolverBase void forFiniteElementOnFractureSubRegions( string const & meshName, LAMBDA && lambda ) const { stdMap< string, - array1d< localIndex > > const & faceTypesToFaceElements = m_faceTypesToFaceElements.at( meshName ); + array1d< localIndex > > const & faceTypesToFaceElements = m_faceTypesToFaceElements.at( meshName ); for( const auto & [finiteElementName, faceElementList] : faceTypesToFaceElements ) {