diff --git a/src/coreComponents/constitutive/ConstitutiveManager.cpp b/src/coreComponents/constitutive/ConstitutiveManager.cpp index e3e59bb755..3babd88203 100644 --- a/src/coreComponents/constitutive/ConstitutiveManager.cpp +++ b/src/coreComponents/constitutive/ConstitutiveManager.cpp @@ -43,6 +43,7 @@ ConstitutiveManager::~ConstitutiveManager() Group * ConstitutiveManager::createChild( string const & childKey, string const & childName ) { + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< ConstitutiveBase > material = ConstitutiveBase::CatalogInterface::factory( childKey, childName, this ); return ®isterGroup< ConstitutiveBase >( childName, std::move( material ) ); } diff --git a/src/coreComponents/dataRepository/xmlWrapper.cpp b/src/coreComponents/dataRepository/xmlWrapper.cpp index 19f0f223e1..e0ada302c4 100644 --- a/src/coreComponents/dataRepository/xmlWrapper.cpp +++ b/src/coreComponents/dataRepository/xmlWrapper.cpp @@ -171,7 +171,7 @@ void xmlDocument::addIncludedXML( xmlNode & targetNode, int const level ) return isAbsolutePath( fileName ) ? fileName : joinPath( splitPath( currentFilePath ).first, fileName ); }(); - GEOS_LOG_RANK_0( "Included additionnal XML file: " << getAbsolutePath( includedFilePath ) ); + GEOS_LOG_RANK_0( "Included additional XML file: " << getAbsolutePath( includedFilePath ) ); xmlDocument includedXmlDocument; xmlResult const result = includedXmlDocument.loadFile( includedFilePath, hasNodeFileInfo() ); diff --git a/src/coreComponents/events/EventBase.cpp b/src/coreComponents/events/EventBase.cpp index 6b9a2f2c0c..6212dc89d6 100644 --- a/src/coreComponents/events/EventBase.cpp +++ b/src/coreComponents/events/EventBase.cpp @@ -122,7 +122,7 @@ EventBase::CatalogInterface::CatalogType & EventBase::getCatalog() Group * EventBase::createChild( string const & childKey, string const & childName ) { - GEOS_LOG_RANK_0( "Adding Event: " << childKey << ", " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< EventBase > event = EventBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup< EventBase >( childName, std::move( event ) ); } diff --git a/src/coreComponents/events/EventManager.cpp b/src/coreComponents/events/EventManager.cpp index a30706b8aa..69c3a46dd9 100644 --- a/src/coreComponents/events/EventManager.cpp +++ b/src/coreComponents/events/EventManager.cpp @@ -93,7 +93,7 @@ EventManager::~EventManager() Group * EventManager::createChild( string const & childKey, string const & childName ) { - GEOS_LOG_RANK_0( "Adding Event: " << childKey << ", " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< EventBase > event = EventBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup< EventBase >( childName, std::move( event ) ); } diff --git a/src/coreComponents/events/tasks/TasksManager.cpp b/src/coreComponents/events/tasks/TasksManager.cpp index ea0eea28a4..9f95aefb2a 100644 --- a/src/coreComponents/events/tasks/TasksManager.cpp +++ b/src/coreComponents/events/tasks/TasksManager.cpp @@ -38,6 +38,7 @@ TasksManager::~TasksManager() Group * TasksManager::createChild( string const & childKey, string const & childName ) { + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< TaskBase > task = TaskBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup< TaskBase >( childName, std::move( task ) ); } diff --git a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp index 307437e748..155596304d 100644 --- a/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp +++ b/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp @@ -51,6 +51,7 @@ FieldSpecificationManager & FieldSpecificationManager::getInstance() Group * FieldSpecificationManager::createChild( string const & childKey, string const & childName ) { + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< FieldSpecificationBase > bc = FieldSpecificationBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup( childName, std::move( bc ) ); } diff --git a/src/coreComponents/fileIO/Outputs/OutputManager.cpp b/src/coreComponents/fileIO/Outputs/OutputManager.cpp index 157328fa24..42ea71af77 100644 --- a/src/coreComponents/fileIO/Outputs/OutputManager.cpp +++ b/src/coreComponents/fileIO/Outputs/OutputManager.cpp @@ -39,7 +39,7 @@ OutputManager::~OutputManager() Group * OutputManager::createChild( string const & childKey, string const & childName ) { - GEOS_LOG_RANK_0( "Adding Output: " << childKey << ", " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< OutputBase > output = OutputBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup< OutputBase >( childName, std::move( output ) ); } diff --git a/src/coreComponents/finiteElement/FiniteElementDiscretizationManager.cpp b/src/coreComponents/finiteElement/FiniteElementDiscretizationManager.cpp index 2e7c8e3ccc..8bd43f0cda 100644 --- a/src/coreComponents/finiteElement/FiniteElementDiscretizationManager.cpp +++ b/src/coreComponents/finiteElement/FiniteElementDiscretizationManager.cpp @@ -40,6 +40,7 @@ FiniteElementDiscretizationManager::~FiniteElementDiscretizationManager() Group * FiniteElementDiscretizationManager::createChild( string const & childKey, string const & childName ) { // These objects should probably not be registered on managed group... + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< Group > fem = Group::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup( childName, std::move( fem ) ); } diff --git a/src/coreComponents/finiteVolume/FiniteVolumeManager.cpp b/src/coreComponents/finiteVolume/FiniteVolumeManager.cpp index 14161b5a0e..500d1da5ec 100644 --- a/src/coreComponents/finiteVolume/FiniteVolumeManager.cpp +++ b/src/coreComponents/finiteVolume/FiniteVolumeManager.cpp @@ -42,6 +42,7 @@ FiniteVolumeManager::~FiniteVolumeManager() Group * FiniteVolumeManager::createChild( string const & childKey, string const & childName ) { + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); if( childKey == HybridMimeticDiscretization::catalogName() ) { std::unique_ptr< HybridMimeticDiscretization > hm = std::make_unique< HybridMimeticDiscretization >( childName, this ); diff --git a/src/coreComponents/functions/FunctionManager.cpp b/src/coreComponents/functions/FunctionManager.cpp index 738432e89d..0cd5a92ba9 100644 --- a/src/coreComponents/functions/FunctionManager.cpp +++ b/src/coreComponents/functions/FunctionManager.cpp @@ -53,7 +53,7 @@ FunctionManager & FunctionManager::getInstance() Group * FunctionManager::createChild( string const & functionCatalogKey, string const & functionName ) { - GEOS_LOG_RANK_0( " " << functionCatalogKey << ": " << functionName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), functionCatalogKey, functionName ) ); std::unique_ptr< FunctionBase > function = FunctionBase::CatalogInterface::factory( functionCatalogKey, functionName, this ); return &this->registerGroup< FunctionBase >( functionName, std::move( function ) ); } diff --git a/src/coreComponents/mesh/ElementRegionManager.cpp b/src/coreComponents/mesh/ElementRegionManager.cpp index 89c0500338..18da04ec06 100644 --- a/src/coreComponents/mesh/ElementRegionManager.cpp +++ b/src/coreComponents/mesh/ElementRegionManager.cpp @@ -75,7 +75,7 @@ Group * ElementRegionManager::createChild( string const & childKey, string const { GEOS_ERROR_IF( !(CatalogInterface::hasKeyName( childKey )), "KeyName ("<getGroup( ElementRegionManager::groupKeyStruct::elementRegionsGroup() ); return &elementRegions.registerGroup( childName, diff --git a/src/coreComponents/mesh/ExternalDataSourceBase.cpp b/src/coreComponents/mesh/ExternalDataSourceBase.cpp index 2f3ea7bf8a..157fe3de31 100644 --- a/src/coreComponents/mesh/ExternalDataSourceBase.cpp +++ b/src/coreComponents/mesh/ExternalDataSourceBase.cpp @@ -27,7 +27,7 @@ ExternalDataSourceBase::ExternalDataSourceBase( string const & name, Group * con Group * ExternalDataSourceBase::createChild( string const & childKey, string const & childName ) { - GEOS_LOG_RANK_0( "Adding External Data Source: " << childKey << ", " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< ExternalDataSourceBase > event = ExternalDataSourceBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup< ExternalDataSourceBase >( childName, std::move( event ) ); } diff --git a/src/coreComponents/mesh/ExternalDataSourceManager.cpp b/src/coreComponents/mesh/ExternalDataSourceManager.cpp index 5cd6eb6fd8..8a22203af8 100644 --- a/src/coreComponents/mesh/ExternalDataSourceManager.cpp +++ b/src/coreComponents/mesh/ExternalDataSourceManager.cpp @@ -35,7 +35,7 @@ ExternalDataSourceManager::~ExternalDataSourceManager() Group * ExternalDataSourceManager::createChild( string const & childKey, string const & childName ) { - GEOS_LOG_RANK_0( "Adding External Data Source: " << childKey << ", " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< ExternalDataSourceBase > externalDataSource = ExternalDataSourceBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup< ExternalDataSourceBase >( childName, std::move( externalDataSource ) ); } diff --git a/src/coreComponents/mesh/MeshManager.cpp b/src/coreComponents/mesh/MeshManager.cpp index e5bc0979c8..662b06002b 100644 --- a/src/coreComponents/mesh/MeshManager.cpp +++ b/src/coreComponents/mesh/MeshManager.cpp @@ -20,7 +20,6 @@ #include "mesh/mpiCommunications/SpatialPartition.hpp" #include "generators/CellBlockManagerABC.hpp" -#include "generators/MeshGeneratorBase.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" #include "common/TimingMacros.hpp" @@ -43,7 +42,7 @@ MeshManager::~MeshManager() Group * MeshManager::createChild( string const & childKey, string const & childName ) { - GEOS_LOG_RANK_0( "Adding Mesh: " << childKey << ", " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< MeshGeneratorBase > mesh = MeshGeneratorBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup< MeshGeneratorBase >( childName, std::move( mesh ) ); } @@ -81,7 +80,7 @@ void MeshManager::generateMeshes( DomainPartition & domain ) void MeshManager::generateMeshLevels( DomainPartition & domain ) { - this->forSubGroups< MeshGeneratorBase >( [&]( MeshGeneratorBase & meshGen ) + forSubGroups< MeshGeneratorBase >( [&]( MeshGeneratorBase & meshGen ) { string const & meshName = meshGen.getName(); domain.getMeshBodies().registerGroup< MeshBody >( meshName ).createMeshLevel( MeshBody::groupStructKeys::baseDiscretizationString() ); @@ -126,50 +125,10 @@ void MeshManager::importFields( DomainPartition & domain ) } GEOS_LOG_RANK_0( GEOS_FMT( "{}: importing field data from mesh dataset", generator.getName() ) ); - - auto const importFields = [&generator]( ElementRegionBase const & region, - ElementSubRegionBase & subRegion, - MeshGeneratorBase::Block block, - std::map< string, string > const & fieldsMapping, - FieldIdentifiers & fieldsToBeSync ) - { - std::unordered_set< string > const materialWrapperNames = getMaterialWrapperNames( subRegion ); - // Writing properties - for( auto const & pair : fieldsMapping ) - { - string const & meshFieldName = pair.first; - string const & geosFieldName = pair.second; - // Find destination - if( !subRegion.hasWrapper( geosFieldName ) ) - { - // Skip - the user may have not enabled a particular physics model/solver on this destination region. - if( generator.getLogLevel() >= 1 ) - { - GEOS_LOG_RANK_0( "Skipping import of " << meshFieldName << " -> " << geosFieldName << - " on " << region.getName() << "/" << subRegion.getName() << " (field not found)" ); - } - - continue; - } - - // Now that we know that the subRegion has this wrapper, - // we can add the geosFieldName to the list of fields to synchronize - fieldsToBeSync.addElementFields( { geosFieldName }, { region.getName() } ); - WrapperBase & wrapper = subRegion.getWrapperBase( geosFieldName ); - if( generator.getLogLevel() >= 1 ) - { - GEOS_LOG_RANK_0( "Importing field " << meshFieldName << " into " << geosFieldName << - " on " << region.getName() << "/" << subRegion.getName() ); - } - - bool const isMaterialField = materialWrapperNames.count( geosFieldName ) > 0 && wrapper.numArrayDims() > 1; - generator.importFieldOnArray( block, subRegion.getName(), meshFieldName, isMaterialField, wrapper ); - } - }; - - dataRepository::Group & meshLevels = domain.getMeshBody( generator.getName() ).getMeshLevels(); - meshLevels.forSubGroups< MeshLevel >( [&]( MeshLevel & meshLevel ) + MeshBody & meshBody = domain.getMeshBody( generator.getName() ); + meshBody.forMeshLevels( [&]( MeshLevel & meshLevel ) { + GEOS_LOG_RANK_0( GEOS_FMT( " mesh level = {}", meshLevel.getName() ) ); FieldIdentifiers fieldsToBeSync; meshLevel.getElemManager().forElementSubRegionsComplete< CellElementSubRegion >( [&]( localIndex, @@ -177,7 +136,8 @@ void MeshManager::importFields( DomainPartition & domain ) ElementRegionBase const & region, CellElementSubRegion & subRegion ) { - importFields( region, subRegion, MeshGeneratorBase::Block::VOLUMIC, generator.getVolumicFieldsMapping(), fieldsToBeSync ); + GEOS_LOG_RANK_0( GEOS_FMT( " volumic fields on {}/{}", region.getName(), subRegion.getName() ) ); + importFields( generator, region.getName(), subRegion, MeshGeneratorBase::Block::VOLUMIC, generator.getVolumicFieldsMapping(), fieldsToBeSync ); } ); meshLevel.getElemManager().forElementSubRegionsComplete< FaceElementSubRegion >( [&]( localIndex, @@ -185,7 +145,8 @@ void MeshManager::importFields( DomainPartition & domain ) ElementRegionBase const & region, FaceElementSubRegion & subRegion ) { - importFields( region, subRegion, MeshGeneratorBase::Block::SURFACIC, generator.getSurfacicFieldsMapping(), fieldsToBeSync ); + GEOS_LOG_RANK_0( GEOS_FMT( " surfaic fields on {}/{}", region.getName(), subRegion.getName() ) ); + importFields( generator, region.getName(), subRegion, MeshGeneratorBase::Block::SURFACIC, generator.getSurfacicFieldsMapping(), fieldsToBeSync ); } ); CommunicationTools::getInstance().synchronizeFields( fieldsToBeSync, meshLevel, domain.getNeighbors(), false ); // TODO Validate this. } ); @@ -197,4 +158,43 @@ void MeshManager::importFields( DomainPartition & domain ) } ); } +void MeshManager::importFields( MeshGeneratorBase const & generator, + string const & regionName, + ElementSubRegionBase & subRegion, + MeshGeneratorBase::Block const block, + std::map< string, string > const & fieldsMapping, + FieldIdentifiers & fieldsToBeSync ) +{ + std::unordered_set< string > const materialWrapperNames = getMaterialWrapperNames( subRegion ); + // Writing properties + for( auto const & pair : fieldsMapping ) + { + string const & meshFieldName = pair.first; + string const & geosFieldName = pair.second; + // Find destination + if( !subRegion.hasWrapper( geosFieldName ) ) + { + // Skip - the user may have not enabled a particular physics model/solver on this destination region. + if( generator.getLogLevel() >= 1 ) + { + GEOS_LOG_RANK_0( GEOS_FMT( " Skipping import of {} -> {} (field not found)", meshFieldName, geosFieldName ) ); + } + + continue; + } + + // Now that we know that the subRegion has this wrapper, + // we can add the geosFieldName to the list of fields to synchronize + fieldsToBeSync.addElementFields( { geosFieldName }, { regionName } ); + WrapperBase & wrapper = subRegion.getWrapperBase( geosFieldName ); + if( generator.getLogLevel() >= 1 ) + { + GEOS_LOG_RANK_0( GEOS_FMT( " {} -> {}", meshFieldName, geosFieldName ) ); + } + + bool const isMaterialField = materialWrapperNames.count( geosFieldName ) > 0 && wrapper.numArrayDims() > 1; + generator.importFieldOnArray( block, subRegion.getName(), meshFieldName, isMaterialField, wrapper ); + } +} + } /* namespace geos */ diff --git a/src/coreComponents/mesh/MeshManager.hpp b/src/coreComponents/mesh/MeshManager.hpp index 9f8ed2aaaa..d2f7eff56d 100644 --- a/src/coreComponents/mesh/MeshManager.hpp +++ b/src/coreComponents/mesh/MeshManager.hpp @@ -22,6 +22,7 @@ #include "dataRepository/Group.hpp" #include "mesh/DomainPartition.hpp" +#include "generators/MeshGeneratorBase.hpp" namespace geos { @@ -74,6 +75,22 @@ class MeshManager : public dataRepository::Group */ void importFields( DomainPartition & domain ); + /** + * @brief Import fields data + * @param[in] generator reference to mesh generator + * @param[in] regionName name of the region + * @param[in] subRegion reference to the subregion + * @param[in] block block type + * @param[in] fieldsMapping mapping for fields + * @param[out] fieldsToBeSync list of fields to synchronize + */ + static void importFields( MeshGeneratorBase const & generator, + string const & regionName, + ElementSubRegionBase & subRegion, + MeshGeneratorBase::Block block, + std::map< string, string > const & fieldsMapping, + FieldIdentifiers & fieldsToBeSync ); + private: /** diff --git a/src/coreComponents/mesh/ParticleManager.cpp b/src/coreComponents/mesh/ParticleManager.cpp index 34ddd5ae39..314c23120b 100644 --- a/src/coreComponents/mesh/ParticleManager.cpp +++ b/src/coreComponents/mesh/ParticleManager.cpp @@ -88,7 +88,7 @@ Group * ParticleManager::createChild( string const & childKey, string const & ch { GEOS_ERROR_IF( !(CatalogInterface::hasKeyName( childKey )), "KeyName ("<getGroup( ParticleManager::groupKeyStruct::particleRegionsGroup() ); return &particleRegions.registerGroup( childName, diff --git a/src/coreComponents/mesh/generators/MeshGeneratorBase.cpp b/src/coreComponents/mesh/generators/MeshGeneratorBase.cpp index 45971d410b..555bef9216 100644 --- a/src/coreComponents/mesh/generators/MeshGeneratorBase.cpp +++ b/src/coreComponents/mesh/generators/MeshGeneratorBase.cpp @@ -29,7 +29,7 @@ MeshGeneratorBase::MeshGeneratorBase( string const & name, Group * const parent Group * MeshGeneratorBase::createChild( string const & childKey, string const & childName ) { - GEOS_LOG_RANK_0( "Adding Mesh attribute: " << childKey << ", " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< MeshComponentBase > comp = MeshComponentBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup< MeshComponentBase >( childName, std::move( comp ) ); } diff --git a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp index 2b9d94ca06..6d791068df 100644 --- a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp +++ b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp @@ -125,7 +125,7 @@ void VTKMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockManager { vtk::AllMeshes allMeshes; - GEOS_LOG_LEVEL_RANK_0( 2, " reading the dataset..." ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': reading the dataset...", catalogName(), getName() ) ); if( !m_filePath.empty()) { @@ -183,33 +183,33 @@ void VTKMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockManager } } - GEOS_LOG_LEVEL_RANK_0( 2, " redistributing mesh..." ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': redistributing mesh...", catalogName(), getName() ) ); vtk::AllMeshes redistributedMeshes = vtk::redistributeMeshes( getLogLevel(), allMeshes.getMainMesh(), allMeshes.getFaceBlocks(), comm, m_partitionMethod, m_partitionRefinement, m_useGlobalIds ); m_vtkMesh = redistributedMeshes.getMainMesh(); m_faceBlockMeshes = redistributedMeshes.getFaceBlocks(); - GEOS_LOG_LEVEL_RANK_0( 2, " finding neighbor ranks..." ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': finding neighbor ranks...", catalogName(), getName() ) ); std::vector< vtkBoundingBox > boxes = vtk::exchangeBoundingBoxes( *m_vtkMesh, comm ); std::vector< int > const neighbors = vtk::findNeighborRanks( std::move( boxes ) ); partition.setMetisNeighborList( std::move( neighbors ) ); - GEOS_LOG_LEVEL_RANK_0( 2, " done!" ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': done!", catalogName(), getName() ) ); } - GEOS_LOG_RANK_0( GEOS_FMT( "{} '{}': generating GEOSX mesh data structure", catalogName(), getName() ) ); + GEOS_LOG_RANK_0( GEOS_FMT( "{} '{}': generating GEOS mesh data structure", catalogName(), getName() ) ); - GEOS_LOG_LEVEL_RANK_0( 2, " preprocessing..." ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': preprocessing...", catalogName(), getName() ) ); m_cellMap = vtk::buildCellMap( *m_vtkMesh, m_attributeName ); - GEOS_LOG_LEVEL_RANK_0( 2, " writing nodes..." ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': writing nodes...", catalogName(), getName() ) ); cellBlockManager.setGlobalLength( writeNodes( getLogLevel(), *m_vtkMesh, m_nodesetNames, cellBlockManager, this->m_translate, this->m_scale ) ); - GEOS_LOG_LEVEL_RANK_0( 2, " writing cells..." ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': writing cells...", catalogName(), getName() ) ); writeCells( getLogLevel(), *m_vtkMesh, m_cellMap, cellBlockManager ); - GEOS_LOG_LEVEL_RANK_0( 2, " writing surfaces..." ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': writing surfaces...", catalogName(), getName() ) ); writeSurfaces( getLogLevel(), *m_vtkMesh, m_cellMap, cellBlockManager ); - GEOS_LOG_LEVEL_RANK_0( 2, " building connectivity maps..." ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': building connectivity maps...", catalogName(), getName() ) ); cellBlockManager.buildMaps(); for( auto const & [name, mesh]: m_faceBlockMeshes ) @@ -217,7 +217,7 @@ void VTKMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockManager vtk::importFractureNetwork( name, mesh, m_vtkMesh, cellBlockManager ); } - GEOS_LOG_LEVEL_RANK_0( 2, " done!" ); + GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': done!", catalogName(), getName() ) ); vtk::printMeshStatistics( *m_vtkMesh, m_cellMap, comm ); } diff --git a/src/coreComponents/mesh/generators/WellGeneratorBase.cpp b/src/coreComponents/mesh/generators/WellGeneratorBase.cpp index 56e7195544..f64e0e9b7d 100644 --- a/src/coreComponents/mesh/generators/WellGeneratorBase.cpp +++ b/src/coreComponents/mesh/generators/WellGeneratorBase.cpp @@ -80,7 +80,7 @@ Group * WellGeneratorBase::createChild( string const & childKey, string const & // keep track of the perforations that have been added m_perforationList.emplace_back( childName ); - GEOS_LOG_RANK_0( "Adding Well attribute: " << childKey << ", " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); return ®isterGroup< Perforation >( childName ); } else diff --git a/src/coreComponents/mesh/simpleGeometricObjects/GeometricObjectManager.cpp b/src/coreComponents/mesh/simpleGeometricObjects/GeometricObjectManager.cpp index bb964e0c6d..c5843dbc74 100644 --- a/src/coreComponents/mesh/simpleGeometricObjects/GeometricObjectManager.cpp +++ b/src/coreComponents/mesh/simpleGeometricObjects/GeometricObjectManager.cpp @@ -53,7 +53,7 @@ GeometricObjectManager & GeometricObjectManager::getInstance() Group * GeometricObjectManager::createChild( string const & childKey, string const & childName ) { - GEOS_LOG_RANK_0( "Adding Geometric Object: " << childKey << ", " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); std::unique_ptr< SimpleGeometricObjectBase > geometriObject = SimpleGeometricObjectBase::CatalogInterface::factory( childKey, childName, this ); return &this->registerGroup< SimpleGeometricObjectBase >( childName, std::move( geometriObject ) ); } diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverManager.cpp b/src/coreComponents/physicsSolvers/PhysicsSolverManager.cpp index 0bf40f860d..0267c7df81 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverManager.cpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverManager.cpp @@ -49,7 +49,7 @@ Group * PhysicsSolverManager::createChild( string const & childKey, string const Group * rval = nullptr; if( PhysicsSolverBase::CatalogInterface::hasKeyName( childKey ) ) { - GEOS_LOG_RANK_0( "Adding Solver of type " << childKey << ", named " << childName ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: adding {} {}", getName(), childKey, childName ) ); rval = ®isterGroup( childName, PhysicsSolverBase::CatalogInterface::factory( childKey, childName, this ) ); }