From 1010335c3db5958e1d96ef322419699b23602ce0 Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 11 Dec 2024 16:29:20 +0100 Subject: [PATCH 01/30] apply loglevel documentation --- src/coreComponents/events/CMakeLists.txt | 1 + src/coreComponents/events/EventBase.cpp | 7 +- src/coreComponents/events/EventManager.cpp | 5 +- src/coreComponents/events/LogLevelsInfo.hpp | 57 +++++++++++++++ src/coreComponents/events/tasks/TaskBase.cpp | 3 + src/coreComponents/events/tasks/TaskBase.hpp | 2 +- src/coreComponents/fileIO/CMakeLists.txt | 1 + src/coreComponents/fileIO/LogLevelsInfo.hpp | 58 +++++++++++++++ .../fileIO/Outputs/ChomboIO.cpp | 5 +- .../fileIO/Outputs/TimeHistoryOutput.cpp | 4 +- .../fileIO/Outputs/VTKOutput.cpp | 5 +- src/coreComponents/mesh/CMakeLists.txt | 1 + src/coreComponents/mesh/DomainPartition.cpp | 5 +- src/coreComponents/mesh/LogLevelsInfo.hpp | 70 +++++++++++++++++++ .../mesh/generators/VTKMeshGenerator.cpp | 22 +++--- .../mesh/generators/VTKWellGenerator.cpp | 3 +- .../mesh/generators/WellGeneratorBase.cpp | 2 + .../mesh/generators/WellGeneratorBase.hpp | 1 + .../physicsSolvers/LogLevelsInfo.hpp | 6 -- .../physicsSolvers/fluidFlow/CMakeLists.txt | 4 +- .../fluidFlow/LogLevelsInfo.hpp | 12 ++++ .../fluidFlow/StencilDataCollection.cpp | 11 +-- .../wells/CompositionalMultiphaseWell.cpp | 37 +++++----- .../fluidFlow/wells/LogLevelsInfo.hpp | 22 +++++- .../fluidFlow/wells/SinglePhaseWell.cpp | 11 ++- .../fluidFlow/wells/WellControls.cpp | 2 + .../fluidFlow/wells/WellSolverBase.cpp | 3 +- .../inducedSeismicity/CMakeLists.txt | 1 + .../inducedSeismicity/LogLevelsInfo.hpp | 51 ++++++++++++++ .../inducedSeismicity/QuasiDynamicEQ.cpp | 10 ++- .../PoromechanicsInitialization.cpp | 2 - .../SolidMechanicsStateReset.cpp | 2 - .../wavePropagation/CMakeLists.txt | 1 + .../wavePropagation/LogLevelsInfo.hpp | 57 +++++++++++++++ .../isotropic/AcousticWaveEquationSEM.cpp | 20 +++--- .../wavePropagation/shared/WaveSolverBase.cpp | 7 +- 36 files changed, 436 insertions(+), 75 deletions(-) create mode 100644 src/coreComponents/events/LogLevelsInfo.hpp create mode 100644 src/coreComponents/fileIO/LogLevelsInfo.hpp create mode 100644 src/coreComponents/mesh/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp diff --git a/src/coreComponents/events/CMakeLists.txt b/src/coreComponents/events/CMakeLists.txt index 3a7fe6a7a92..3c4131f2ab7 100644 --- a/src/coreComponents/events/CMakeLists.txt +++ b/src/coreComponents/events/CMakeLists.txt @@ -7,6 +7,7 @@ set( events_headers HaltEvent.hpp PeriodicEvent.hpp SoloEvent.hpp + LogLevelsInfo.hpp tasks/TaskBase.hpp tasks/TasksManager.hpp ) diff --git a/src/coreComponents/events/EventBase.cpp b/src/coreComponents/events/EventBase.cpp index 5a185d1c719..8b418459ebb 100644 --- a/src/coreComponents/events/EventBase.cpp +++ b/src/coreComponents/events/EventBase.cpp @@ -20,6 +20,7 @@ #include "EventBase.hpp" #include +#include "events/LogLevelsInfo.hpp" #include "common/DataTypes.hpp" #include "common/TimingMacros.hpp" @@ -243,9 +244,9 @@ bool EventBase::execute( real64 const time_n, EventBase * subEvent = static_cast< EventBase * >( this->getSubGroups()[m_currentSubEvent] ); // Print debug information for logLevel >= 1 - GEOS_LOG_LEVEL_RANK_0( 1, - " SubEvent: " << m_currentSubEvent << " (" << subEvent->getName() << "), dt_request=" << subEvent->getCurrentEventDtRequest() << ", forecast=" << - subEvent->getForecast() ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::EventExecution, + " SubEvent: " << m_currentSubEvent << " (" << subEvent->getName() << "), dt_request=" << subEvent->getCurrentEventDtRequest() << ", forecast=" << + subEvent->getForecast() ); if( subEvent->isReadyForExec() ) { diff --git a/src/coreComponents/events/EventManager.cpp b/src/coreComponents/events/EventManager.cpp index 8e176f41d4a..7e76307cf64 100644 --- a/src/coreComponents/events/EventManager.cpp +++ b/src/coreComponents/events/EventManager.cpp @@ -23,6 +23,7 @@ #include "events/EventBase.hpp" #include "common/MpiWrapper.hpp" #include "common/Units.hpp" +#include "events/LogLevelsInfo.hpp" namespace geos { @@ -182,8 +183,8 @@ bool EventManager::run( DomainPartition & domain ) subEvent->checkEvents( m_time, m_dt, m_cycle, domain ); // Print debug information for logLevel >= 1 - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Event: {} ({}), dt_request={}, forecast={}", - m_currentSubEvent, subEvent->getName(), subEvent->getCurrentEventDtRequest(), subEvent->getForecast() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::EventExecution, GEOS_FMT( "Event: {} ({}), dt_request={}, forecast={}", + m_currentSubEvent, subEvent->getName(), subEvent->getCurrentEventDtRequest(), subEvent->getForecast() ) ); // Execute, signal events bool earlyReturn = false; diff --git a/src/coreComponents/events/LogLevelsInfo.hpp b/src/coreComponents/events/LogLevelsInfo.hpp new file mode 100644 index 00000000000..86cafb422ba --- /dev/null +++ b/src/coreComponents/events/LogLevelsInfo.hpp @@ -0,0 +1,57 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_EVENTS_LOGLEVELSINFO_HPP +#define GEOS_EVENTS_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct Initialization +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Information on Initialization"; } +}; + +struct EventExecution +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Informations on events executed"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_EVENTS_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/events/tasks/TaskBase.cpp b/src/coreComponents/events/tasks/TaskBase.cpp index 1a885b95ec2..7415fb701ce 100644 --- a/src/coreComponents/events/tasks/TaskBase.cpp +++ b/src/coreComponents/events/tasks/TaskBase.cpp @@ -29,6 +29,9 @@ TaskBase::TaskBase( string const & name, ExecutableGroup( name, parent ) { setInputFlags( InputFlags::OPTIONAL_NONUNIQUE ); + + addLogLevel< logInfo::Initialization >(); + addLogLevel< logInfo::EventExecution >(); } TaskBase::~TaskBase() diff --git a/src/coreComponents/events/tasks/TaskBase.hpp b/src/coreComponents/events/tasks/TaskBase.hpp index c8744e18e15..b7d76a0f037 100644 --- a/src/coreComponents/events/tasks/TaskBase.hpp +++ b/src/coreComponents/events/tasks/TaskBase.hpp @@ -22,7 +22,7 @@ #include - +#include "events/LogLevelsInfo.hpp" #include "dataRepository/ExecutableGroup.hpp" #include "common/DataTypes.hpp" namespace geos diff --git a/src/coreComponents/fileIO/CMakeLists.txt b/src/coreComponents/fileIO/CMakeLists.txt index 3b70d456190..b6f482749a4 100644 --- a/src/coreComponents/fileIO/CMakeLists.txt +++ b/src/coreComponents/fileIO/CMakeLists.txt @@ -1,5 +1,6 @@ # Specify all headers set( fileIO_headers + LogLevelsInfo.hpp Outputs/BlueprintOutput.hpp Outputs/OutputBase.hpp Outputs/OutputManager.hpp diff --git a/src/coreComponents/fileIO/LogLevelsInfo.hpp b/src/coreComponents/fileIO/LogLevelsInfo.hpp new file mode 100644 index 00000000000..e0c87161a19 --- /dev/null +++ b/src/coreComponents/fileIO/LogLevelsInfo.hpp @@ -0,0 +1,58 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_FILEIO_LOGLEVELSINFO_HPP +#define GEOS_FILEIO_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct OutputEvents +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Information on output events, VTK/ChomboIO"; } +}; + + +struct Writing +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Information on buffered data in an HDF5 file "; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_FILEIO_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/fileIO/Outputs/ChomboIO.cpp b/src/coreComponents/fileIO/Outputs/ChomboIO.cpp index 674f1e4eace..9becf1a6e5c 100644 --- a/src/coreComponents/fileIO/Outputs/ChomboIO.cpp +++ b/src/coreComponents/fileIO/Outputs/ChomboIO.cpp @@ -20,6 +20,7 @@ #include "ChomboIO.hpp" #include "mesh/MeshLevel.hpp" #include "mesh/DomainPartition.hpp" +#include "fileIO/LogLevelsInfo.hpp" #include "fileIO/coupling/ChomboCoupler.hpp" #include @@ -61,6 +62,8 @@ ChomboIO::ChomboIO( string const & name, Group * const parent ): setInputFlag( InputFlags::OPTIONAL ). setDefaultValue( 0 ). setDescription( "True iff geos should use the pressures chombo writes out." ); + + addLogLevel< logInfo::OutputEvents >(); } ChomboIO::~ChomboIO() @@ -86,7 +89,7 @@ bool ChomboIO::execute( real64 const GEOS_UNUSED_PARAM( time_n ), { GEOS_ERROR_IF( m_waitForInput && m_inputPath == "/INVALID_INPUT_PATH", "Waiting for input but no input path was specified." ); - GEOS_LOG_LEVEL_RANK_0( 1, "Initializing chombo coupling" ); + GEOS_LOG_LEVEL_INFO( logInfo::OutputEvents, "Initializing chombo coupling" ); m_coupler = new ChomboCoupler( MPI_COMM_GEOS, m_outputPath, m_inputPath, domain.getMeshBody( 0 ).getBaseDiscretization() ); diff --git a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp index d01edac3dcf..9426cf52e95 100644 --- a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp @@ -16,6 +16,7 @@ #include "TimeHistoryOutput.hpp" #include "fileIO/timeHistory/HDFFile.hpp" +#include "fileIO/LogLevelsInfo.hpp" #if defined(GEOS_USE_PYGEOSX) #include "fileIO/python/PyHistoryOutputType.hpp" @@ -57,6 +58,7 @@ TimeHistoryOutput::TimeHistoryOutput( string const & name, setRestartFlags( RestartFlags::WRITE_AND_READ ). setDescription( "The current history record to be written, on restart from an earlier time allows use to remove invalid future history." ); + addLogLevel< logInfo::Initialization >(); } void TimeHistoryOutput::initCollectorParallel( DomainPartition const & domain, HistoryCollection & collector ) @@ -129,7 +131,7 @@ void TimeHistoryOutput::initializePostInitialConditionsPostSubGroups() } DomainPartition & domain = this->getGroupByPath< DomainPartition >( "/Problem/domain" ); - GEOS_LOG_LEVEL_BY_RANK( 3, GEOS_FMT( "TimeHistory: '{}' initializing data collectors.", this->getName() ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::Initialization, GEOS_FMT( "TimeHistory: '{}' initializing data collectors.", this->getName() ) ); for( auto collectorPath : m_collectorPaths ) { try diff --git a/src/coreComponents/fileIO/Outputs/VTKOutput.cpp b/src/coreComponents/fileIO/Outputs/VTKOutput.cpp index da364d0e4db..890c0a2a7c7 100644 --- a/src/coreComponents/fileIO/Outputs/VTKOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/VTKOutput.cpp @@ -18,6 +18,7 @@ */ #include "VTKOutput.hpp" +#include "fileIO/LogLevelsInfo.hpp" #if defined(GEOS_USE_PYGEOSX) @@ -90,6 +91,8 @@ VTKOutput::VTKOutput( string const & name, setApplyDefaultValue( m_outputRegionType ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Output region types. Valid options: ``" + EnumStrings< vtk::VTKRegionTypes >::concat( "``, ``" ) + "``" ); + + addLogLevel< logInfo::OutputEvents >(); } VTKOutput::~VTKOutput() @@ -146,7 +149,7 @@ bool VTKOutput::execute( real64 const time_n, real64 const GEOS_UNUSED_PARAM ( eventProgress ), DomainPartition & domain ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: writing {} at time {} s (cycle number {})", getName(), m_fieldNames, time_n + dt, cycleNumber )); + GEOS_LOG_LEVEL_INFO( logInfo::OutputEvents, GEOS_FMT( "{}: writing {} at time {} s (cycle number {})", getName(), m_fieldNames, time_n + dt, cycleNumber )); m_writer.setWriteGhostCells( m_writeGhostCells ); m_writer.setWriteFaceElementsAs3D ( m_writeFaceElementsAs3D ); diff --git a/src/coreComponents/mesh/CMakeLists.txt b/src/coreComponents/mesh/CMakeLists.txt index f6fbb61e2e3..c4ae542bd1d 100644 --- a/src/coreComponents/mesh/CMakeLists.txt +++ b/src/coreComponents/mesh/CMakeLists.txt @@ -12,6 +12,7 @@ set( mesh_headers ElementType.hpp EmbeddedSurfaceNodeManager.hpp EmbeddedSurfaceSubRegion.hpp + LogLevelsInfo.hpp MeshFields.hpp FaceElementSubRegion.hpp FaceManager.hpp diff --git a/src/coreComponents/mesh/DomainPartition.cpp b/src/coreComponents/mesh/DomainPartition.cpp index 0dd8a8a3623..28e5bb7eb35 100644 --- a/src/coreComponents/mesh/DomainPartition.cpp +++ b/src/coreComponents/mesh/DomainPartition.cpp @@ -25,6 +25,7 @@ #include "mesh/ObjectManagerBase.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" #include "mesh/mpiCommunications/SpatialPartition.hpp" +#include "mesh/LogLevelsInfo.hpp" namespace geos @@ -45,6 +46,8 @@ DomainPartition::DomainPartition( string const & name, registerGroup( groupKeys.meshBodies ); registerGroup< constitutive::ConstitutiveManager >( groupKeys.constitutiveManager ); + + addLogLevel< logInfo::PartitionCommunication >(); } @@ -262,7 +265,7 @@ void DomainPartition::setupCommunications( bool use_nonblocking ) } else { - GEOS_LOG_LEVEL_RANK_0( 3, "No communication setup is needed since it is a shallow copy of the base discretization." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::PartitionCommunication, "No communication setup is needed since it is a shallow copy of the base discretization." ); } } } ); diff --git a/src/coreComponents/mesh/LogLevelsInfo.hpp b/src/coreComponents/mesh/LogLevelsInfo.hpp new file mode 100644 index 00000000000..9e4a0dc6da5 --- /dev/null +++ b/src/coreComponents/mesh/LogLevelsInfo.hpp @@ -0,0 +1,70 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_LOGLEVELSINFO_HPP +#define GEOS_PHYSICSSOLVERS_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct MeshState +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "Well phase volume fraction change information"; } +}; + +struct Statistics +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "well statistics information"; } +}; + +struct PartitionCommunication +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Domain partition setup communication"; } +}; + +struct VTKSteps +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "Display VTK mesh generator steps"; } +}; + + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp index d1402d21821..24601c7b23e 100644 --- a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp +++ b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp @@ -75,6 +75,8 @@ VTKMeshGenerator::VTKMeshGenerator( string const & name, " If set to 0 (default value), the GlobalId arrays in the input mesh are used if available, and generated otherwise." " If set to a negative value, the GlobalId arrays in the input mesh are not used, and generated global Ids are automatically generated." " If set to a positive value, the GlobalId arrays in the input mesh are used and required, and the simulation aborts if they are not available" ); + + addLogLevel< logInfo::VTKSteps >(); } void VTKMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockManager, SpatialPartition & partition ) @@ -88,35 +90,35 @@ void VTKMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockManager GEOS_LOG_RANK_0( GEOS_FMT( "{} '{}': reading mesh from {}", catalogName(), getName(), m_filePath ) ); { - GEOS_LOG_LEVEL_RANK_0( 2, " reading the dataset..." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " reading the dataset..." ); vtk::AllMeshes allMeshes = vtk::loadAllMeshes( m_filePath, m_mainBlockName, m_faceBlockNames ); - GEOS_LOG_LEVEL_RANK_0( 2, " redistributing mesh..." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " redistributing mesh..." ); 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_INFO_RANK_0( logInfo::VTKSteps, " finding neighbor ranks..." ); 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_INFO_RANK_0( logInfo::VTKSteps, " done!" ); } GEOS_LOG_RANK_0( GEOS_FMT( "{} '{}': generating GEOSX mesh data structure", catalogName(), getName() ) ); - GEOS_LOG_LEVEL_RANK_0( 2, " preprocessing..." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " preprocessing..." ); m_cellMap = vtk::buildCellMap( *m_vtkMesh, m_attributeName ); - GEOS_LOG_LEVEL_RANK_0( 2, " writing nodes..." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " writing nodes..." ); 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_INFO_RANK_0( logInfo::VTKSteps, " writing cells..." ); writeCells( getLogLevel(), *m_vtkMesh, m_cellMap, cellBlockManager ); - GEOS_LOG_LEVEL_RANK_0( 2, " writing surfaces..." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " writing surfaces..." ); writeSurfaces( getLogLevel(), *m_vtkMesh, m_cellMap, cellBlockManager ); - GEOS_LOG_LEVEL_RANK_0( 2, " building connectivity maps..." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " building connectivity maps..." ); cellBlockManager.buildMaps(); for( auto const & [name, mesh]: m_faceBlockMeshes ) @@ -124,7 +126,7 @@ void VTKMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockManager vtk::importFractureNetwork( name, mesh, m_vtkMesh, cellBlockManager ); } - GEOS_LOG_LEVEL_RANK_0( 2, " done!" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " done!" ); vtk::printMeshStatistics( *m_vtkMesh, m_cellMap, comm ); } diff --git a/src/coreComponents/mesh/generators/VTKWellGenerator.cpp b/src/coreComponents/mesh/generators/VTKWellGenerator.cpp index c6294c35683..440c00dc721 100644 --- a/src/coreComponents/mesh/generators/VTKWellGenerator.cpp +++ b/src/coreComponents/mesh/generators/VTKWellGenerator.cpp @@ -38,6 +38,7 @@ VTKWellGenerator::VTKWellGenerator( string const & name, Group * const parent ): setRestartFlags( RestartFlags::NO_WRITE ). setDescription( "Path to the well file" ); + addLogLevel< logInfo::VTKSteps >(); } void VTKWellGenerator::fillPolylineDataStructure( ) @@ -49,7 +50,7 @@ void VTKWellGenerator::fillPolylineDataStructure( ) GEOS_LOG_RANK_0( GEOS_FMT( "{} '{}': reading well from {}", catalogName(), getName(), m_filePath ) ); { - GEOS_LOG_LEVEL_RANK_0( 2, " reading the dataset..." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " reading the dataset..." ); vtk::AllMeshes allMeshes = vtk::loadAllMeshes( m_filePath, "main", array1d< string >()); vtkSmartPointer< vtkDataSet > loadedMesh = allMeshes.getMainMesh(); controller->Broadcast( loadedMesh, 0 ); diff --git a/src/coreComponents/mesh/generators/WellGeneratorBase.cpp b/src/coreComponents/mesh/generators/WellGeneratorBase.cpp index 1617aa3fdb4..01e3fbd5b57 100644 --- a/src/coreComponents/mesh/generators/WellGeneratorBase.cpp +++ b/src/coreComponents/mesh/generators/WellGeneratorBase.cpp @@ -72,6 +72,8 @@ WellGeneratorBase::WellGeneratorBase( string const & name, Group * const parent setInputFlag( InputFlags::REQUIRED ). setSizedFromParent( 0 ). setDescription( "Name of the set of constraints associated with this well" ); + + addLogLevel< logInfo::VTKSteps >(); } Group * WellGeneratorBase::createChild( string const & childKey, string const & childName ) diff --git a/src/coreComponents/mesh/generators/WellGeneratorBase.hpp b/src/coreComponents/mesh/generators/WellGeneratorBase.hpp index 99f1af95924..a5309460ccc 100644 --- a/src/coreComponents/mesh/generators/WellGeneratorBase.hpp +++ b/src/coreComponents/mesh/generators/WellGeneratorBase.hpp @@ -25,6 +25,7 @@ #include "dataRepository/Group.hpp" #include "codingUtilities/Utilities.hpp" #include "common/DataTypes.hpp" +#include "mesh/LogLevelsInfo.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index a6c75d3e1c6..135005fc13d 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -83,12 +83,6 @@ struct Timers static constexpr std::string_view getDescription() { return "Solver timers information"; } }; -struct Initialization -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Initialization information"; } -}; - /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt index 8fae050093f..0941bd7b0d2 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt @@ -1,6 +1,7 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} + fluidFlow/LogLevelsInfo.hpp fluidFlow/CompositionalMultiphaseBase.hpp fluidFlow/CompositionalMultiphaseBaseFields.hpp fluidFlow/CompositionalMultiphaseStatistics.hpp @@ -42,10 +43,10 @@ set( physicsSolvers_headers fluidFlow/StencilDataCollection.hpp fluidFlow/kernels/ThermalSinglePhaseBaseKernels.hpp fluidFlow/kernels/ThermalSinglePhaseFVMKernels.hpp - fluidFlow/LogLevelsInfo.hpp fluidFlow/wells/CompositionalMultiphaseWell.hpp fluidFlow/wells/CompositionalMultiphaseWellFields.hpp fluidFlow/wells/kernels/CompositionalMultiphaseWellKernels.hpp + fluidFlow/wells/LogLevelsInfo.hpp fluidFlow/wells/SinglePhaseWell.hpp fluidFlow/wells/SinglePhaseWellFields.hpp fluidFlow/wells/kernels/SinglePhaseWellKernels.hpp @@ -53,7 +54,6 @@ set( physicsSolvers_headers fluidFlow/wells/WellControls.hpp fluidFlow/wells/WellSolverBase.hpp fluidFlow/wells/WellSolverBaseFields.hpp - fluidFlow/wells/LogLevelsInfo.hpp PARENT_SCOPE ) # Specify solver sources diff --git a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp index cd9f3eb5322..9774447a7d4 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp @@ -35,6 +35,12 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT +struct Crossflow +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Crossflow information"; } +}; + struct CFL { static constexpr int getMinLogLevel() { return 1; } @@ -47,6 +53,12 @@ struct Statistics static constexpr std::string_view getDescription() { return "Print statistics"; } }; +struct StencilConnection +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Log strencil stored connection"; } +}; + /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp index dcd795ec3ed..d5d1f8ca809 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp @@ -24,6 +24,7 @@ #include "constitutive/permeability/PermeabilityBase.hpp" #include "constitutive/permeability/PermeabilityFields.hpp" #include "physicsSolvers/fluidFlow/StencilAccessors.hpp" +#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" #include "physicsSolvers/PhysicsSolverManager.hpp" #include "common/format/table/TableFormatter.hpp" @@ -56,6 +57,8 @@ StencilDataCollection::StencilDataCollection( const string & name, registerWrapper( viewKeyStruct::cellBGlobalIdString(), &m_cellBGlobalId ); registerWrapper( viewKeyStruct::transmissibilityABString(), &m_transmissibilityAB ); registerWrapper( viewKeyStruct::transmissibilityBAString(), &m_transmissibilityBA ); + + addLogLevel< logInfo::StencilConnection >(); } void StencilDataCollection::postInputInitialization() @@ -106,8 +109,8 @@ void StencilDataCollection::initializePostInitialConditionsPostSubGroups() m_cellBGlobalId.resize( connCount ); m_transmissibilityAB.resize( connCount ); m_transmissibilityBA.resize( connCount ); - GEOS_LOG_LEVEL_BY_RANK( 1, GEOS_FMT( "{}: initialized {} connection buffer for '{}'.", - getName(), connCount, m_discretization->getName() ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::Initialization, GEOS_FMT( "{}: initialized {} connection buffer for '{}'.", + getName(), connCount, m_discretization->getName() ) ); ++supportedStencilCount; } ); GEOS_ERROR_IF( supportedStencilCount == 0, GEOS_FMT( "{}: No compatible discretization was found.", getDataContext() ) ); @@ -283,8 +286,8 @@ void StencilDataCollection::storeConnectionData( string_view stencilName, void StencilDataCollection::logStoredConnections( string_view stencilName ) { integer const connCount = MpiWrapper::sum( m_cellAGlobalId.size() ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: {} connections stored for '{}'.", - getName(), connCount, stencilName ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::StencilConnection, GEOS_FMT( "{}: {} connections stored for '{}'.", + getName(), connCount, stencilName ) ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index d77669b68d1..85976065ba0 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -34,11 +34,11 @@ #include "mesh/PerforationFields.hpp" #include "mesh/WellElementSubRegion.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellFields.hpp" #include "physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" -#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/wells/kernels/CompositionalMultiphaseWellKernels.hpp" #include "physicsSolvers/fluidFlow/wells/kernels/ThermalCompositionalMultiphaseWellKernels.hpp" #include "physicsSolvers/fluidFlow/wells/kernels/PerforationFluxKernels.hpp" @@ -114,6 +114,9 @@ CompositionalMultiphaseWell::CompositionalMultiphaseWell( const string & name, setInputFlag( InputFlags::OPTIONAL ). setApplyDefaultValue( 1 ). setDescription( "Flag indicating whether local (cell-wise) chopping of negative compositions is allowed" ); + + addLogLevel< logInfo::WellComponents >(); + addLogLevel< logInfo::WellValidity >(); } void CompositionalMultiphaseWell::postInputInitialization() @@ -928,7 +931,7 @@ void CompositionalMultiphaseWell::updateState( DomainPartition & domain ) } ); maxPhaseVolFrac = MpiWrapper::max( maxPhaseVolFrac ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max well phase volume fraction change = {}", getName(), fmt::format( "{:.{}f}", maxPhaseVolFrac, 4 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well phase volume fraction change = {}", getName(), fmt::format( "{:.{}f}", maxPhaseVolFrac, 4 ) ) ); } @@ -1438,25 +1441,25 @@ CompositionalMultiphaseWell::scalingForSystemSolution( DomainPartition & domain, minCompDensScalingFactor = MpiWrapper::min( minCompDensScalingFactor ); string const massUnit = m_useMass ? "kg/m3" : "mol/m3"; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max well pressure change: {} Pa (before scaling)", - getName(), GEOS_FMT( "{:.{}f}", maxDeltaPres, 3 ) ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max well component density change: {} {} (before scaling)", - getName(), GEOS_FMT( "{:.{}f}", maxDeltaCompDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well pressure change: {} Pa (before scaling)", + getName(), GEOS_FMT( "{:.{}f}", maxDeltaPres, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well component density change: {} {} (before scaling)", + getName(), GEOS_FMT( "{:.{}f}", maxDeltaCompDens, 3 ), massUnit ) ); if( m_isThermal ) { maxDeltaTemp = MpiWrapper::max( maxDeltaTemp ); minTempScalingFactor = MpiWrapper::min( minTempScalingFactor ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max well temperature change: {} K (before scaling)", - getName(), GEOS_FMT( "{:.{}f}", maxDeltaTemp, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well temperature change: {} K (before scaling)", + getName(), GEOS_FMT( "{:.{}f}", maxDeltaTemp, 3 ) ) ); } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Min well pressure scaling factor: {}", getName(), minPresScalingFactor ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Min well component density scaling factor: {}", getName(), minCompDensScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Min well pressure scaling factor: {}", getName(), minPresScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Min well component density scaling factor: {}", getName(), minCompDensScalingFactor ) ); if( m_isThermal ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Min well temperature scaling factor: {}", getName(), minTempScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Min well temperature scaling factor: {}", getName(), minTempScalingFactor ) ); } @@ -1603,15 +1606,15 @@ CompositionalMultiphaseWell::checkSystemSolution( DomainPartition & domain, numNegTotalDens = MpiWrapper::sum( numNegTotalDens ); if( numNegPres > 0 ) - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Number of negative well pressure values: {}, minimum value: {} Pa", - getName(), numNegPres, fmt::format( "{:.{}f}", minPres, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellValidity, GEOS_FMT( " {}: Number of negative well pressure values: {}, minimum value: {} Pa", + getName(), numNegPres, fmt::format( "{:.{}f}", minPres, 3 ) ) ); string const massUnit = m_useMass ? "kg/m3" : "mol/m3"; if( numNegDens > 0 ) - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Number of negative well component density values: {}, minimum value: {} {} ", - getName(), numNegDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellValidity, GEOS_FMT( " {}: Number of negative well component density values: {}, minimum value: {} {} ", + getName(), numNegDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); if( minTotalDens > 0 ) - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Number of negative total well density values: {}, minimum value: {} {} ", - getName(), minTotalDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellValidity, GEOS_FMT( " {}: Number of negative total well density values: {}, minimum value: {} {} ", + getName(), minTotalDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp index 9e9b9f20b50..141aa6488af 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp @@ -35,16 +35,34 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT +struct Crossflow +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Crossflow information"; } +}; + +struct WellComponents +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Well components information"; } +}; + struct WellControl { static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { return "Well control information"; } }; -struct Crossflow +struct WellValidity +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "Well validity information"; } +}; + +struct SystemSolution { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Crossflow information"; } + static constexpr std::string_view getDescription() { return "Log single phase well system solution"; } }; /// @endcond diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp index 6cf1a348ca1..bf7ad0ab14d 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp @@ -31,12 +31,12 @@ #include "mesh/PerforationFields.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/SinglePhaseWellFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" #include "physicsSolvers/fluidFlow/wells/kernels/SinglePhaseWellKernels.hpp" -#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" namespace geos { @@ -58,6 +58,8 @@ SinglePhaseWell::SinglePhaseWell( const string & name, setApplyDefaultValue( 1 ). // negative pressure is allowed by default setInputFlag( InputFlags::OPTIONAL ). setDescription( "Flag indicating if negative pressure is allowed" ); + + addLogLevel< logInfo::SystemSolution >(); } void SinglePhaseWell::registerDataOnMesh( Group & meshBodies ) @@ -886,8 +888,11 @@ bool SinglePhaseWell::checkSystemSolution( DomainPartition & domain, numNegativePressures = MpiWrapper::sum( numNegativePressures ); if( numNegativePressures > 0 ) - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Number of negative pressure values: {}, minimum value: {} Pa", - getName(), numNegativePressures, fmt::format( "{:.{}f}", minPressure, 3 ) ) ); + { + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SystemSolution, + GEOS_FMT( " {}: Number of negative pressure values: {}, minimum value: {} Pa", + getName(), numNegativePressures, fmt::format( "{:.{}f}", minPressure, 3 ) ) ); + } return (m_allowNegativePressure || numNegativePressures == 0) ? 1 : 0; } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp index 30ed4a17f09..5b8c934f5e8 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp @@ -165,6 +165,8 @@ WellControls::WellControls( string const & name, Group * const parent ) setInputFlag( InputFlags::OPTIONAL ). setDescription( "Name of the well status table when the status of the well is a time dependent function. \n" "If the status function evaluates to a positive value at the current time, the well will be open otherwise the well will be shut." ); + + addLogLevel< logInfo::WellControl >(); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp index cabe5524cac..4a13268fa7f 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp @@ -25,9 +25,9 @@ #include "mesh/WellElementSubRegion.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBase.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" -#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/wells/kernels/ThermalCompositionalMultiphaseWellKernels.hpp" #include "fileIO/Outputs/OutputBase.hpp" @@ -61,7 +61,6 @@ WellSolverBase::WellSolverBase( string const & name, setDescription( "Write rates into a CSV file" ); addLogLevel< logInfo::WellControl >(); - addLogLevel< logInfo::Crossflow >(); } Group *WellSolverBase::createChild( string const & childKey, string const & childName ) diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/CMakeLists.txt b/src/coreComponents/physicsSolvers/inducedSeismicity/CMakeLists.txt index 7edf040454d..acdc71f4d05 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/CMakeLists.txt @@ -1,6 +1,7 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} + inducedSeismicity/LogLevelsInfo.hpp inducedSeismicity/inducedSeismicityFields.hpp inducedSeismicity/rateAndStateFields.hpp inducedSeismicity/QuasiDynamicEQ.hpp diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp new file mode 100644 index 00000000000..1c96e71cd47 --- /dev/null +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp @@ -0,0 +1,51 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_INDUCEDSEISMICITY_INDUCEDSEISMICITYFIELDS_HPP_ +#define GEOS_PHYSICSSOLVERS_INDUCEDSEISMICITY_INDUCEDSEISMICITYFIELDS_HPP_ + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct SolverSteps +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Solver step Information"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_INDUCEDSEISMICITY_INDUCEDSEISMICITYFIELDS_HPP_ diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQ.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQ.cpp index 059fa9d33e1..18798dc5e4a 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQ.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQ.cpp @@ -23,6 +23,8 @@ #include "mesh/DomainPartition.hpp" #include "kernels/RateAndStateKernels.hpp" #include "rateAndStateFields.hpp" +#include "LogLevelsInfo.hpp" +#include "physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp" #include "physicsSolvers/contact/ContactFields.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" @@ -53,6 +55,8 @@ QuasiDynamicEQ::QuasiDynamicEQ( const string & name, setInputFlag( InputFlags::OPTIONAL ). setApplyDefaultValue( 1.0e-7 ). setDescription( "Target slip incrmeent for timestep size selction" ); + + addLogLevel< logInfo::SolverSteps >(); } void QuasiDynamicEQ::postInputInitialization() @@ -143,12 +147,12 @@ real64 QuasiDynamicEQ::solverStep( real64 const & time_n, } /// 1. Compute shear and normal tractions - GEOS_LOG_LEVEL_RANK_0( 1, "Stress solver" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Stress solver" ); real64 const dtStress = updateStresses( time_n, dt, cycleNumber, domain ); /// 2. Solve for slip rate and state variable and, compute slip - GEOS_LOG_LEVEL_RANK_0( 1, "Rate and State solver" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Rate and State solver" ); integer const maxNewtonIter = m_nonlinearSolverParameters.m_maxIterNewton; forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&]( string const &, @@ -275,7 +279,7 @@ real64 QuasiDynamicEQ::setNextDt( real64 const & currentDt, DomainPartition & do real64 const nextDt = m_targetSlipIncrement / maxSlipRate; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "The next dt will be {:.2e} s", nextDt )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "The next dt will be {:.2e} s", nextDt )); return nextDt; } diff --git a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp index 295eaa33321..cdd80758f64 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp @@ -58,8 +58,6 @@ PoromechanicsInitialization( const string & name, setInputFlag( InputFlags::OPTIONAL ). setApplyDefaultValue( "" ). setDescription( "Name of the solid mechanics statistics" ); - - addLogLevel< logInfo::Initialization >(); } template< typename POROMECHANICS_SOLVER > diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp index 6c35edca982..f1260c4ac7f 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp @@ -52,8 +52,6 @@ SolidMechanicsStateReset::SolidMechanicsStateReset( const string & name, setApplyDefaultValue( false ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Flag to enable/disable inelastic behavior" ); - - addLogLevel< logInfo::Initialization >(); } SolidMechanicsStateReset::~SolidMechanicsStateReset() diff --git a/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt b/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt index 54fe46da9fa..cfb502c9b1d 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt @@ -1,6 +1,7 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} + wavePropagation/LogLevelsInfo.hpp wavePropagation/shared/WaveSolverBase.hpp wavePropagation/shared/WaveSolverUtils.hpp wavePropagation/shared/PrecomputeSourcesAndReceiversKernel.hpp diff --git a/src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp new file mode 100644 index 00000000000..6ce7a858037 --- /dev/null +++ b/src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp @@ -0,0 +1,57 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_LOGLEVELSINFO_HPP +#define GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct PMLParameters +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Information on Perfectly match layers parameters"; } +}; + +struct DASType +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "DAS type information"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp index 059259cb12b..b2e96d90916 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp @@ -34,6 +34,7 @@ #include "events/EventManager.hpp" #include "AcousticPMLSEMKernel.hpp" #include "physicsSolvers/wavePropagation/shared/PrecomputeSourcesAndReceiversKernel.hpp" +#include "physicsSolvers/wavePropagation/LogLevelsInfo.hpp" namespace geos { @@ -52,6 +53,7 @@ AcousticWaveEquationSEM::AcousticWaveEquationSEM( const std::string & name, setSizedFromParent( 0 ). setDescription( "Pressure value at each receiver for each timestep" ); + addLogLevel< logInfo::PMLParameters >(); } AcousticWaveEquationSEM::~AcousticWaveEquationSEM() @@ -751,15 +753,15 @@ void AcousticWaveEquationSEM::initializePML() /// so it can be used by the PML application indicatorPML.zero(); - GEOS_LOG_LEVEL_RANK_0( 1, - "PML parameters are: \n" - << "\t inner boundaries xMin = "<(); } WaveSolverBase::~WaveSolverBase() @@ -328,8 +330,9 @@ void WaveSolverBase::postInputInitialization() if( m_useDAS != WaveSolverUtils::DASType::none ) { - GEOS_LOG_LEVEL_RANK_0( 1, "Modeling linear DAS data is activated" ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Linear DAS formulation: {}", m_useDAS == WaveSolverUtils::DASType::strainIntegration ? "strain integration" : "displacement difference" ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::DASType, "Modeling linear DAS data is activated" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::DASType, + GEOS_FMT( "Linear DAS formulation: {}", m_useDAS == WaveSolverUtils::DASType::strainIntegration ? "strain integration" : "displacement difference" ) ); GEOS_ERROR_IF( m_linearDASGeometry.size( 1 ) != 3, "Invalid number of geometry parameters for the linear DAS fiber. Three parameters are required: dip, azimuth, gauge length" ); From d87fee325a5b1c8c070b1999ebef0a1e2e48e678 Mon Sep 17 00:00:00 2001 From: arng40 Date: Tue, 17 Dec 2024 15:29:56 +0100 Subject: [PATCH 02/30] . --- src/coreComponents/events/tasks/TaskBase.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/events/tasks/TaskBase.hpp b/src/coreComponents/events/tasks/TaskBase.hpp index b7d76a0f037..f5211e2d1ac 100644 --- a/src/coreComponents/events/tasks/TaskBase.hpp +++ b/src/coreComponents/events/tasks/TaskBase.hpp @@ -21,7 +21,7 @@ #define GEOS_EVENTS_TASKS_TASKBASE_HPP_ -#include +#include #include "events/LogLevelsInfo.hpp" #include "dataRepository/ExecutableGroup.hpp" #include "common/DataTypes.hpp" From d532634834fadf82202a25611f3f63b1614adad3 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 19 Dec 2024 10:26:57 +0100 Subject: [PATCH 03/30] fix merge --- src/coreComponents/mesh/generators/VTKMeshGenerator.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp index 53622cf3579..456a40b92c3 100644 --- a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp +++ b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp @@ -124,15 +124,11 @@ void VTKMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockManager vtkSmartPointer< vtkMultiProcessController > controller = vtk::getController(); vtkMultiProcessController::SetGlobalController( controller ); - GEOS_LOG_RANK_0( GEOS_FMT( "{} '{}': reading mesh from {}", catalogName(), getName(), m_filePath ) ); - { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " reading the dataset..." ); - vtk::AllMeshes allMeshes = vtk::loadAllMeshes( m_filePath, m_mainBlockName, m_faceBlockNames ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " redistributing mesh..." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, " redistributing mesh..." ); { vtk::AllMeshes allMeshes; - GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': reading the dataset...", catalogName(), getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, GEOS_FMT( "{} '{}': reading the dataset...", catalogName(), getName() ) ); if( !m_filePath.empty()) { From fc7135d6ec92ee26ae2fd5663705f79209becfb4 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 19 Dec 2024 14:26:57 +0100 Subject: [PATCH 04/30] code style --- src/coreComponents/events/tasks/TaskBase.hpp | 2 +- src/coreComponents/fileIO/Outputs/ChomboIO.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/events/tasks/TaskBase.hpp b/src/coreComponents/events/tasks/TaskBase.hpp index 8650a1a50a6..d9cbc3db958 100644 --- a/src/coreComponents/events/tasks/TaskBase.hpp +++ b/src/coreComponents/events/tasks/TaskBase.hpp @@ -21,7 +21,7 @@ #define GEOS_EVENTS_TASKS_TASKBASE_HPP_ -#include +#include #include "events/LogLevelsInfo.hpp" #include "dataRepository/ExecutableGroup.hpp" #include "common/DataTypes.hpp" diff --git a/src/coreComponents/fileIO/Outputs/ChomboIO.cpp b/src/coreComponents/fileIO/Outputs/ChomboIO.cpp index 754c8575b49..9a0a732f897 100644 --- a/src/coreComponents/fileIO/Outputs/ChomboIO.cpp +++ b/src/coreComponents/fileIO/Outputs/ChomboIO.cpp @@ -76,7 +76,7 @@ ChomboIO::ChomboIO( string const & name, Group * const parent ): setInputFlag( InputFlags::OPTIONAL ). setDefaultValue( 0 ). setDescription( "True iff geos should use the pressures chombo writes out." ); - + addLogLevel< logInfo::OutputEvents >(); } From 1c7408cd1225bc22f2af7324b48307865722aa28 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 19 Dec 2024 15:31:15 +0100 Subject: [PATCH 05/30] updating log level after merging with develop --- .../mesh/generators/VTKMeshGenerator.cpp | 3 ++- .../physicsSolvers/LogLevelsInfo.hpp | 6 ++++++ .../physicsSolvers/PhysicsSolverBase.cpp | 1 + .../physicsSolvers/contact/ContactSolverBase.cpp | 2 +- .../contact/SolidMechanicsEmbeddedFractures.cpp | 7 ++++--- .../contact/SolidMechanicsLagrangeContact.cpp | 6 +++--- .../inducedSeismicity/QuasiDynamicEQRK32.cpp | 14 +++++++++----- .../CompositionalMultiphaseReservoirAndWells.cpp | 10 ++++++---- .../multiphysics/HydrofractureSolver.cpp | 5 +++-- .../multiphysics/MultiphasePoromechanics.cpp | 10 ++++++---- .../multiphysics/SinglePhasePoromechanics.cpp | 10 ++++++---- ...SinglePhasePoromechanicsConformingFractures.cpp | 5 +++-- .../SinglePhasePoromechanicsEmbeddedFractures.cpp | 5 +++-- .../multiphysics/SinglePhaseReservoirAndWells.cpp | 10 ++++++---- 14 files changed, 59 insertions(+), 35 deletions(-) diff --git a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp index 456a40b92c3..acdbdc0defc 100644 --- a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp +++ b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp @@ -186,7 +186,8 @@ void VTKMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockManager } } - GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': redistributing mesh...", catalogName(), getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, + 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(); diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index bd9c0f86ba0..7881c7a47f8 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -84,6 +84,12 @@ struct Timers static constexpr std::string_view getDescription() { return "Solver timers information"; } }; +struct LinearSolverConfiguration +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Print linear solver configuration"; } +}; + /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp index 14ec3cbfd45..6aa67fecd32 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp @@ -104,6 +104,7 @@ PhysicsSolverBase::PhysicsSolverBase( string const & name, addLogLevel< logInfo::LinearSolver >(); addLogLevel< logInfo::NonlinearSolver >(); addLogLevel< logInfo::Timers >(); + addLogLevel< logInfo::LinearSolverConfiguration >(); registerGroup( groupKeyStruct::linearSolverParametersString(), &m_linearSolverParameters ); registerGroup( groupKeyStruct::nonlinearSolverParametersString(), &m_nonlinearSolverParameters ); diff --git a/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp b/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp index 6fecd60e93c..482fb6c8e90 100644 --- a/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp @@ -23,8 +23,8 @@ #include "constitutive/contact/FrictionBase.hpp" #include "mesh/DomainPartition.hpp" #include "mesh/SurfaceElementRegion.hpp" -#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" +#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "common/GEOS_RAJA_Interface.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp index b78afce691a..a8ead01898f 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp @@ -90,9 +90,10 @@ void SolidMechanicsEmbeddedFractures::setMGRStrategy() linearSolverParameters.mgr.separateComponents = true; linearSolverParameters.dofsPerNode = 3; - linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::solidMechanicsEmbeddedFractures; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::solidMechanicsEmbeddedFractures; "linear solver settings" + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } void SolidMechanicsEmbeddedFractures::registerDataOnMesh( dataRepository::Group & meshBodies ) diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp index 9a76b95632b..ce3557ba65b 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp @@ -35,7 +35,6 @@ #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" // needed to register pressure(_n) #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/contact/ContactFields.hpp" -#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "common/GEOS_RAJA_Interface.hpp" #include "linearAlgebra/utilities/LAIHelperFunctions.hpp" #include "linearAlgebra/solvers/PreconditionerJacobi.hpp" @@ -93,8 +92,9 @@ void SolidMechanicsLagrangeContact::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanics; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } void SolidMechanicsLagrangeContact::registerDataOnMesh( Group & meshBodies ) diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp index 28ff8f5ff14..d0e0f76a486 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp @@ -52,6 +52,8 @@ QuasiDynamicEQRK32::QuasiDynamicEQRK32( const string & name, this->registerWrapper( viewKeyStruct::stressSolverNameString(), &m_stressSolverName ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Name of solver for computing stress. If empty, the spring-slider model is run." ); + + addLogLevel< logInfo::SolverSteps >(); } void QuasiDynamicEQRK32::postInputInitialization() @@ -162,7 +164,7 @@ real64 QuasiDynamicEQRK32::solverStep( real64 const & time_n, real64 dtAdaptive = dt; - GEOS_LOG_LEVEL_RANK_0( 1, "Begin adaptive time step" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Begin adaptive time step" ); while( true ) // Adaptive time step loop. Performs a Runge-Kutta time stepping with error control on state and slip { real64 dtStress; GEOS_UNUSED_VAR( dtStress ); @@ -321,7 +323,7 @@ real64 QuasiDynamicEQRK32::updateStresses( real64 const & time_n, const int cycleNumber, DomainPartition & domain ) const { - GEOS_LOG_LEVEL_RANK_0( 1, "Stress solver" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Stress solver" ); // Call member variable stress solver to update the stress state if( m_stressSolver ) { @@ -375,7 +377,7 @@ void QuasiDynamicEQRK32::updateSlipVelocity( real64 const & time_n, real64 const & dt, DomainPartition & domain ) const { - GEOS_LOG_LEVEL_RANK_0( 1, "Rate and State solver" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Rate and State solver" ); integer const maxIterNewton = m_nonlinearSolverParameters.m_maxIterNewton; real64 const newtonTol = m_nonlinearSolverParameters.m_newtonTol; forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&]( string const &, @@ -463,11 +465,13 @@ real64 QuasiDynamicEQRK32::setNextDt( real64 const & currentDt, DomainPartition { m_controller.errors[2] = m_controller.errors[1]; m_controller.errors[1] = m_controller.errors[0]; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Adaptive time step successful. The next dt will be {:.2e} s", nextDt )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, + GEOS_FMT( "Adaptive time step successful. The next dt will be {:.2e} s", nextDt )); } else { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Adaptive time step failed. The next dt will be {:.2e} s", nextDt )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, + GEOS_FMT( "Adaptive time step failed. The next dt will be {:.2e} s", nextDt )); } return nextDt; diff --git a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp index ea2c6f34b3e..9b8d109b92f 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp @@ -108,8 +108,9 @@ setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirFVM; } } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration + , GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> @@ -134,8 +135,9 @@ setMGRStrategy() { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename RESERVOIR_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp index c11d99f3fad..2c0fa5d6e91 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp @@ -96,8 +96,9 @@ void HydrofractureSolver< POROMECHANICS_SOLVER >::setMGRStrategy() // This may need to be different depending on whether poroelasticity is on or not. linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::hydrofracture; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration + , GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename POROMECHANICS_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp b/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp index 6b01f872f5c..415a4195fe8 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp @@ -310,8 +310,9 @@ void MultiphasePoromechanics<>::setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanics; } } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration + , GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> @@ -336,8 +337,9 @@ void MultiphasePoromechanics< CompositionalMultiphaseReservoirAndWells<>, SolidM { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename FLOW_SOLVER, typename MECHANICS_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp index 0bfa9146a27..b58f975550b 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp @@ -140,8 +140,9 @@ void SinglePhasePoromechanics<>::setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanics; } } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> @@ -166,8 +167,9 @@ void SinglePhasePoromechanics< SinglePhaseReservoirAndWells<>, SolidMechanicsLag { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename FLOW_SOLVER, typename MECHANICS_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp index 51fef65a2de..f9004e4529c 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp @@ -58,8 +58,9 @@ void SinglePhasePoromechanicsConformingFractures<>::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsConformingFractures; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename FLOW_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp index 6c6e2be5bc4..b78093bb2f5 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp @@ -57,8 +57,9 @@ void SinglePhasePoromechanicsEmbeddedFractures::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsEmbeddedFractures; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } void SinglePhasePoromechanicsEmbeddedFractures::postInputInitialization() diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp index f83652d7455..4017faf66ee 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp @@ -86,8 +86,9 @@ setMGRStrategy() { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhaseReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> @@ -112,8 +113,9 @@ setMGRStrategy() { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename RESERVOIR_SOLVER > From 043c61fa5aecc278ce46e7d862667517b4b7effe Mon Sep 17 00:00:00 2001 From: arng40 Date: Fri, 10 Jan 2025 11:50:48 +0100 Subject: [PATCH 06/30] missing hpp --- .../physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp | 2 +- .../physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp | 1 + .../physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp index a8ead01898f..1ab51a9d91c 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp @@ -90,7 +90,7 @@ void SolidMechanicsEmbeddedFractures::setMGRStrategy() linearSolverParameters.mgr.separateComponents = true; linearSolverParameters.dofsPerNode = 3; - linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::solidMechanicsEmbeddedFractures; "linear solver settings" + linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::solidMechanicsEmbeddedFractures; GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, GEOS_FMT( "{}: MGR strategy set to {}", getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp index ce3557ba65b..f7b1eb45bab 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp @@ -35,6 +35,7 @@ #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" // needed to register pressure(_n) #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/contact/ContactFields.hpp" +#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "common/GEOS_RAJA_Interface.hpp" #include "linearAlgebra/utilities/LAIHelperFunctions.hpp" #include "linearAlgebra/solvers/PreconditionerJacobi.hpp" diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp index d0e0f76a486..b946ca414e8 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp @@ -24,6 +24,7 @@ #include "kernels/RateAndStateKernels.hpp" #include "rateAndStateFields.hpp" #include "physicsSolvers/contact/ContactFields.hpp" +#include "physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" namespace geos From 6869ee81f82c1171a427c583c9e10c5bece126a3 Mon Sep 17 00:00:00 2001 From: arng40 Date: Fri, 17 Jan 2025 11:27:43 +0100 Subject: [PATCH 07/30] 1st review pass, (renaming, update logLevel, move struct) --- src/coreComponents/events/LogLevelsInfo.hpp | 8 +- src/coreComponents/events/tasks/TaskBase.cpp | 2 +- src/coreComponents/events/tasks/TaskBase.hpp | 1 - src/coreComponents/fileIO/LogLevelsInfo.hpp | 16 +++- .../fileIO/Outputs/ChomboIO.cpp | 4 +- .../fileIO/Outputs/TimeHistoryOutput.cpp | 4 +- .../fileIO/Outputs/VTKOutput.cpp | 4 +- .../mesh/generators/VTKMeshGenerator.cpp | 1 + .../mesh/generators/VTKWellGenerator.cpp | 1 + .../mesh/generators/WellGeneratorBase.cpp | 2 - .../mesh/generators/WellGeneratorBase.hpp | 1 - .../physicsSolvers/LogLevelsInfo.hpp | 66 ++++++++++++++--- .../physicsSolvers/PhysicsSolverBase.cpp | 74 ++++++++++++------- .../contact/ContactSolverBase.cpp | 1 - .../contact/SolidMechanicsLagrangeContact.cpp | 3 +- .../fluidFlow/CompositionalMultiphaseFVM.cpp | 35 +++++---- .../CompositionalMultiphaseStatistics.cpp | 6 +- .../fluidFlow/LogLevelsInfo.hpp | 23 ------ .../wells/CompositionalMultiphaseWell.cpp | 46 ++++++++---- .../fluidFlow/wells/LogLevelsInfo.hpp | 2 +- .../fluidFlow/wells/SinglePhaseWell.cpp | 6 +- .../inducedSeismicity/QuasiDynamicEQRK32.cpp | 6 +- .../multiphysics/CoupledSolver.hpp | 13 +++- .../FlowProppantTransportSolver.cpp | 9 ++- .../multiphysics/HydrofractureSolver.cpp | 18 +++-- .../multiphysics/LogLevelsInfo.hpp | 5 -- .../PoromechanicsInitialization.cpp | 8 +- .../solidMechanics/LogLevelsInfo.hpp | 5 -- .../SolidMechanicsStateReset.cpp | 14 ++-- .../surfaceGeneration/SurfaceGenerator.cpp | 16 ++-- .../wavePropagation/shared/WaveSolverBase.cpp | 4 +- 31 files changed, 246 insertions(+), 158 deletions(-) diff --git a/src/coreComponents/events/LogLevelsInfo.hpp b/src/coreComponents/events/LogLevelsInfo.hpp index 86cafb422ba..a688945e962 100644 --- a/src/coreComponents/events/LogLevelsInfo.hpp +++ b/src/coreComponents/events/LogLevelsInfo.hpp @@ -35,16 +35,10 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT -struct Initialization -{ - static constexpr int getMinLogLevel() { return 3; } - static constexpr std::string_view getDescription() { return "Information on Initialization"; } -}; - struct EventExecution { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Informations on events executed"; } + static constexpr std::string_view getDescription() { return "Informations on events execution"; } }; /// @endcond diff --git a/src/coreComponents/events/tasks/TaskBase.cpp b/src/coreComponents/events/tasks/TaskBase.cpp index 01a98c19244..482c615b7dc 100644 --- a/src/coreComponents/events/tasks/TaskBase.cpp +++ b/src/coreComponents/events/tasks/TaskBase.cpp @@ -18,6 +18,7 @@ */ #include "TaskBase.hpp" +#include "events/LogLevelsInfo.hpp" namespace geos { @@ -30,7 +31,6 @@ TaskBase::TaskBase( string const & name, { setInputFlags( InputFlags::OPTIONAL_NONUNIQUE ); - addLogLevel< logInfo::Initialization >(); addLogLevel< logInfo::EventExecution >(); } diff --git a/src/coreComponents/events/tasks/TaskBase.hpp b/src/coreComponents/events/tasks/TaskBase.hpp index d9cbc3db958..de9256e51a5 100644 --- a/src/coreComponents/events/tasks/TaskBase.hpp +++ b/src/coreComponents/events/tasks/TaskBase.hpp @@ -22,7 +22,6 @@ #include -#include "events/LogLevelsInfo.hpp" #include "dataRepository/ExecutableGroup.hpp" #include "common/DataTypes.hpp" namespace geos diff --git a/src/coreComponents/fileIO/LogLevelsInfo.hpp b/src/coreComponents/fileIO/LogLevelsInfo.hpp index e0c87161a19..f98dce0edd1 100644 --- a/src/coreComponents/fileIO/LogLevelsInfo.hpp +++ b/src/coreComponents/fileIO/LogLevelsInfo.hpp @@ -35,14 +35,26 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT -struct OutputEvents +struct DataCollectorInitialization +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Information on Time history Initialization"; } +}; + +struct ChomboIOInitialization { static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Information on chomboIO coupling Initialization"; } +}; + +struct OutputEvents +{ + static constexpr int getMinLogLevel() { return 2; } static constexpr std::string_view getDescription() { return "Information on output events, VTK/ChomboIO"; } }; -struct Writing +struct HDF5Writing { static constexpr int getMinLogLevel() { return 3; } static constexpr std::string_view getDescription() { return "Information on buffered data in an HDF5 file "; } diff --git a/src/coreComponents/fileIO/Outputs/ChomboIO.cpp b/src/coreComponents/fileIO/Outputs/ChomboIO.cpp index 9a0a732f897..8087ff0cff8 100644 --- a/src/coreComponents/fileIO/Outputs/ChomboIO.cpp +++ b/src/coreComponents/fileIO/Outputs/ChomboIO.cpp @@ -77,7 +77,7 @@ ChomboIO::ChomboIO( string const & name, Group * const parent ): setDefaultValue( 0 ). setDescription( "True iff geos should use the pressures chombo writes out." ); - addLogLevel< logInfo::OutputEvents >(); + addLogLevel< logInfo::ChomboIOInitialization >(); } ChomboIO::~ChomboIO() @@ -103,7 +103,7 @@ bool ChomboIO::execute( real64 const GEOS_UNUSED_PARAM( time_n ), { GEOS_ERROR_IF( m_waitForInput && m_inputPath == "/INVALID_INPUT_PATH", "Waiting for input but no input path was specified." ); - GEOS_LOG_LEVEL_INFO( logInfo::OutputEvents, "Initializing chombo coupling" ); + GEOS_LOG_LEVEL_INFO( logInfo::ChomboIOInitialization, "Initializing chombo coupling" ); m_coupler = new ChomboCoupler( MPI_COMM_GEOS, m_outputPath, m_inputPath, domain.getMeshBody( 0 ).getBaseDiscretization() ); diff --git a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp index cbccbb86a1e..bd5e5443ecc 100644 --- a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp @@ -72,7 +72,7 @@ TimeHistoryOutput::TimeHistoryOutput( string const & name, setRestartFlags( RestartFlags::WRITE_AND_READ ). setDescription( "The current history record to be written, on restart from an earlier time allows use to remove invalid future history." ); - addLogLevel< logInfo::Initialization >(); + addLogLevel< logInfo::DataCollectorInitialization >(); } void TimeHistoryOutput::initCollectorParallel( DomainPartition const & domain, HistoryCollection & collector ) @@ -145,7 +145,7 @@ void TimeHistoryOutput::initializePostInitialConditionsPostSubGroups() } DomainPartition & domain = this->getGroupByPath< DomainPartition >( "/Problem/domain" ); - GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::Initialization, GEOS_FMT( "TimeHistory: '{}' initializing data collectors.", this->getName() ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::DataCollectorInitialization, GEOS_FMT( "TimeHistory: '{}' initializing data collectors.", this->getName() ) );//3 for( auto collectorPath : m_collectorPaths ) { try diff --git a/src/coreComponents/fileIO/Outputs/VTKOutput.cpp b/src/coreComponents/fileIO/Outputs/VTKOutput.cpp index f4b4e148181..23bdb3c4649 100644 --- a/src/coreComponents/fileIO/Outputs/VTKOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/VTKOutput.cpp @@ -177,7 +177,9 @@ bool VTKOutput::execute( real64 const time_n, DomainPartition & domain ) { { - GEOS_LOG_LEVEL_INFO( logInfo::OutputEvents, GEOS_FMT( "{}: writing {} at time {} s (cycle number {})", getName(), m_fieldNames, time_n + dt, cycleNumber )); + GEOS_LOG_LEVEL_INFO( logInfo::OutputEvents, + GEOS_FMT( "{}: writing {} at time {} s (cycle number {})", + getName(), m_fieldNames, time_n + dt, cycleNumber )); Timer timer( m_outputTimer ); m_writer.setWriteGhostCells( m_writeGhostCells ); diff --git a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp index acdbdc0defc..c2dfd91bfad 100644 --- a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp +++ b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp @@ -20,6 +20,7 @@ #include "VTKMeshGenerator.hpp" #include "mesh/ExternalDataSourceManager.hpp" +#include "mesh/LogLevelsInfo.hpp" #include "mesh/generators/VTKFaceBlockUtilities.hpp" #include "mesh/generators/VTKMeshGeneratorTools.hpp" #include "mesh/generators/CellBlockManager.hpp" diff --git a/src/coreComponents/mesh/generators/VTKWellGenerator.cpp b/src/coreComponents/mesh/generators/VTKWellGenerator.cpp index 16ab018d085..5cb2d81794b 100644 --- a/src/coreComponents/mesh/generators/VTKWellGenerator.cpp +++ b/src/coreComponents/mesh/generators/VTKWellGenerator.cpp @@ -20,6 +20,7 @@ #include "VTKWellGenerator.hpp" +#include "mesh/LogLevelsInfo.hpp" #include "mesh/generators/VTKUtilities.hpp" #include #include diff --git a/src/coreComponents/mesh/generators/WellGeneratorBase.cpp b/src/coreComponents/mesh/generators/WellGeneratorBase.cpp index b084101aca5..f64e0e9b7d0 100644 --- a/src/coreComponents/mesh/generators/WellGeneratorBase.cpp +++ b/src/coreComponents/mesh/generators/WellGeneratorBase.cpp @@ -70,8 +70,6 @@ WellGeneratorBase::WellGeneratorBase( string const & name, Group * const parent setInputFlag( InputFlags::REQUIRED ). setSizedFromParent( 0 ). setDescription( "Name of the set of constraints associated with this well" ); - - addLogLevel< logInfo::VTKSteps >(); } Group * WellGeneratorBase::createChild( string const & childKey, string const & childName ) diff --git a/src/coreComponents/mesh/generators/WellGeneratorBase.hpp b/src/coreComponents/mesh/generators/WellGeneratorBase.hpp index e29d51abc5a..fbe05157d6f 100644 --- a/src/coreComponents/mesh/generators/WellGeneratorBase.hpp +++ b/src/coreComponents/mesh/generators/WellGeneratorBase.hpp @@ -25,7 +25,6 @@ #include "dataRepository/Group.hpp" #include "codingUtilities/Utilities.hpp" #include "common/DataTypes.hpp" -#include "mesh/LogLevelsInfo.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index 7881c7a47f8..e39f3bc3850 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -36,60 +36,102 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT +struct CFL +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "CFL information"; } +}; + +struct Convergence +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Convergence information"; } +}; + +struct Coupling +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Coupling information"; } +}; + struct Fields { static constexpr int getMinLogLevel() { return 2; } static constexpr std::string_view getDescription() { return "The summary of declared fields and coupling"; } }; +struct LinearSolver +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Linear solver information"; } +}; + +struct LinearSolverConfiguration +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Print linear solver configuration"; } +}; + struct LineSearch { static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { return "Line search information"; } }; +struct NonlinearSolver +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Nonlinear solver information"; } +}; + struct Solution { static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { return "Solution information (scaling, maximum changes, quality check)"; } }; -struct Convergence +struct SolverInitialization { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Convergence information"; } + static constexpr std::string_view getDescription() { return "Information on solver Initialization"; } }; -struct TimeStep +struct SolverExecution { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Time step information"; } + static constexpr std::string_view getDescription() { return "Information on solver execution"; } +}; +struct SolverExecutionDetails +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "More precise information on solver execution"; } }; -struct LinearSolver +struct StencilConnection { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Linear solver information"; } + static constexpr std::string_view getDescription() { return "Log strencil stored connection"; } }; -struct NonlinearSolver +struct Statistics { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Nonlinear solver information"; } + static constexpr std::string_view getDescription() { return "Print statistics"; } }; -struct Timers +struct TimeStep { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Solver timers information"; } + static constexpr std::string_view getDescription() { return "Time step information"; } }; -struct LinearSolverConfiguration +struct Timers { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Print linear solver configuration"; } + static constexpr std::string_view getDescription() { return "Solver timers information"; } }; + /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp index 0839be6ff2c..ed3fdefb723 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp @@ -325,7 +325,8 @@ bool PhysicsSolverBase::execute( real64 const time_n, if( dtRemaining > 0.0 ) { GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, - GEOS_FMT( "{}: sub-step = {}, accepted dt = {}, next dt = {}, remaining dt = {}", getName(), subStep, dtAccepted, nextDt, dtRemaining ) ); + GEOS_FMT( "{}: sub-step = {}, accepted dt = {}, next dt = {}, remaining dt = {}", + getName(), subStep, dtAccepted, nextDt, dtRemaining ) ); } } @@ -377,8 +378,9 @@ real64 PhysicsSolverBase::setNextDt( real64 const & currentDt, if( ( m_numTimestepsSinceLastDtCut >= 0 ) && ( m_numTimestepsSinceLastDtCut < minTimeStepIncreaseInterval ) ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: time-step size will be kept the same since it's been {} cycles since last cut.", - getName(), m_numTimestepsSinceLastDtCut ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: time-step size will be kept the same since it's been {} cycles since last cut.", + getName(), m_numTimestepsSinceLastDtCut ) ); return currentDt; } @@ -386,36 +388,42 @@ real64 PhysicsSolverBase::setNextDt( real64 const & currentDt, { if( nextDtNewton > currentDt ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: time-step required will be increased based on number of iterations.", - getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: time-step required will be increased based on number of iterations.", + getName() ) ); } else if( nextDtNewton < currentDt ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: time-step required will be decreased based on number of iterations.", - getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: time-step required will be decreased based on number of iterations.", + getName() ) ); } else { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: time-step required will be kept the same based on number of iterations.", - getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: time-step required will be kept the same based on number of iterations.", + getName() ) ); } } else // time step size decided based on state change { if( nextDtStateChange > currentDt ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: time-step required will be increased based on state change.", - getName())); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: time-step required will be increased based on state change.", + getName())); } else if( nextDtStateChange < currentDt ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: time-step required will be decreased based on state change.", - getName())); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: time-step required will be decreased based on state change.", + getName())); } else { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: time-step required will be kept the same based on state change.", - getName())); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: time-step required will be kept the same based on state change.", + getName())); } } @@ -592,7 +600,8 @@ bool PhysicsSolverBase::lineSearch( real64 const & time_n, if( !checkSystemSolution( domain, dofManager, solution.values(), localScaleFactor ) ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " Line search {}, solution check failed", lineSearchIteration ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, + GEOS_FMT( " Line search {}, solution check failed", lineSearchIteration ) ); continue; } @@ -610,11 +619,13 @@ bool PhysicsSolverBase::lineSearch( real64 const & time_n, applyBoundaryConditions( time_n, dt, domain, dofManager, localMatrix, localRhs ); rhs.close(); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " Line search @ {:0.3f}: ", cumulativeScale )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, + GEOS_FMT( " Line search @ {:0.3f}: ", cumulativeScale )); // get residual norm residualNorm = calculateResidualNorm( time_n, dt, domain, dofManager, rhs.values() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, + GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); // if the residual norm is less than the last residual, we can proceed to the // solution step @@ -706,12 +717,14 @@ bool PhysicsSolverBase::lineSearchWithParabolicInterpolation( real64 const & tim if( logger::internal::rank==0 ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " Line search @ {:0.3f}: ", cumulativeScale ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, + GEOS_FMT( " Line search @ {:0.3f}: ", cumulativeScale ) ); } // get residual norm residualNormT = calculateResidualNorm( time_n, dt, domain, dofManager, rhs.values() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNormT ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, + GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNormT ) ); ffm = ffT; @@ -938,7 +951,8 @@ bool PhysicsSolverBase::solveNonlinearSystem( real64 const & time_n, // get residual norm residualNorm = calculateResidualNorm( time_n, stepDt, domain, m_dofManager, m_rhs.values() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, + GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); } // if the residual norm is less than the Newton tolerance we denote that we have @@ -954,9 +968,10 @@ bool PhysicsSolverBase::solveNonlinearSystem( real64 const & time_n, if( residualNorm > m_nonlinearSolverParameters.m_maxAllowedResidualNorm ) { string const maxAllowedResidualNormString = NonlinearSolverParameters::viewKeysStruct::maxAllowedResidualNormString(); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " The residual norm is above the {} of {}. Newton loop terminated.", - maxAllowedResidualNormString, - m_nonlinearSolverParameters.m_maxAllowedResidualNorm ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, + GEOS_FMT( " The residual norm is above the {} of {}. Newton loop terminated.", + maxAllowedResidualNormString, + m_nonlinearSolverParameters.m_maxAllowedResidualNorm ) ); isNewtonConverged = false; break; } @@ -1291,9 +1306,10 @@ void PhysicsSolverBase::solveLinearSystem( DofManager const & dofManager, m_linearSolverResult = solver->result(); } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolver, GEOS_FMT( " Last LinSolve(iter,res) = ( {:3}, {:4.2e} )", - m_linearSolverResult.numIterations, - m_linearSolverResult.residualReduction ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolver, + GEOS_FMT( " Last LinSolve(iter,res) = ( {:3}, {:4.2e} )", + m_linearSolverResult.numIterations, + m_linearSolverResult.residualReduction ) ); if( params.stopIfError ) { @@ -1382,7 +1398,9 @@ void PhysicsSolverBase::cleanup( real64 const GEOS_UNUSED_PARAM( time_n ), real64 const maxTime = MpiWrapper::max( time ); if( maxTime > 0 ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Timers, GEOS_FMT( "{}: {} time = {} s (min), {} s (max)", getName(), timer.first, minTime, maxTime ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Timers, + GEOS_FMT( "{}: {} time = {} s (min), {} s (max)", + getName(), timer.first, minTime, maxTime ) ); } } diff --git a/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp b/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp index 482fb6c8e90..c57ee6dd1b8 100644 --- a/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp @@ -24,7 +24,6 @@ #include "mesh/DomainPartition.hpp" #include "mesh/SurfaceElementRegion.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" -#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "common/GEOS_RAJA_Interface.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp index f7b1eb45bab..12116ca84b8 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp @@ -2341,7 +2341,8 @@ bool SolidMechanicsLagrangeContact::updateConfiguration( DomainPartition & domai // and total area of fracture elements totalArea = MpiWrapper::sum( totalArea ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Configuration, GEOS_FMT( " {}: changed area {} out of {}", getName(), changedArea, totalArea ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Configuration, + GEOS_FMT( " {}: changed area {} out of {}", getName(), changedArea, totalArea ) ); // Assume converged if changed area is below certain fraction of total area return changedArea <= m_nonlinearSolverParameters.m_configurationTolerance * totalArea; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp index d2dbcb2f3a0..b0a88e29a46 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp @@ -514,8 +514,9 @@ real64 CompositionalMultiphaseFVM::calculateResidualNorm( real64 const & GEOS_UN } residualNorm = sqrt( globalResidualNorm[0] * globalResidualNorm[0] + globalResidualNorm[1] * globalResidualNorm[1] + globalResidualNorm[2] * globalResidualNorm[2] ); - GEOS_LOG_LEVEL_INFO_RANK_0_NLR( logInfo::Convergence, GEOS_FMT( " ( Rmass Rvol ) = ( {:4.2e} {:4.2e} ) ( Renergy ) = ( {:4.2e} )", - globalResidualNorm[0], globalResidualNorm[1], globalResidualNorm[2] )); + GEOS_LOG_LEVEL_INFO_RANK_0_NLR( logInfo::Convergence, + GEOS_FMT( " ( Rmass Rvol ) = ( {:4.2e} {:4.2e} ) ( Renergy ) = ( {:4.2e} )", + globalResidualNorm[0], globalResidualNorm[1], globalResidualNorm[2] )); } else { @@ -673,11 +674,14 @@ real64 CompositionalMultiphaseFVM::scalingForSystemSolution( DomainPartition & d if( m_scalingType == ScalingType::Local ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min pressure scaling factor = {}", getName(), minPresScalingFactor ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min component density scaling factor = {}", getName(), minCompDensScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Min pressure scaling factor = {}", getName(), minPresScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Min component density scaling factor = {}", getName(), minCompDensScalingFactor ) ); if( m_isThermal ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min temperature scaling factor = {}", getName(), minTempScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Min temperature scaling factor = {}", getName(), minTempScalingFactor ) ); } } @@ -771,15 +775,18 @@ bool CompositionalMultiphaseFVM::checkSystemSolution( DomainPartition & domain, numNegTotalDens = MpiWrapper::sum( numNegTotalDens ); if( numNegPres > 0 ) - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Number of negative pressure values: {}, minimum value: {} Pa", - getName(), numNegPres, fmt::format( "{:.{}f}", minPres, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Number of negative pressure values: {}, minimum value: {} Pa", + getName(), numNegPres, fmt::format( "{:.{}f}", minPres, 3 ) ) ); string const massUnit = m_useMass ? "kg/m3" : "mol/m3"; if( numNegDens > 0 ) - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Number of negative component density values: {}, minimum value: {} {}}", - getName(), numNegDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Number of negative component density values: {}, minimum value: {} {}}", + getName(), numNegDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); if( minTotalDens > 0 ) - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Number of negative total density values: {}, minimum value: {} {}}", - getName(), minTotalDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Number of negative total density values: {}, minimum value: {} {}}", + getName(), minTotalDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); return MpiWrapper::min( localCheck ); } @@ -1280,8 +1287,10 @@ real64 CompositionalMultiphaseFVM::setNextDtBasedOnCFL( const geos::real64 & cur computeCFLNumbers( domain, currentDt, maxPhaseCFL, maxCompCFL ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: max phase CFL number = {}", getName(), maxPhaseCFL ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: max component CFL number = {} ", getName(), maxCompCFL ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: max phase CFL number = {}", getName(), maxPhaseCFL ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: max component CFL number = {} ", getName(), maxCompCFL ) ); return std::min( m_targetFlowCFL * currentDt / maxCompCFL, m_targetFlowCFL * currentDt / maxPhaseCFL ); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp index 7f44f5f5c16..52124e4b8d8 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp @@ -475,8 +475,10 @@ void CompositionalMultiphaseStatistics::computeCFLNumbers( real64 const time, real64 maxPhaseCFL, maxCompCFL; m_solver->computeCFLNumbers( domain, dt, maxPhaseCFL, maxCompCFL ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::CFL, GEOS_FMT( "{} (time {} s): Max phase CFL number: {}", getName(), time, maxPhaseCFL ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::CFL, GEOS_FMT( "{} (time {} s): Max component CFL number: {}", getName(), time, maxCompCFL ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::CFL, + GEOS_FMT( "{} (time {} s): Max phase CFL number: {}", getName(), time, maxPhaseCFL ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::CFL, + GEOS_FMT( "{} (time {} s): Max component CFL number: {}", getName(), time, maxCompCFL ) ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp index 04720111514..d29974ab25d 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp @@ -36,29 +36,6 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT -struct Crossflow -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Crossflow information"; } -}; - -struct CFL -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "CFL information"; } -}; - -struct Statistics -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Print statistics"; } -}; - -struct StencilConnection -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Log strencil stored connection"; } -}; /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index b165800173e..5e1f427a192 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -958,7 +958,9 @@ void CompositionalMultiphaseWell::updateState( DomainPartition & domain ) } ); maxPhaseVolFrac = MpiWrapper::max( maxPhaseVolFrac ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well phase volume fraction change = {}", getName(), fmt::format( "{:.{}f}", maxPhaseVolFrac, 4 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, + GEOS_FMT( " {}: Max well phase volume fraction change = {}", + getName(), fmt::format( "{:.{}f}", maxPhaseVolFrac, 4 ) ) ); } @@ -1480,25 +1482,34 @@ CompositionalMultiphaseWell::scalingForSystemSolution( DomainPartition & domain, minCompDensScalingFactor = MpiWrapper::min( minCompDensScalingFactor ); string const massUnit = m_useMass ? "kg/m3" : "mol/m3"; - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well pressure change: {} Pa (before scaling)", - getName(), GEOS_FMT( "{:.{}f}", maxDeltaPres, 3 ) ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well component density change: {} {} (before scaling)", - getName(), GEOS_FMT( "{:.{}f}", maxDeltaCompDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, + GEOS_FMT( " {}: Max well pressure change: {} Pa (before scaling)", + getName(),GEOS_FMT( "{:.{}f}", maxDeltaPres, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, + GEOS_FMT( " {}: Max well component density change: {} {} (before scaling)", + getName(),GEOS_FMT( "{:.{}f}", maxDeltaCompDens, 3 ), massUnit ) ); if( m_isThermal ) { maxDeltaTemp = MpiWrapper::max( maxDeltaTemp ); minTempScalingFactor = MpiWrapper::min( minTempScalingFactor ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well temperature change: {} K (before scaling)", - getName(), GEOS_FMT( "{:.{}f}", maxDeltaTemp, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, + GEOS_FMT( " {}: Max well temperature change: {} K (before scaling)", + getName(),GEOS_FMT( "{:.{}f}", maxDeltaTemp, 3 ) ) ); } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Min well pressure scaling factor: {}", getName(), minPresScalingFactor ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Min well component density scaling factor: {}", getName(), minCompDensScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, + GEOS_FMT( " {}: Min well pressure scaling factor: {}", + getName(), minPresScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, + GEOS_FMT( " {}: Min well component density scaling factor: {}", + getName(), minCompDensScalingFactor ) ); if( m_isThermal ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Min well temperature scaling factor: {}", getName(), minTempScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, + GEOS_FMT( " {}: Min well temperature scaling factor: {}", + getName(), minTempScalingFactor ) ); } @@ -1645,15 +1656,18 @@ CompositionalMultiphaseWell::checkSystemSolution( DomainPartition & domain, numNegTotalDens = MpiWrapper::sum( numNegTotalDens ); if( numNegPres > 0 ) - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellValidity, GEOS_FMT( " {}: Number of negative well pressure values: {}, minimum value: {} Pa", - getName(), numNegPres, fmt::format( "{:.{}f}", minPres, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellValidity, + GEOS_FMT( " {}: Number of negative well pressure values: {}, minimum value: {} Pa", + getName(), numNegPres, fmt::format( "{:.{}f}", minPres, 3 ) ) ); string const massUnit = m_useMass ? "kg/m3" : "mol/m3"; if( numNegDens > 0 ) - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellValidity, GEOS_FMT( " {}: Number of negative well component density values: {}, minimum value: {} {} ", - getName(), numNegDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellValidity, + GEOS_FMT( " {}: Number of negative well component density values: {}, minimum value: {} {} ", + getName(), numNegDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); if( minTotalDens > 0 ) - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellValidity, GEOS_FMT( " {}: Number of negative total well density values: {}, minimum value: {} {} ", - getName(), minTotalDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellValidity, + GEOS_FMT( " {}: Number of negative total well density values: {}, minimum value: {} {} ", + getName(), minTotalDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp index 12165c38607..bd316f31380 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp @@ -56,7 +56,7 @@ struct WellControl struct WellValidity { - static constexpr int getMinLogLevel() { return 2; } + static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { return "Well validity information"; } }; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp index d7ec497fa19..d5c0eb54b35 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp @@ -543,12 +543,14 @@ void SinglePhaseWell::assemblePressureRelations( real64 const & time_n, if( wellControls.getControl() == WellControls::Control::BHP ) { wellControls.switchToTotalRateControl( wellControls.getTargetTotalRate( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, GEOS_FMT( "Control switch for well {} from BHP constraint to rate constraint", subRegion.getName()) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, + GEOS_FMT( "Control switch for well {} from BHP constraint to rate constraint", subRegion.getName()) ); } else { wellControls.switchToBHPControl( wellControls.getTargetBHP( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, GEOS_FMT( "Control switch for well {} from rate constraint to BHP constraint", subRegion.getName()) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, + GEOS_FMT( "Control switch for well {} from rate constraint to BHP constraint", subRegion.getName()) ); } } diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp index b946ca414e8..96df84fb069 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp @@ -467,12 +467,14 @@ real64 QuasiDynamicEQRK32::setNextDt( real64 const & currentDt, DomainPartition m_controller.errors[2] = m_controller.errors[1]; m_controller.errors[1] = m_controller.errors[0]; GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, - GEOS_FMT( "Adaptive time step successful. The next dt will be {:.2e} s", nextDt )); + GEOS_FMT( "Adaptive time step successful. The next dt will be {:.2e} s", + nextDt )); } else { GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, - GEOS_FMT( "Adaptive time step failed. The next dt will be {:.2e} s", nextDt )); + GEOS_FMT( "Adaptive time step failed. The next dt will be {:.2e} s", + nextDt )); } return nextDt; diff --git a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp index 8517edb3dfe..350cce613b8 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp @@ -91,7 +91,9 @@ class CoupledSolver : public PhysicsSolverBase getDataContext(), solverName, solverType ), InputError ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Coupling, GEOS_FMT( "{}: found {} solver named {}", getName(), solver->getCatalogName(), solverName ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Coupling, + GEOS_FMT( "{}: found {} solver named {}", + getName(), solver->getCatalogName(), solverName ) ); } ); } @@ -486,7 +488,8 @@ class CoupledSolver : public PhysicsSolverBase // Solve the subproblems nonlinearly forEachArgInTuple( m_solvers, [&]( auto & solver, auto idx ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, GEOS_FMT( " Iteration {:2}: {}", iter + 1, solver->getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, + GEOS_FMT( " Iteration {:2}: {}", iter + 1, solver->getName() ) ); real64 solverDt = solver->nonlinearImplicitStep( time_n, stepDt, cycleNumber, @@ -634,7 +637,8 @@ class CoupledSolver : public PhysicsSolverBase // finally, we perform the convergence check on the multiphysics residual residualNorm = sqrt( residualNorm ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, + GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); isConverged = ( residualNorm < params.m_newtonTol ); } @@ -661,7 +665,8 @@ class CoupledSolver : public PhysicsSolverBase if( isConverged ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( "***** The iterative coupling has converged in {} iteration(s) *****", iter + 1 ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, + GEOS_FMT( "***** The iterative coupling has converged in {} iteration(s) *****", iter + 1 ) ); } } return isConverged; diff --git a/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp index fe329e26569..105d01fd327 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp @@ -102,7 +102,8 @@ real64 FlowProppantTransportSolver::sequentiallyCoupledSolverStep( real64 const resetStateToBeginningOfStep( domain ); } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, GEOS_FMT( " Iteration: {}, FlowSolver: ", iter+1 ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, + GEOS_FMT( " Iteration: {}, FlowSolver: ", iter+1 ) ); dtReturnTemporary = flowSolver()->nonlinearImplicitStep( time_n, dtReturn, cycleNumber, domain ); @@ -117,11 +118,13 @@ real64 FlowProppantTransportSolver::sequentiallyCoupledSolverStep( real64 const if( fluidNonLinearParams.m_numNewtonIterations <= this->m_nonlinearSolverParameters.m_minIterNewton && iter > 0 ) { m_solverStatistics.logNonlinearIteration(); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( "***** The iterative coupling has converged in {} iterations *****", iter ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, + GEOS_FMT( "***** The iterative coupling has converged in {} iterations *****", iter ) ); break; } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, GEOS_FMT( " Iteration: {}, Proppant Solver: ", iter+1 ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, + GEOS_FMT( " Iteration: {}, Proppant Solver: ", iter+1 ) ); dtReturnTemporary = proppantTransportSolver()->nonlinearImplicitStep( time_n, dtReturn, cycleNumber, domain ); diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp index 0fe2bfad8b4..f1c0d129040 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp @@ -377,12 +377,18 @@ void HydrofractureSolver< POROMECHANICS_SOLVER >::updateHydraulicApertureAndFrac minHydraulicAperture = MpiWrapper::min( minHydraulicAperture ); maxHydraulicAperture = MpiWrapper::max( maxHydraulicAperture ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max aperture change: {} m, max hydraulic aperture change: {} m", - this->getName(), fmt::format( "{:.{}e}", maxApertureChange, 6 ), fmt::format( "{:.{}e}", maxHydraulicApertureChange, 6 ) ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min aperture: {} m, max aperture: {} m", - this->getName(), fmt::format( "{:.{}e}", minAperture, 6 ), fmt::format( "{:.{}e}", maxAperture, 6 ) ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min hydraulic aperture: {} m, max hydraulic aperture: {} m", - this->getName(), fmt::format( "{:.{}e}", minHydraulicAperture, 6 ), fmt::format( "{:.{}e}", maxHydraulicAperture, 6 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Max aperture change: {} m, max hydraulic aperture change: {} m", + this->getName(), + fmt::format( "{:.{}e}", maxApertureChange, 6 ), fmt::format( "{:.{}e}", maxHydraulicApertureChange, 6 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Min aperture: {} m, max aperture: {} m", + this->getName(), + fmt::format( "{:.{}e}", minAperture, 6 ), fmt::format( "{:.{}e}", maxAperture, 6 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Min hydraulic aperture: {} m, max hydraulic aperture: {} m", + this->getName(), + fmt::format( "{:.{}e}", minHydraulicAperture, 6 ), fmt::format( "{:.{}e}", maxHydraulicAperture, 6 ) ) ); } template< typename POROMECHANICS_SOLVER > void HydrofractureSolver< POROMECHANICS_SOLVER >::setupCoupling( DomainPartition const & domain, diff --git a/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp index e87c0615e53..3bb0bcd5ed8 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp @@ -36,11 +36,6 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT -struct Coupling -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Coupling information"; } -}; /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp index 0e140a7bae8..dd71f1061d0 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp @@ -30,7 +30,7 @@ #include "physicsSolvers/multiphysics/HydrofractureSolver.hpp" #include "physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.hpp" #include "physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.hpp" -#include "physicsSolvers/multiphysics/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" namespace geos { @@ -58,6 +58,8 @@ PoromechanicsInitialization( const string & name, setInputFlag( InputFlags::OPTIONAL ). setApplyDefaultValue( "" ). setDescription( "Name of the solid mechanics statistics" ); + + addLogLevel< logInfo::SolverInitialization >(); } template< typename POROMECHANICS_SOLVER > @@ -108,7 +110,7 @@ execute( real64 const time_n, real64 const eventProgress, DomainPartition & domain ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is set to perform stress initialization during the next time step(s)", + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverInitialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is set to perform stress initialization during the next time step(s)", //1 getName(), time_n, m_poromechanicsSolverName ) ); m_poromechanicsSolver->setStressInitialization( true ); @@ -116,7 +118,7 @@ execute( real64 const time_n, m_poromechanicsSolver->execute( time_n, dt, cycleNumber, eventCounter, eventProgress, domain ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` has completed stress initialization", + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverInitialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` has completed stress initialization",//1 getName(), time_n + dt, m_poromechanicsSolverName ) ); m_poromechanicsSolver->setStressInitialization( false ); diff --git a/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp index 27e59cf4709..94ef0e38d49 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp @@ -36,11 +36,6 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT -struct Statistics -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Print statistics"; } -}; /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp index 77c33e25ddf..6524a281dc8 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp @@ -52,6 +52,9 @@ SolidMechanicsStateReset::SolidMechanicsStateReset( const string & name, setApplyDefaultValue( false ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Flag to enable/disable inelastic behavior" ); + + addLogLevel< logInfo::SolverExecution >(); + addLogLevel< logInfo::SolverExecutionDetails >(); } SolidMechanicsStateReset::~SolidMechanicsStateReset() @@ -84,7 +87,7 @@ bool SolidMechanicsStateReset::execute( real64 const time_n, // Option 1: zero out velocity, incremental displacement, and displacement if( m_resetDisplacements ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverExecution, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is resetting total displacement and velocity to zero", getName(), time_n, m_solidSolverName ) ); @@ -117,10 +120,11 @@ bool SolidMechanicsStateReset::execute( real64 const time_n, string const & solidMaterialName = subRegion.getReference< string >( SolidMechanicsLagrangianFEM::viewKeyStruct::solidMaterialNamesString() ); Group & constitutiveModels = subRegion.getGroup( ElementSubRegionBase::groupKeyStruct::constitutiveModelsString() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, solid model `{}` is setting inelastic behavior to `{}` on subRegion `{}`. ", - getName(), time_n, solidMaterialName, - m_disableInelasticity ? "OFF" : "ON", - subRegion.getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverExecutionDetails, + GEOS_FMT( "Task `{}`: at time {}s, solid model `{}` is setting inelastic behavior to `{}` on subRegion `{}`. ",//2 + getName(), time_n, solidMaterialName, + m_disableInelasticity ? "OFF" : "ON", + subRegion.getName() ) ); SolidBase & constitutiveRelation = constitutiveModels.getGroup< SolidBase >( solidMaterialName ); constitutiveRelation.disableInelasticity( m_disableInelasticity ); diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp index 2e16f5bfeea..194339c11fc 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp @@ -1735,7 +1735,8 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, { s << *i << " "; } - GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, GEOS_FMT( "Splitting node {} along separation plane faces: {}", nodeID, s.str() ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, + GEOS_FMT( "Splitting node {} along separation plane faces: {}", nodeID, s.str() ) ); } @@ -1774,7 +1775,8 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, // >("usedFaces")[newNodeIndex]; // usedFacesNew = usedFaces[nodeID]; - GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, GEOS_FMT( "Done splitting node {} into nodes {} and {}", nodeID, nodeID, newNodeIndex ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, + GEOS_FMT( "Done splitting node {} into nodes {} and {}", nodeID, nodeID, newNodeIndex ) ); // split edges map< localIndex, localIndex > splitEdges; @@ -1795,7 +1797,8 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, edgeToFaceMap.clearSet( newEdgeIndex ); - GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, GEOS_FMT ( "Split edge {} into edges {} and {}", parentEdgeIndex, parentEdgeIndex, newEdgeIndex ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, + GEOS_FMT ( "Split edge {} into edges {} and {}", parentEdgeIndex, parentEdgeIndex, newEdgeIndex ) ); splitEdges[parentEdgeIndex] = newEdgeIndex; modifiedObjects.newEdges.insert( newEdgeIndex ); @@ -1851,7 +1854,8 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, if( faceManager.splitObject( faceIndex, rank, newFaceIndex ) ) { - GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, GEOS_FMT ( "Split face {} into faces {} and {}", faceIndex, faceIndex, newFaceIndex ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, + GEOS_FMT ( "Split face {} into faces {} and {}", faceIndex, faceIndex, newFaceIndex ) ); splitFaces[faceIndex] = newFaceIndex; modifiedObjects.newFaces.insert( newFaceIndex ); @@ -1936,7 +1940,9 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, this->m_originalFaceToEdges.toViewConst(), faceIndices ); m_faceElemsRupturedThisSolve.insert( newFaceElement ); - GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, GEOS_FMT ( "Created new FaceElement {} when creating face {} from {}", newFaceElement, newFaceIndex, faceIndex ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, + GEOS_FMT ( "Created new FaceElement {} when creating face {} from {}", + newFaceElement, newFaceIndex, faceIndex ) ); modifiedObjects.newElements[ {fractureElementRegion.getIndexInParent(), 0} ].insert( newFaceElement ); } } // if( faceManager.SplitObject( faceIndex, newFaceIndex ) ) diff --git a/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp b/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp index bcfe14ad57a..df5116dcec6 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp @@ -331,8 +331,8 @@ void WaveSolverBase::postInputInitialization() if( m_useDAS != WaveSolverUtils::DASType::none ) { GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::DASType, "Modeling linear DAS data is activated" ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::DASType, - GEOS_FMT( "Linear DAS formulation: {}", m_useDAS == WaveSolverUtils::DASType::strainIntegration ? "strain integration" : "displacement difference" ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::DASType, GEOS_FMT( "Linear DAS formulation: {}", + m_useDAS == WaveSolverUtils::DASType::strainIntegration ? "strain integration" : "displacement difference" ) ); GEOS_ERROR_IF( m_linearDASGeometry.size( 1 ) != 3, "Invalid number of geometry parameters for the linear DAS fiber. Three parameters are required: dip, azimuth, gauge length" ); From ac55ebd5bda81414711f8b0e8e660de40b5e8972 Mon Sep 17 00:00:00 2001 From: arng40 Date: Fri, 17 Jan 2025 11:36:54 +0100 Subject: [PATCH 08/30] clean some hpp --- .../physicsSolvers/LogLevelsInfo.hpp | 36 +++++++++++ .../physicsSolvers/contact/LogLevelsInfo.hpp | 52 --------------- ...lidMechanicsAugmentedLagrangianContact.cpp | 1 - .../contact/SolidMechanicsLagrangeContact.cpp | 2 +- ...olidMechanicsLagrangeContactBubbleStab.cpp | 2 +- .../CompositionalMultiphaseStatistics.cpp | 2 +- .../fluidFlow/LogLevelsInfo.hpp | 47 -------------- .../fluidFlow/SinglePhaseStatistics.cpp | 2 +- .../fluidFlow/StencilDataCollection.cpp | 5 +- .../inducedSeismicity/LogLevelsInfo.hpp | 51 --------------- .../inducedSeismicity/QuasiDynamicEQ.cpp | 3 +- .../inducedSeismicity/QuasiDynamicEQRK32.cpp | 2 +- .../multiphysics/CoupledSolver.hpp | 2 +- .../multiphysics/HydrofractureSolver.cpp | 3 +- .../multiphysics/LogLevelsInfo.hpp | 47 -------------- .../solidMechanics/LogLevelsInfo.hpp | 47 -------------- .../SolidMechanicsStatistics.cpp | 2 +- .../EmbeddedSurfaceGenerator.cpp | 2 +- .../surfaceGeneration/LogLevelsInfo.hpp | 64 ------------------- .../surfaceGeneration/SurfaceGenerator.cpp | 2 +- 20 files changed, 50 insertions(+), 324 deletions(-) delete mode 100644 src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp delete mode 100644 src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp delete mode 100644 src/coreComponents/physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp delete mode 100644 src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp delete mode 100644 src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp delete mode 100644 src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index e39f3bc3850..17b1891b44c 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -42,6 +42,12 @@ struct CFL static constexpr std::string_view getDescription() { return "CFL information"; } }; +struct Configuration +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "Configuration information"; } +}; + struct Convergence { static constexpr int getMinLogLevel() { return 1; } @@ -78,12 +84,24 @@ struct LineSearch static constexpr std::string_view getDescription() { return "Line search information"; } }; +struct Mapping +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "Mapping information"; } +}; + struct NonlinearSolver { static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { return "Nonlinear solver information"; } }; +struct RuptureRate +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Rupture rate information"; } +}; + struct Solution { static constexpr int getMinLogLevel() { return 1; } @@ -107,18 +125,36 @@ struct SolverExecutionDetails static constexpr std::string_view getDescription() { return "More precise information on solver execution"; } }; +struct SolverSteps +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Solver step Information"; } +}; + struct StencilConnection { static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { return "Log strencil stored connection"; } }; +struct StencilInitialization +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Information on stencil Initialization"; } +}; + struct Statistics { static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { return "Print statistics"; } }; +struct SurfaceGenerator +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Fracture generation information"; } +}; + struct TimeStep { static constexpr int getMinLogLevel() { return 1; } diff --git a/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp deleted file mode 100644 index 09228674f74..00000000000 --- a/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2024 TotalEnergies - * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2023-2024 Chevron - * Copyright (c) 2019- GEOS/GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains log level informations for contact solvers - */ - -#ifndef GEOS_PHYSICSSOLVERS_CONTACT_LOGLEVELSINFO_HPP -#define GEOS_PHYSICSSOLVERS_CONTACT_LOGLEVELSINFO_HPP - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - -struct Configuration -{ - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Configuration information"; } -}; - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_CONTACT_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp index c940cb45289..e0fe28cdd23 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp @@ -26,7 +26,6 @@ #include "physicsSolvers/contact/kernels/SolidMechanicsALMSimultaneousKernels.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsDisplacementJumpUpdateKernels.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsContactFaceBubbleKernels.hpp" -#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "constitutive/ConstitutiveManager.hpp" #include "constitutive/contact/FrictionSelector.hpp" diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp index 12116ca84b8..b8a156d9a7a 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp @@ -32,10 +32,10 @@ #include "mesh/SurfaceElementRegion.hpp" #include "mesh/MeshForLoopInterface.hpp" #include "mesh/mpiCommunications/NeighborCommunicator.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" // needed to register pressure(_n) #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/contact/ContactFields.hpp" -#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "common/GEOS_RAJA_Interface.hpp" #include "linearAlgebra/utilities/LAIHelperFunctions.hpp" #include "linearAlgebra/solvers/PreconditionerJacobi.hpp" diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp index 2d1f139362b..24102dc8d95 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp @@ -21,11 +21,11 @@ #include "mesh/DomainPartition.hpp" #include "SolidMechanicsLagrangeContactBubbleStab.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsConformingContactKernelsBase.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsLagrangeContactKernels.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsDisplacementJumpUpdateKernels.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsContactFaceBubbleKernels.hpp" -#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "constitutive/ConstitutiveManager.hpp" #include "constitutive/contact/FrictionSelector.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp index 52124e4b8d8..b5e226bff5a 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp @@ -23,12 +23,12 @@ #include "constitutive/fluid/multifluid/MultiFluidBase.hpp" #include "constitutive/relativePermeability/RelativePermeabilityBase.hpp" #include "constitutive/solid/CoupledSolidBase.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseBase.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseBaseFields.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/kernels/compositional/StatisticsKernel.hpp" -#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp deleted file mode 100644 index d29974ab25d..00000000000 --- a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2024 TotalEnergies - * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2023-2024 Chevron - * Copyright (c) 2019- GEOS/GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains log level informations for flow solvers - */ - -#ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP -#define GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp index 26ed404707d..d4821b1d288 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp @@ -26,7 +26,7 @@ #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBaseFields.hpp" #include "physicsSolvers/fluidFlow/kernels/singlePhase/StatisticsKernel.hpp" -#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" namespace geos { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp index 41d61407105..3fc5aed0ef8 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp @@ -24,8 +24,8 @@ #include "finiteVolume/TwoPointFluxApproximation.hpp" #include "constitutive/permeability/PermeabilityBase.hpp" #include "constitutive/permeability/PermeabilityFields.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/StencilAccessors.hpp" -#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" #include "physicsSolvers/PhysicsSolverManager.hpp" #include "common/format/table/TableFormatter.hpp" @@ -60,6 +60,7 @@ StencilDataCollection::StencilDataCollection( const string & name, registerWrapper( viewKeyStruct::transmissibilityBAString(), &m_transmissibilityBA ); addLogLevel< logInfo::StencilConnection >(); + addLogLevel< logInfo::StencilInitialization >(); } void StencilDataCollection::postInputInitialization() @@ -110,7 +111,7 @@ void StencilDataCollection::initializePostInitialConditionsPostSubGroups() m_cellBGlobalId.resize( connCount ); m_transmissibilityAB.resize( connCount ); m_transmissibilityBA.resize( connCount ); - GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::Initialization, GEOS_FMT( "{}: initialized {} connection buffer for '{}'.", + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::StencilInitialization, GEOS_FMT( "{}: initialized {} connection buffer for '{}'.", getName(), connCount, m_discretization->getName() ) ); ++supportedStencilCount; } ); diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp deleted file mode 100644 index 1c96e71cd47..00000000000 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2018-2020 TotalEnergies - * Copyright (c) 2019- GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains common log level informations for physics solvers - */ - -#ifndef GEOS_PHYSICSSOLVERS_INDUCEDSEISMICITY_INDUCEDSEISMICITYFIELDS_HPP_ -#define GEOS_PHYSICSSOLVERS_INDUCEDSEISMICITY_INDUCEDSEISMICITYFIELDS_HPP_ - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - -struct SolverSteps -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Solver step Information"; } -}; - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_INDUCEDSEISMICITY_INDUCEDSEISMICITYFIELDS_HPP_ diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQ.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQ.cpp index 3b834575dfc..0cffa3089fb 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQ.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQ.cpp @@ -23,8 +23,7 @@ #include "mesh/DomainPartition.hpp" #include "kernels/RateAndStateKernels.hpp" #include "rateAndStateFields.hpp" -#include "LogLevelsInfo.hpp" -#include "physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/contact/ContactFields.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp index 96df84fb069..929ca826253 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp @@ -23,8 +23,8 @@ #include "mesh/DomainPartition.hpp" #include "kernels/RateAndStateKernels.hpp" #include "rateAndStateFields.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/contact/ContactFields.hpp" -#include "physicsSolvers/inducedSeismicity/LogLevelsInfo.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp index 350cce613b8..32184488b9a 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp @@ -22,7 +22,7 @@ #define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_COUPLEDSOLVER_HPP_ #include "physicsSolvers/PhysicsSolverBase.hpp" -#include "physicsSolvers/multiphysics/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp index f1c0d129040..2635a04e381 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp @@ -27,8 +27,7 @@ #include "physicsSolvers/multiphysics/SinglePhasePoromechanics.hpp" #include "physicsSolvers/multiphysics/MultiphasePoromechanics.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" -#include "physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp" -#include "dataRepository/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "mesh/MeshFields.hpp" #include "finiteVolume/FluxApproximationBase.hpp" diff --git a/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp deleted file mode 100644 index 3bb0bcd5ed8..00000000000 --- a/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2024 TotalEnergies - * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2023-2024 Chevron - * Copyright (c) 2019- GEOS/GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains log level informations for coupled multiphysics solvers - */ - -#ifndef GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP -#define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp deleted file mode 100644 index 94ef0e38d49..00000000000 --- a/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2024 TotalEnergies - * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2023-2024 Chevron - * Copyright (c) 2019- GEOS/GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains log level informations for flow solvers - */ - -#ifndef GEOS_PHYSICSSOLVERS_SOLIDMECHANICS_LOGLEVELSINFO_HPP -#define GEOS_PHYSICSSOLVERS_SOLIDMECHANICS_LOGLEVELSINFO_HPP - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_SOLIDMECHANICS_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStatistics.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStatistics.cpp index 5e266c0258c..bd6c131691f 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStatistics.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStatistics.cpp @@ -25,7 +25,7 @@ #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "fileIO/Outputs/OutputBase.hpp" #include "mesh/DomainPartition.hpp" -#include "physicsSolvers/solidMechanics/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" namespace geos { diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp index da4e2856368..975cc87b1bd 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp @@ -36,7 +36,7 @@ #include "mesh/simpleGeometricObjects/GeometricObjectManager.hpp" #include "mesh/simpleGeometricObjects/Rectangle.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" -#include "physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp deleted file mode 100644 index 564e5fd95a5..00000000000 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2024 TotalEnergies - * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2023-2024 Chevron - * Copyright (c) 2019- GEOS/GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains log level informations for surface generators - */ - -#ifndef GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP -#define GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - -struct SurfaceGenerator -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Fracture generation information"; } -}; - -struct Mapping -{ - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Mapping information"; } -}; - -struct RuptureRate -{ - static constexpr int getMinLogLevel() { return 3; } - static constexpr std::string_view getDescription() { return "Rupture rate information"; } -}; - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp index 194339c11fc..b63d1509633 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp @@ -31,7 +31,7 @@ #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/solidMechanics/kernels/SolidMechanicsLagrangianFEMKernels.hpp" #include "physicsSolvers/surfaceGeneration/SurfaceGeneratorFields.hpp" -#include "physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "kernels/surfaceGenerationKernels.hpp" From 7e9c55d422a5d3e3db25a0abf3405c28c1116eb0 Mon Sep 17 00:00:00 2001 From: arng40 Date: Fri, 17 Jan 2025 13:38:42 +0100 Subject: [PATCH 09/30] xsd --- src/coreComponents/schema/schema.xsd | 150 ++++++++++++++++++++++----- 1 file changed, 125 insertions(+), 25 deletions(-) diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index e130b1e56d4..6e8b1f7436f 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -1665,6 +1665,11 @@ stress - traction is applied to the faces as specified by the inner product of i + + @@ -1775,7 +1780,10 @@ stress - traction is applied to the faces as specified by the inner product of i - + @@ -2137,7 +2145,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Output timing information + - Information on chomboIO coupling Initialization--> @@ -2212,7 +2221,12 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -2230,7 +2244,12 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -2348,6 +2367,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -2397,6 +2417,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - DAS type information 2 - The summary of declared fields and coupling--> @@ -2482,6 +2504,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - DAS type information + - Information on Perfectly match layers parameters 2 - The summary of declared fields and coupling--> @@ -2557,6 +2582,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - DAS type information 2 - The summary of declared fields and coupling--> @@ -2610,6 +2637,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + + @@ -2626,6 +2655,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -2677,8 +2707,6 @@ Level 0 outputs no specific information for this solver. Higher levels require m - - @@ -2693,6 +2721,11 @@ Level 0 outputs no specific information for this solver. Higher levels require m + + + + + @@ -2725,6 +2758,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -2750,8 +2784,6 @@ Level 0 outputs no specific information for this solver. Higher levels require m - - @@ -2766,8 +2798,6 @@ Level 0 outputs no specific information for this solver. Higher levels require m - - @@ -2798,6 +2828,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information - Crossflow information 2 @@ -2833,6 +2864,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -2886,8 +2918,10 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Well control information - - Crossflow information + - Well components information + - Well validity information 2 - The summary of declared fields and coupling--> @@ -2934,7 +2968,10 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -3022,6 +3059,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - DAS type information 2 - The summary of declared fields and coupling--> @@ -3097,6 +3136,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - DAS type information 2 - The summary of declared fields and coupling--> @@ -3162,6 +3203,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -3197,6 +3239,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -3237,6 +3280,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information - Fracture generation information 2 @@ -3245,7 +3289,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -3268,7 +3312,7 @@ Local- Add jump stabilization on interior of macro elements--> - + @@ -3296,6 +3340,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -3338,6 +3383,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -3379,6 +3425,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information - Crossflow information 2 @@ -3424,6 +3471,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -3467,6 +3515,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -3511,6 +3560,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -3556,6 +3606,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - Solver step Information 2 - The summary of declared fields and coupling--> @@ -3593,6 +3645,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - Solver step Information 2 - The summary of declared fields and coupling--> @@ -3640,6 +3694,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -3695,6 +3750,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -3736,6 +3792,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -3783,6 +3840,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -3824,6 +3882,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -3869,6 +3928,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -3910,6 +3970,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -3948,6 +4009,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -3989,6 +4051,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -4033,6 +4096,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -4072,6 +4136,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -4106,6 +4171,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -4151,6 +4217,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -4199,8 +4266,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Well control information - - Crossflow information + - Log single phase well system solution 2 - The summary of declared fields and coupling--> @@ -4236,6 +4304,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling - Configuration information--> @@ -4294,6 +4363,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -4348,6 +4418,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling - Configuration information--> @@ -4405,6 +4476,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -4459,6 +4531,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -4515,6 +4588,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -4585,6 +4659,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration 2 - The summary of declared fields and coupling--> @@ -4650,6 +4725,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Fracture generation information 2 - The summary of declared fields and coupling @@ -4696,7 +4772,12 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -4707,7 +4788,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Informations on events execution + - Information on solver Initialization--> @@ -4726,6 +4808,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m @@ -4740,7 +4823,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Informations on events execution + - Information on solver Initialization--> @@ -4753,7 +4837,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Informations on events execution + - Information on solver Initialization--> @@ -4793,6 +4878,11 @@ Level 0 outputs no specific information for this solver. Higher levels require m + + @@ -4840,7 +4930,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Informations on events execution + - Information on solver Initialization--> @@ -4853,7 +4944,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Informations on events execution + - Information on solver Initialization--> @@ -4866,7 +4958,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Informations on events execution + - Information on solver Initialization--> @@ -4879,7 +4972,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Informations on events execution + - Information on solver Initialization--> @@ -4892,7 +4986,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Informations on events execution + - Information on solver Initialization--> @@ -4907,6 +5002,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m @@ -4920,7 +5016,10 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Informations on events execution + - Information on solver execution +2 + - More precise information on solver execution--> @@ -4933,6 +5032,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m From 7f078ad9efb4d71140f6c6af3db3336a7c9195e6 Mon Sep 17 00:00:00 2001 From: arng40 Date: Fri, 17 Jan 2025 13:39:41 +0100 Subject: [PATCH 10/30] spelling --- src/coreComponents/physicsSolvers/LogLevelsInfo.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index 17b1891b44c..c9530b82059 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -134,7 +134,7 @@ struct SolverSteps struct StencilConnection { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Log strencil stored connection"; } + static constexpr std::string_view getDescription() { return "Log stencil stored connection"; } }; struct StencilInitialization From b1e5f2cb32ce01709e0654176c3481bf377920e8 Mon Sep 17 00:00:00 2001 From: arng40 Date: Fri, 17 Jan 2025 14:14:09 +0100 Subject: [PATCH 11/30] fix merge --- .../physicsSolvers/LogLevelsInfo.hpp | 18 ++++ .../physicsSolvers/contact/CMakeLists.txt | 1 - .../physicsSolvers/fluidFlow/CMakeLists.txt | 1 - .../fluidFlow/LogLevelsInfo.hpp | 78 ----------------- .../fluidFlow/SourceFluxStatistics.cpp | 2 +- .../inducedSeismicity/CMakeLists.txt | 1 - .../multiphysics/CMakeLists.txt | 1 - .../solidMechanics/CMakeLists.txt | 1 - .../surfaceGeneration/CMakeLists.txt | 1 - .../wavePropagation/CMakeLists.txt | 1 - src/coreComponents/schema/schema.xsd | 83 +++++++++++++++++-- 11 files changed, 96 insertions(+), 92 deletions(-) delete mode 100644 src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index c9530b82059..c8b33437655 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -36,6 +36,12 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT +struct AggregatedSourceFluxStats +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Print aggregated statistics of all source fluxes in a mesh"; } +}; + struct CFL { static constexpr int getMinLogLevel() { return 1; } @@ -60,6 +66,18 @@ struct Coupling static constexpr std::string_view getDescription() { return "Coupling information"; } }; +struct DetailedSourceFluxStats +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "Print statistics for each source flux in a mesh"; } +}; + +struct DetailedRegionsSourceFluxStats +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Print statistics for each source flux in each regions"; } +}; + struct Fields { static constexpr int getMinLogLevel() { return 2; } diff --git a/src/coreComponents/physicsSolvers/contact/CMakeLists.txt b/src/coreComponents/physicsSolvers/contact/CMakeLists.txt index ac5fbe3bc1a..ab0fcef7309 100644 --- a/src/coreComponents/physicsSolvers/contact/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/contact/CMakeLists.txt @@ -18,7 +18,6 @@ set( physicsSolvers_headers contact/kernels/SolidMechanicsConformingContactKernelsHelper.hpp contact/kernels/SolidMechanicsContactFaceBubbleKernels.hpp contact/kernels/SolidMechanicsLagrangeContactKernels.hpp - contact/LogLevelsInfo.hpp PARENT_SCOPE ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt index 95781599894..8f473f54249 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt @@ -1,7 +1,6 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} - fluidFlow/LogLevelsInfo.hpp fluidFlow/FlowSolverBase.hpp fluidFlow/FlowSolverBaseFields.hpp fluidFlow/CompositionalMultiphaseBase.hpp diff --git a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp deleted file mode 100644 index 3c345696801..00000000000 --- a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2024 TotalEnergies - * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2023-2024 Chevron - * Copyright (c) 2019- GEOS/GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains log level informations for flow solvers - */ - -#ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP -#define GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - -struct CFL -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "CFL information"; } -}; - -struct Statistics -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Print statistics"; } -}; - -struct AggregatedSourceFluxStats -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Print aggregated statistics of all source fluxes in a mesh"; } -}; - -struct DetailedSourceFluxStats -{ - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Print statistics for each source flux in a mesh"; } -}; - -struct DetailedRegionsSourceFluxStats -{ - static constexpr int getMinLogLevel() { return 3; } - static constexpr std::string_view getDescription() { return "Print statistics for each source flux in each regions"; } -}; - - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP - diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SourceFluxStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SourceFluxStatistics.cpp index 2373d3dd112..60fe1abe0e6 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SourceFluxStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SourceFluxStatistics.cpp @@ -22,7 +22,7 @@ #include "fieldSpecification/SourceFluxBoundaryCondition.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "LvArray/src/tensorOps.hpp" -#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" namespace geos { diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/CMakeLists.txt b/src/coreComponents/physicsSolvers/inducedSeismicity/CMakeLists.txt index abeb7889269..c8f23c55323 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/CMakeLists.txt @@ -1,7 +1,6 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} - inducedSeismicity/LogLevelsInfo.hpp inducedSeismicity/inducedSeismicityFields.hpp inducedSeismicity/rateAndStateFields.hpp inducedSeismicity/QuasiDynamicEQ.hpp diff --git a/src/coreComponents/physicsSolvers/multiphysics/CMakeLists.txt b/src/coreComponents/physicsSolvers/multiphysics/CMakeLists.txt index 2332116db38..ca997ddee2d 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/multiphysics/CMakeLists.txt @@ -14,7 +14,6 @@ set( physicsSolvers_headers multiphysics/PoromechanicsInitialization.hpp multiphysics/PoromechanicsFields.hpp multiphysics/PoromechanicsInitialization.hpp - multiphysics/LogLevelsInfo.hpp multiphysics/poromechanicsKernels/MultiphasePoromechanics.hpp multiphysics/poromechanicsKernels/MultiphasePoromechanics_impl.hpp multiphysics/poromechanicsKernels/MultiphasePoromechanicsConformingFractures.hpp diff --git a/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt b/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt index 2b0cfeb2233..a2691036eda 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt @@ -1,7 +1,6 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} - solidMechanics/LogLevelsInfo.hpp solidMechanics/SolidMechanicsFields.hpp solidMechanics/SolidMechanicsLagrangianFEM.hpp solidMechanics/SolidMechanicsLagrangianFEM.hpp diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt b/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt index eb2b85d0357..0ed8b2031cb 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt @@ -6,7 +6,6 @@ set( physicsSolvers_headers surfaceGeneration/ParallelTopologyChange.hpp surfaceGeneration/SurfaceGenerator.hpp surfaceGeneration/SurfaceGeneratorFields.hpp - surfaceGeneration/LogLevelsInfo.hpp surfaceGeneration/kernels/surfaceGenerationKernels.hpp surfaceGeneration/kernels/surfaceGenerationKernelsHelpers.hpp PARENT_SCOPE ) diff --git a/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt b/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt index cfb502c9b1d..54fe46da9fa 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt @@ -1,7 +1,6 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} - wavePropagation/LogLevelsInfo.hpp wavePropagation/shared/WaveSolverBase.hpp wavePropagation/shared/WaveSolverUtils.hpp wavePropagation/shared/PrecomputeSourcesAndReceiversKernel.hpp diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index a770475b38f..ca7be4eae2b 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -379,6 +379,10 @@ + + + + @@ -509,6 +513,10 @@ + + + + @@ -2305,6 +2313,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m + @@ -2686,7 +2695,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -2726,7 +2735,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -3397,6 +3406,52 @@ Level 0 outputs no specific information for this solver. Higher levels require m + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4752,6 +4807,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m + @@ -4776,7 +4832,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m Level 0 outputs no specific information for this solver. Higher levels require more outputs. 1 - Informations on events execution - - Log strencil stored connection + - Log stencil stored connection - Information on stencil Initialization--> @@ -4822,6 +4878,20 @@ Level 0 outputs no specific information for this solver. Higher levels require m + + + + + + + + + + @@ -5050,11 +5120,12 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Print statistics for each source flux in each regions--> From a747eab0b67b759943a4accb9cfe39bf00b42538 Mon Sep 17 00:00:00 2001 From: arng40 Date: Fri, 17 Jan 2025 14:19:33 +0100 Subject: [PATCH 12/30] removed old macros --- src/coreComponents/common/logger/Logger.hpp | 29 --------------------- 1 file changed, 29 deletions(-) diff --git a/src/coreComponents/common/logger/Logger.hpp b/src/coreComponents/common/logger/Logger.hpp index 0d0cf69c3bf..894b459bae6 100644 --- a/src/coreComponents/common/logger/Logger.hpp +++ b/src/coreComponents/common/logger/Logger.hpp @@ -454,35 +454,6 @@ */ #define GEOS_ASSERT_GE( lhs, rhs ) GEOS_ASSERT_GE_MSG( lhs, rhs, "" ) -/** - * @brief Macro used to turn on/off a function based on the log level. - * @param[in] minLevel Minimum log level - * @param[in] fn Function to filter - */ -#define GEOS_LOG_LEVEL_FN( minLevel, fn ) \ - do { \ - if( this->getLogLevel() >= minLevel ) \ - { \ - fn; \ - } \ - } while( false ) - -/** - * @brief Output messages based on current Group's log level. - * @param[in] minLevel minimum log level - * @param[in] msg a message to log (any expression that can be stream inserted) - * @deprecated Will be replaced by GEOS_LOG_LEVEL_INFO - */ -#define GEOS_LOG_LEVEL( minLevel, msg ) GEOS_LOG_IF( this->getLogLevel() >= minLevel, msg ); - -/** - * @brief Output messages (only on rank 0) based on current Group's log level. - * @param[in] minLevel minimum log level - * @param[in] msg a message to log (any expression that can be stream inserted) - * @deprecated Will be replaced by GEOS_LOG_LEVEL_INFO_RANK_0 - */ -#define GEOS_LOG_LEVEL_RANK_0( minLevel, msg ) GEOS_LOG_RANK_0_IF( this->getLogLevel() >= minLevel, msg ) - /** * @brief Output messages (with one line per rank) based on current Group's log level. * @param[in] minLevel minimum log level From 2c88cc0bf38c0b69925b217a673640e5aab7aa51 Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 20 Jan 2025 09:57:49 +0100 Subject: [PATCH 13/30] remove last old macro --- src/coreComponents/common/logger/Logger.hpp | 9 --------- src/coreComponents/fileIO/LogLevelsInfo.hpp | 2 +- .../fileIO/Outputs/TimeHistoryOutput.cpp | 2 ++ .../fileIO/timeHistory/HDFHistoryIO.cpp | 19 +++++++++++-------- .../physicsSolvers/LogLevelsInfo.hpp | 3 ++- 5 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/coreComponents/common/logger/Logger.hpp b/src/coreComponents/common/logger/Logger.hpp index 894b459bae6..b8f837a966d 100644 --- a/src/coreComponents/common/logger/Logger.hpp +++ b/src/coreComponents/common/logger/Logger.hpp @@ -454,15 +454,6 @@ */ #define GEOS_ASSERT_GE( lhs, rhs ) GEOS_ASSERT_GE_MSG( lhs, rhs, "" ) -/** - * @brief Output messages (with one line per rank) based on current Group's log level. - * @param[in] minLevel minimum log level - * @param[in] msg a message to log (any expression that can be stream inserted) - * @deprecated Will be replaced by GEOS_LOG_LEVEL_INFO_BY_RANK - */ -#define GEOS_LOG_LEVEL_BY_RANK( minLevel, msg ) GEOS_LOG_RANK_IF( this->getLogLevel() >= minLevel, msg ) - - namespace geos { diff --git a/src/coreComponents/fileIO/LogLevelsInfo.hpp b/src/coreComponents/fileIO/LogLevelsInfo.hpp index f98dce0edd1..b447f281452 100644 --- a/src/coreComponents/fileIO/LogLevelsInfo.hpp +++ b/src/coreComponents/fileIO/LogLevelsInfo.hpp @@ -50,7 +50,7 @@ struct ChomboIOInitialization struct OutputEvents { static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Information on output events, VTK/ChomboIO"; } + static constexpr std::string_view getDescription() { return "Information on output events (VTK/ChomboIO/HDF5)"; } }; diff --git a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp index bd5e5443ecc..cfa3bdd56ab 100644 --- a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp @@ -73,6 +73,7 @@ TimeHistoryOutput::TimeHistoryOutput( string const & name, setDescription( "The current history record to be written, on restart from an earlier time allows use to remove invalid future history." ); addLogLevel< logInfo::DataCollectorInitialization >(); + addLogLevel< logInfo::OutputEvents >(); } void TimeHistoryOutput::initCollectorParallel( DomainPartition const & domain, HistoryCollection & collector ) @@ -100,6 +101,7 @@ void TimeHistoryOutput::initCollectorParallel( DomainPartition const & domain, H m_io[idx]->updateCollectingCount( count ); return m_io[idx]->getBufferHead(); } ); + m_io.back()->init( !freshInit ); } }; diff --git a/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp b/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp index 24ae0ddddf6..8e2e1aab074 100644 --- a/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp +++ b/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp @@ -212,9 +212,9 @@ void HDFHistoryIO::init( bool existsOkay ) // create a dataset in the file if needed, don't erase file if( subcomm != MPI_COMM_NULL ) { - GEOS_LOG_LEVEL_BY_RANK( 3, GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); HDFFile target( m_filename, false, true, subcomm ); - GEOS_LOG_LEVEL_BY_RANK( 3, GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); bool inTarget = target.hasDataset( m_name ); if( !inTarget ) { @@ -238,7 +238,8 @@ void HDFHistoryIO::init( bool existsOkay ) maxFileDims[1] = H5S_UNLIMITED; hid_t space = H5Screate_simple( m_rank+1, &historyFileDims[0], &maxFileDims[0] ); hid_t dataset = H5Dcreate( target, m_name.c_str(), m_hdfType, space, H5P_DEFAULT, dcplId, H5P_DEFAULT ); - GEOS_LOG_LEVEL_BY_RANK( 3, GEOS_FMT( "TimeHistory: {}, created hdf5 dataset {}.", m_filename, m_name ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, + GEOS_FMT( "TimeHistory: {}, created hdf5 dataset {}.", m_filename, m_name ) ); H5Dclose( dataset ); H5Sclose( space ); H5Pclose( dcplId ); @@ -251,7 +252,7 @@ void HDFHistoryIO::init( bool existsOkay ) { GEOS_ERROR( "Dataset (" + m_name + ") already exists in output file: " + m_filename ); } - GEOS_LOG_LEVEL_BY_RANK( 3, GEOS_FMT( "TimeHistory: closed file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: closed file {}.", m_filename ) ); } } @@ -285,9 +286,9 @@ void HDFHistoryIO::write() if( m_subcomm != MPI_COMM_NULL ) { - GEOS_LOG_LEVEL_BY_RANK( 3, GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); HDFFile target( m_filename, false, true, m_subcomm ); - GEOS_LOG_LEVEL_BY_RANK( 3, GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); if( !target.hasDataset( m_name ) ) { @@ -317,7 +318,8 @@ void HDFHistoryIO::write() hid_t dxplId = H5Pcreate( H5P_DATASET_XFER ); H5Pset_dxpl_mpio( dxplId, H5FD_MPIO_COLLECTIVE ); H5Dwrite( dataset, m_hdfType, memspace, fileHyperslab, dxplId, dataBuffer ); - GEOS_LOG_LEVEL_BY_RANK( 3, GEOS_FMT( "TimeHistory: wrote row {} of dataset '{}'.", m_writeHead, m_name ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, + GEOS_FMT( "TimeHistory: wrote row {} of dataset '{}'.", m_writeHead, m_name ) ); H5Pclose( dxplId ); // forward the data buffer pointer to the start of the next row @@ -335,7 +337,8 @@ void HDFHistoryIO::write() H5Sclose( memspace ); H5Sclose( filespace ); H5Dclose( dataset ); - GEOS_LOG_LEVEL_BY_RANK( 3, GEOS_FMT( "TimeHistory: closing file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, + GEOS_FMT( "TimeHistory: closing file {}.", m_filename ) ); } m_writeHead++; } diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index c8b33437655..5cbad05936f 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -36,6 +36,7 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT + struct AggregatedSourceFluxStats { static constexpr int getMinLogLevel() { return 1; } @@ -51,7 +52,7 @@ struct CFL struct Configuration { static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Configuration information"; } + static constexpr std::string_view getDescription() { return "Solver runtime settings"; } }; struct Convergence From a3f0c850477b066672cd7cc578ee6a954d6ca4ef Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 20 Jan 2025 17:12:21 +0100 Subject: [PATCH 14/30] missing logLevel --- .../fileIO/Outputs/TimeHistoryOutput.cpp | 1 + .../fileIO/timeHistory/HDFHistoryIO.cpp | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp index cfa3bdd56ab..a7813757bf0 100644 --- a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp @@ -74,6 +74,7 @@ TimeHistoryOutput::TimeHistoryOutput( string const & name, addLogLevel< logInfo::DataCollectorInitialization >(); addLogLevel< logInfo::OutputEvents >(); + addLogLevel< logInfo::HDF5Writing >(); } void TimeHistoryOutput::initCollectorParallel( DomainPartition const & domain, HistoryCollection & collector ) diff --git a/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp b/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp index 8e2e1aab074..d67faba6f54 100644 --- a/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp +++ b/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp @@ -16,6 +16,7 @@ #include "HDFHistoryIO.hpp" #include "HDFFile.hpp" +#include "fileIO/LogLevelsInfo.hpp" #include "common/MpiWrapper.hpp" @@ -212,9 +213,11 @@ void HDFHistoryIO::init( bool existsOkay ) // create a dataset in the file if needed, don't erase file if( subcomm != MPI_COMM_NULL ) { - GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); HDFFile target( m_filename, false, true, subcomm ); - GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); bool inTarget = target.hasDataset( m_name ); if( !inTarget ) { @@ -238,7 +241,7 @@ void HDFHistoryIO::init( bool existsOkay ) maxFileDims[1] = H5S_UNLIMITED; hid_t space = H5Screate_simple( m_rank+1, &historyFileDims[0], &maxFileDims[0] ); hid_t dataset = H5Dcreate( target, m_name.c_str(), m_hdfType, space, H5P_DEFAULT, dcplId, H5P_DEFAULT ); - GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, + GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), GEOS_FMT( "TimeHistory: {}, created hdf5 dataset {}.", m_filename, m_name ) ); H5Dclose( dataset ); H5Sclose( space ); @@ -252,7 +255,8 @@ void HDFHistoryIO::init( bool existsOkay ) { GEOS_ERROR( "Dataset (" + m_name + ") already exists in output file: " + m_filename ); } - GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: closed file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_FMT( "TimeHistory: closed file {}.", m_filename ) ); } } @@ -286,9 +290,11 @@ void HDFHistoryIO::write() if( m_subcomm != MPI_COMM_NULL ) { - GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); HDFFile target( m_filename, false, true, m_subcomm ); - GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); + GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); if( !target.hasDataset( m_name ) ) { @@ -318,7 +324,7 @@ void HDFHistoryIO::write() hid_t dxplId = H5Pcreate( H5P_DATASET_XFER ); H5Pset_dxpl_mpio( dxplId, H5FD_MPIO_COLLECTIVE ); H5Dwrite( dataset, m_hdfType, memspace, fileHyperslab, dxplId, dataBuffer ); - GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, + GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), GEOS_FMT( "TimeHistory: wrote row {} of dataset '{}'.", m_writeHead, m_name ) ); H5Pclose( dxplId ); @@ -337,7 +343,7 @@ void HDFHistoryIO::write() H5Sclose( memspace ); H5Sclose( filespace ); H5Dclose( dataset ); - GEOS_LOG_RANK_IF( this->getLogLevel() >= 3, + GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), GEOS_FMT( "TimeHistory: closing file {}.", m_filename ) ); } m_writeHead++; From 623ba077acb3e677122ea82822b640d90a0d64b2 Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 20 Jan 2025 17:30:49 +0100 Subject: [PATCH 15/30] remove loglevel from hpp --- src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp | 1 + src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp | 1 - .../contact/SolidMechanicsAugmentedLagrangianContact.cpp | 1 + .../physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp | 1 + .../physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp | 1 + .../physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp | 1 + src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp | 1 + .../fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp | 1 + src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp | 1 + src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp | 1 + .../fluidFlow/wells/CompositionalMultiphaseWell.cpp | 1 + 11 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp index 437c95f73d5..457d5786573 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp @@ -16,6 +16,7 @@ #include "PhysicsSolverBase.hpp" #include "PhysicsSolverManager.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "common/TimingMacros.hpp" #include "linearAlgebra/solvers/KrylovSolver.hpp" #include "mesh/DomainPartition.hpp" diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp b/src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp index 95a87f1a87f..62445d709b8 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverBase.hpp @@ -30,7 +30,6 @@ #include "physicsSolvers/NonlinearSolverParameters.hpp" #include "physicsSolvers/LinearSolverParameters.hpp" #include "physicsSolvers/SolverStatistics.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" #include diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp index e0fe28cdd23..242666cfcdc 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp @@ -20,6 +20,7 @@ #include "mesh/DomainPartition.hpp" #include "SolidMechanicsAugmentedLagrangianContact.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsConformingContactKernelsBase.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsALMKernels.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsALMKernelsBase.hpp" diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp index 1ab51a9d91c..fcf25741167 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp @@ -30,6 +30,7 @@ #include "mesh/DomainPartition.hpp" #include "mesh/NodeManager.hpp" #include "mesh/SurfaceElementRegion.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsFields.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/contact/kernels/SolidMechanicsEFEMKernels.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index c13be912619..3392072713a 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -39,6 +39,7 @@ #include "finiteVolume/FluxApproximationBase.hpp" #include "mesh/DomainPartition.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseBaseFields.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/SourceFluxStatistics.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp index 73b8066b007..8e53af95fca 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp @@ -34,6 +34,7 @@ #include "finiteVolume/FluxApproximationBase.hpp" #include "mesh/DomainPartition.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseBaseFields.hpp" #include "physicsSolvers/fluidFlow/kernels/compositional/ResidualNormKernel.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp index e9a55b86c46..2924ef8bd78 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp @@ -31,6 +31,7 @@ #include "finiteVolume/FiniteVolumeManager.hpp" #include "finiteVolume/FluxApproximationBase.hpp" #include "mesh/DomainPartition.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/kernels/MinPoreVolumeMaxPorosityKernel.hpp" #include "physicsSolvers/fluidFlow/kernels/StencilWeightsUpdateKernel.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp index 07c38cd2726..c7953f5bcab 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp @@ -30,6 +30,7 @@ #include "finiteVolume/FluxApproximationBase.hpp" #include "mesh/DomainPartition.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBLFields.hpp" #include "physicsSolvers/fluidFlow/kernels/compositional/ReactiveCompositionalMultiphaseOBLKernels.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 94f3d46a640..8dec75bdcf4 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -38,6 +38,7 @@ #include "mainInterface/ProblemManager.hpp" #include "mesh/DomainPartition.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBaseFields.hpp" #include "physicsSolvers/fluidFlow/kernels/singlePhase/MobilityKernel.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp index cc9cdc6aaf6..1309454a006 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp @@ -31,6 +31,7 @@ #include "finiteVolume/FluxApproximationBase.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "fieldSpecification/AquiferBoundaryCondition.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBaseFields.hpp" #include "physicsSolvers/fluidFlow/kernels/singlePhase/ResidualNormKernel.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index b1a857306a1..6d0ab225db0 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -34,6 +34,7 @@ #include "mesh/PerforationFields.hpp" #include "mesh/WellElementSubRegion.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellFields.hpp" From f797fa16210dd42fb23205328d46faa2b3080e24 Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 20 Jan 2025 17:39:00 +0100 Subject: [PATCH 16/30] lr --- src/coreComponents/events/EventManager.cpp | 5 +++-- src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/events/EventManager.cpp b/src/coreComponents/events/EventManager.cpp index 0de2ad5fc3b..8be7518cc57 100644 --- a/src/coreComponents/events/EventManager.cpp +++ b/src/coreComponents/events/EventManager.cpp @@ -184,8 +184,9 @@ bool EventManager::run( DomainPartition & domain ) subEvent->checkEvents( m_time, m_dt, m_cycle, domain ); // Print debug information for logLevel >= 1 - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::EventExecution, GEOS_FMT( "Event: {} ({}), dt_request={}, forecast={}", - m_currentSubEvent, subEvent->getName(), subEvent->getCurrentEventDtRequest(), subEvent->getForecast() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::EventExecution, + GEOS_FMT( "Event: {} ({}), dt_request={}, forecast={}", m_currentSubEvent, + subEvent->getName(), subEvent->getCurrentEventDtRequest(), subEvent->getForecast() ) ); // Execute, signal events bool earlyReturn = false; diff --git a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp index a7813757bf0..c97aa459ae2 100644 --- a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp @@ -148,7 +148,8 @@ void TimeHistoryOutput::initializePostInitialConditionsPostSubGroups() } DomainPartition & domain = this->getGroupByPath< DomainPartition >( "/Problem/domain" ); - GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::DataCollectorInitialization, GEOS_FMT( "TimeHistory: '{}' initializing data collectors.", this->getName() ) );//3 + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::DataCollectorInitialization, + GEOS_FMT( "TimeHistory: '{}' initializing data collectors.", this->getName() ) ); for( auto collectorPath : m_collectorPaths ) { try From ef00e8dfbb2269699c11ba25147ba4da49f1e7cf Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 20 Jan 2025 17:49:03 +0100 Subject: [PATCH 17/30] lr + uncrustify --- .../fluidFlow/StencilDataCollection.cpp | 11 +++++++---- .../fluidFlow/wells/CompositionalMultiphaseWell.cpp | 6 +++--- .../CompositionalMultiphaseReservoirAndWells.cpp | 6 +++--- .../multiphysics/PoromechanicsInitialization.cpp | 4 ++-- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp index 98d84fabba5..f8776e4c3ee 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp @@ -111,12 +111,15 @@ void StencilDataCollection::initializePostInitialConditionsPostSubGroups() m_cellBGlobalId.resize( connCount ); m_transmissibilityAB.resize( connCount ); m_transmissibilityBA.resize( connCount ); - GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::StencilInitialization, GEOS_FMT( "{}: initialized {} connection buffer for '{}'.", - getName(), connCount, m_discretization->getName() ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::StencilInitialization, + GEOS_FMT( "{}: initialized {} connection buffer for '{}'.", + getName(), connCount, m_discretization->getName() ) ); ++supportedStencilCount; } ); - GEOS_ERROR_IF( supportedStencilCount == 0, GEOS_FMT( "{}: No compatible discretization was found.", getDataContext() ) ); - GEOS_ERROR_IF( supportedStencilCount > 1, GEOS_FMT( "{}: Multiple discretization was found.", getDataContext() ) ); + GEOS_ERROR_IF( supportedStencilCount == 0, + GEOS_FMT( "{}: No compatible discretization was found.", getDataContext() ) ); + GEOS_ERROR_IF( supportedStencilCount > 1, + GEOS_FMT( "{}: Multiple discretization was found.", getDataContext() ) ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index 6d0ab225db0..ddea02b273e 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -1485,10 +1485,10 @@ CompositionalMultiphaseWell::scalingForSystemSolution( DomainPartition & domain, string const massUnit = m_useMass ? "kg/m3" : "mol/m3"; GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well pressure change: {} Pa (before scaling)", - getName(),GEOS_FMT( "{:.{}f}", maxDeltaPres, 3 ) ) ); + getName(), GEOS_FMT( "{:.{}f}", maxDeltaPres, 3 ) ) ); GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well component density change: {} {} (before scaling)", - getName(),GEOS_FMT( "{:.{}f}", maxDeltaCompDens, 3 ), massUnit ) ); + getName(), GEOS_FMT( "{:.{}f}", maxDeltaCompDens, 3 ), massUnit ) ); if( m_isThermal ) { @@ -1496,7 +1496,7 @@ CompositionalMultiphaseWell::scalingForSystemSolution( DomainPartition & domain, minTempScalingFactor = MpiWrapper::min( minTempScalingFactor ); GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellComponents, GEOS_FMT( " {}: Max well temperature change: {} K (before scaling)", - getName(),GEOS_FMT( "{:.{}f}", maxDeltaTemp, 3 ) ) ); + getName(), GEOS_FMT( "{:.{}f}", maxDeltaTemp, 3 ) ) ); } diff --git a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp index 9f3a089e804..c08a517a3cf 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp @@ -108,9 +108,9 @@ setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirFVM; } } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration - , GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> diff --git a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp index fa4f14cfa96..8dae6abbe58 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp @@ -112,7 +112,7 @@ execute( real64 const time_n, DomainPartition & domain ) { GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverInitialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is set to perform stress initialization during the next time step(s)", //1 - getName(), time_n, m_poromechanicsSolverName ) ); + getName(), time_n, m_poromechanicsSolverName ) ); m_poromechanicsSolver->setStressInitialization( true ); m_solidMechanicsStateResetTask.execute( time_n, dt, cycleNumber, eventCounter, eventProgress, domain ); @@ -120,7 +120,7 @@ execute( real64 const time_n, m_poromechanicsSolver->execute( time_n, dt, cycleNumber, eventCounter, eventProgress, domain ); GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverInitialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` has completed stress initialization",//1 - getName(), time_n + dt, m_poromechanicsSolverName ) ); + getName(), time_n + dt, m_poromechanicsSolverName ) ); m_poromechanicsSolver->setStressInitialization( false ); if( m_solidMechanicsStatistics != nullptr ) From 511fee4b5d0401cf33b621eef5710483948d89a6 Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 20 Jan 2025 17:57:54 +0100 Subject: [PATCH 18/30] lr --- .../physicsSolvers/multiphysics/HydrofractureSolver.cpp | 9 ++++++--- .../physicsSolvers/multiphysics/HydrofractureSolver.hpp | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp index 2635a04e381..24b3e46caa1 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp @@ -379,15 +379,18 @@ void HydrofractureSolver< POROMECHANICS_SOLVER >::updateHydraulicApertureAndFrac GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max aperture change: {} m, max hydraulic aperture change: {} m", this->getName(), - fmt::format( "{:.{}e}", maxApertureChange, 6 ), fmt::format( "{:.{}e}", maxHydraulicApertureChange, 6 ) ) ); + fmt::format( "{:.{}e}", maxApertureChange, 6 ), + fmt::format( "{:.{}e}", maxHydraulicApertureChange, 6 ) ) ); GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min aperture: {} m, max aperture: {} m", this->getName(), - fmt::format( "{:.{}e}", minAperture, 6 ), fmt::format( "{:.{}e}", maxAperture, 6 ) ) ); + fmt::format( "{:.{}e}", minAperture, 6 ), + fmt::format( "{:.{}e}", maxAperture, 6 ) ) ); GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min hydraulic aperture: {} m, max hydraulic aperture: {} m", this->getName(), - fmt::format( "{:.{}e}", minHydraulicAperture, 6 ), fmt::format( "{:.{}e}", maxHydraulicAperture, 6 ) ) ); + fmt::format( "{:.{}e}", minHydraulicAperture, 6 ), + fmt::format( "{:.{}e}", maxHydraulicAperture, 6 ) ) ); } template< typename POROMECHANICS_SOLVER > void HydrofractureSolver< POROMECHANICS_SOLVER >::setupCoupling( DomainPartition const & domain, diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.hpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.hpp index 05a96830440..e372ab4e0be 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.hpp @@ -24,7 +24,6 @@ #include "physicsSolvers/surfaceGeneration/SurfaceGenerator.hpp" #include "physicsSolvers/multiphysics/SinglePhasePoromechanics.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" -#include "dataRepository/LogLevelsInfo.hpp" namespace geos { From 5d540482fdeac8eaf6e352cd85fe484fcfd152f0 Mon Sep 17 00:00:00 2001 From: arng40 Date: Tue, 21 Jan 2025 10:46:21 +0100 Subject: [PATCH 19/30] remove unused header --- .../physicsSolvers/multiphysics/HydrofractureSolver.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.hpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.hpp index e372ab4e0be..b4b82454500 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.hpp @@ -20,7 +20,6 @@ #ifndef GEOS_PHYSICSSOLVERS_MULTIPHYSICS_HYDROFRACTURESOLVER_HPP_ #define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_HYDROFRACTURESOLVER_HPP_ -#include "physicsSolvers/multiphysics/CoupledSolver.hpp" #include "physicsSolvers/surfaceGeneration/SurfaceGenerator.hpp" #include "physicsSolvers/multiphysics/SinglePhasePoromechanics.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" From a902a3554979898404109c9410b168b682902d48 Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 22 Jan 2025 11:06:41 +0100 Subject: [PATCH 20/30] centralize logLevel under package --- .../physicsSolvers/CMakeLists.txt | 3 +- .../physicsSolvers/LogLevelsInfo.hpp | 41 ++++++++++ .../physicsSolvers/fluidFlow/CMakeLists.txt | 1 - .../fluidFlow/wells/LogLevelsInfo.hpp | 76 ------------------- .../wavePropagation/LogLevelsInfo.hpp | 57 -------------- 5 files changed, 42 insertions(+), 136 deletions(-) delete mode 100644 src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp delete mode 100644 src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp diff --git a/src/coreComponents/physicsSolvers/CMakeLists.txt b/src/coreComponents/physicsSolvers/CMakeLists.txt index 37c1da41495..972fcc38156 100644 --- a/src/coreComponents/physicsSolvers/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/CMakeLists.txt @@ -30,8 +30,7 @@ set( physicsSolvers_headers PhysicsSolverBase.hpp PhysicsSolverBaseKernels.hpp SolverStatistics.hpp - FieldStatisticsBase.hpp - LogLevelsInfo.hpp ) + FieldStatisticsBase.hpp ) # # Specify solver sources diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index 5cbad05936f..2f8eaa6fa9d 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -55,6 +55,12 @@ struct Configuration static constexpr std::string_view getDescription() { return "Solver runtime settings"; } }; +struct Crossflow +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Crossflow information"; } +}; + struct Convergence { static constexpr int getMinLogLevel() { return 1; } @@ -67,6 +73,12 @@ struct Coupling static constexpr std::string_view getDescription() { return "Coupling information"; } }; +struct DASType +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "DAS type information"; } +}; + struct DetailedSourceFluxStats { static constexpr int getMinLogLevel() { return 2; } @@ -115,6 +127,12 @@ struct NonlinearSolver static constexpr std::string_view getDescription() { return "Nonlinear solver information"; } }; +struct PMLParameters +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Information on Perfectly match layers parameters"; } +}; + struct RuptureRate { static constexpr int getMinLogLevel() { return 3; } @@ -174,6 +192,12 @@ struct SurfaceGenerator static constexpr std::string_view getDescription() { return "Fracture generation information"; } }; +struct SystemSolution +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Log single phase well system solution"; } +}; + struct TimeStep { static constexpr int getMinLogLevel() { return 1; } @@ -186,6 +210,23 @@ struct Timers static constexpr std::string_view getDescription() { return "Solver timers information"; } }; +struct WellComponents +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Well components information"; } +}; + +struct WellControl +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Well control information"; } +}; + +struct WellValidity +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Well validity information"; } +}; /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt index 8f473f54249..a9f6996454f 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt @@ -89,7 +89,6 @@ set( physicsSolvers_headers fluidFlow/wells/CompositionalMultiphaseWell.hpp fluidFlow/wells/CompositionalMultiphaseWellFields.hpp fluidFlow/wells/kernels/CompositionalMultiphaseWellKernels.hpp - fluidFlow/wells/LogLevelsInfo.hpp fluidFlow/wells/SinglePhaseWell.hpp fluidFlow/wells/SinglePhaseWellFields.hpp fluidFlow/wells/WellConstants.hpp diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp deleted file mode 100644 index bd316f31380..00000000000 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2024 TotalEnergies - * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2023-2024 Chevron - * Copyright (c) 2019- GEOS/GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains log level informations for wells - */ - -#ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP -#define GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - -struct Crossflow -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Crossflow information"; } -}; - -struct WellComponents -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Well components information"; } -}; - -struct WellControl -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Well control information"; } -}; - -struct WellValidity -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Well validity information"; } -}; - -struct SystemSolution -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Log single phase well system solution"; } -}; - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp deleted file mode 100644 index 6ce7a858037..00000000000 --- a/src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2018-2020 TotalEnergies - * Copyright (c) 2019- GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains common log level informations for physics solvers - */ - -#ifndef GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_LOGLEVELSINFO_HPP -#define GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_LOGLEVELSINFO_HPP - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - -struct PMLParameters -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on Perfectly match layers parameters"; } -}; - -struct DASType -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "DAS type information"; } -}; - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_LOGLEVELSINFO_HPP From 1e58f5447baca58f92d6d91374a9e4e4a507e897 Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 22 Jan 2025 11:20:32 +0100 Subject: [PATCH 21/30] update hpp --- .../fluidFlow/wells/CompositionalMultiphaseWell.cpp | 1 - .../physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp | 2 +- .../physicsSolvers/fluidFlow/wells/WellControls.cpp | 2 +- .../physicsSolvers/fluidFlow/wells/WellSolverBase.cpp | 3 ++- .../multiphysics/CompositionalMultiphaseReservoirAndWells.cpp | 2 +- .../secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp | 2 +- .../physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index ddea02b273e..a47a995917d 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -35,7 +35,6 @@ #include "mesh/WellElementSubRegion.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" #include "physicsSolvers/LogLevelsInfo.hpp" -#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellFields.hpp" #include "physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellFields.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp index d5c0eb54b35..9c9f4b60a5e 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp @@ -30,8 +30,8 @@ #include "mesh/WellElementSubRegion.hpp" #include "mesh/PerforationFields.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" -#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/SinglePhaseWellFields.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp index e845f2ee383..21b787330e6 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp @@ -21,7 +21,7 @@ #include "WellConstants.hpp" #include "dataRepository/InputFlags.hpp" #include "functions/FunctionManager.hpp" -#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp index 6b2754903b9..e1b2df5598d 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp @@ -23,9 +23,10 @@ #include "mesh/PerforationFields.hpp" #include "mesh/WellElementRegion.hpp" #include "mesh/WellElementSubRegion.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBase.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" -#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" + #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/kernels/ThermalCompositionalMultiphaseWellKernels.hpp" diff --git a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp index c08a517a3cf..ac78a60c706 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp @@ -25,6 +25,7 @@ #include "constitutive/fluid/multifluid/MultiFluidBase.hpp" #include "mesh/PerforationFields.hpp" #include "physicsSolvers/multiphysics/CoupledReservoirAndWellKernels.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseUtilities.hpp" @@ -32,7 +33,6 @@ #include "physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" #include "physicsSolvers/fluidFlow/wells/kernels/CompositionalMultiphaseWellKernels.hpp" -#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/multiphysics/MultiphasePoromechanics.hpp" diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp index aa449063929..58bde171703 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp @@ -34,7 +34,7 @@ #include "events/EventManager.hpp" #include "AcousticPMLSEMKernel.hpp" #include "physicsSolvers/wavePropagation/shared/PrecomputeSourcesAndReceiversKernel.hpp" -#include "physicsSolvers/wavePropagation/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" namespace geos { diff --git a/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp b/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp index df5116dcec6..d3d237d23bd 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp @@ -23,7 +23,7 @@ #include "dataRepository/KeyNames.hpp" #include "finiteElement/FiniteElementDiscretization.hpp" -#include "physicsSolvers/wavePropagation/LogLevelsInfo.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "fieldSpecification/PerfectlyMatchedLayer.hpp" #include "mainInterface/ProblemManager.hpp" From 17c39ef13610236823631bea892fccfbeee27b7d Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 22 Jan 2025 11:33:16 +0100 Subject: [PATCH 22/30] code style --- .../physicsSolvers/multiphysics/HydrofractureSolver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp index 24b3e46caa1..3286817b854 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp @@ -379,17 +379,17 @@ void HydrofractureSolver< POROMECHANICS_SOLVER >::updateHydraulicApertureAndFrac GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max aperture change: {} m, max hydraulic aperture change: {} m", this->getName(), - fmt::format( "{:.{}e}", maxApertureChange, 6 ), + fmt::format( "{:.{}e}", maxApertureChange, 6 ), fmt::format( "{:.{}e}", maxHydraulicApertureChange, 6 ) ) ); GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min aperture: {} m, max aperture: {} m", this->getName(), - fmt::format( "{:.{}e}", minAperture, 6 ), + fmt::format( "{:.{}e}", minAperture, 6 ), fmt::format( "{:.{}e}", maxAperture, 6 ) ) ); GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min hydraulic aperture: {} m, max hydraulic aperture: {} m", this->getName(), - fmt::format( "{:.{}e}", minHydraulicAperture, 6 ), + fmt::format( "{:.{}e}", minHydraulicAperture, 6 ), fmt::format( "{:.{}e}", maxHydraulicAperture, 6 ) ) ); } template< typename POROMECHANICS_SOLVER > From e758442b1d3c1dd66af456e8d8fa2318a6d8bd9d Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 23 Jan 2025 11:27:50 +0100 Subject: [PATCH 23/30] set LogLevel to the corresponding folders --- src/coreComponents/fileIO/LogLevelsInfo.hpp | 9 +- src/coreComponents/mesh/LogLevelsInfo.hpp | 9 +- .../physicsSolvers/LogLevelsInfo.hpp | 90 ------------------- .../physicsSolvers/fluidFlow/CMakeLists.txt | 2 + .../CompositionalMultiphaseStatistics.cpp | 4 +- .../fluidFlow/LogLevelsInfo.hpp | 89 ++++++++++++++++++ .../fluidFlow/SourceFluxStatistics.cpp | 2 +- .../fluidFlow/StencilDataCollection.cpp | 2 +- .../wells/CompositionalMultiphaseWell.cpp | 1 + .../fluidFlow/wells/LogLevelsInfo.hpp | 71 +++++++++++++++ .../fluidFlow/wells/SinglePhaseWell.cpp | 2 +- .../fluidFlow/wells/WellControls.cpp | 2 +- .../fluidFlow/wells/WellSolverBase.cpp | 2 +- ...mpositionalMultiphaseReservoirAndWells.cpp | 2 +- .../surfaceGeneration/CMakeLists.txt | 1 + .../surfaceGeneration/LogLevelsInfo.hpp | 51 +++++++++++ .../surfaceGeneration/SurfaceGenerator.cpp | 3 +- .../wavePropagation/CMakeLists.txt | 1 + .../wavePropagation/LogLevelsInfo.hpp | 51 +++++++++++ .../isotropic/AcousticWaveEquationSEM.cpp | 2 +- .../wavePropagation/shared/WaveSolverBase.cpp | 2 +- 21 files changed, 290 insertions(+), 108 deletions(-) create mode 100644 src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp diff --git a/src/coreComponents/fileIO/LogLevelsInfo.hpp b/src/coreComponents/fileIO/LogLevelsInfo.hpp index b447f281452..1753c806684 100644 --- a/src/coreComponents/fileIO/LogLevelsInfo.hpp +++ b/src/coreComponents/fileIO/LogLevelsInfo.hpp @@ -2,10 +2,11 @@ * ------------------------------------------------------------------------------------------------------------ * SPDX-License-Identifier: LGPL-2.1-only * - * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2018-2020 TotalEnergies - * Copyright (c) 2019- GEOSX Contributors + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors * All rights reserved * * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. diff --git a/src/coreComponents/mesh/LogLevelsInfo.hpp b/src/coreComponents/mesh/LogLevelsInfo.hpp index 9e4a0dc6da5..ba6931b4acf 100644 --- a/src/coreComponents/mesh/LogLevelsInfo.hpp +++ b/src/coreComponents/mesh/LogLevelsInfo.hpp @@ -2,10 +2,11 @@ * ------------------------------------------------------------------------------------------------------------ * SPDX-License-Identifier: LGPL-2.1-only * - * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2018-2020 TotalEnergies - * Copyright (c) 2019- GEOSX Contributors + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors * All rights reserved * * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index 2f8eaa6fa9d..25b081e5950 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -36,31 +36,12 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT - -struct AggregatedSourceFluxStats -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Print aggregated statistics of all source fluxes in a mesh"; } -}; - -struct CFL -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "CFL information"; } -}; - struct Configuration { static constexpr int getMinLogLevel() { return 2; } static constexpr std::string_view getDescription() { return "Solver runtime settings"; } }; -struct Crossflow -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Crossflow information"; } -}; - struct Convergence { static constexpr int getMinLogLevel() { return 1; } @@ -73,24 +54,6 @@ struct Coupling static constexpr std::string_view getDescription() { return "Coupling information"; } }; -struct DASType -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "DAS type information"; } -}; - -struct DetailedSourceFluxStats -{ - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Print statistics for each source flux in a mesh"; } -}; - -struct DetailedRegionsSourceFluxStats -{ - static constexpr int getMinLogLevel() { return 3; } - static constexpr std::string_view getDescription() { return "Print statistics for each source flux in each regions"; } -}; - struct Fields { static constexpr int getMinLogLevel() { return 2; } @@ -115,29 +78,12 @@ struct LineSearch static constexpr std::string_view getDescription() { return "Line search information"; } }; -struct Mapping -{ - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Mapping information"; } -}; - struct NonlinearSolver { static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { return "Nonlinear solver information"; } }; -struct PMLParameters -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on Perfectly match layers parameters"; } -}; - -struct RuptureRate -{ - static constexpr int getMinLogLevel() { return 3; } - static constexpr std::string_view getDescription() { return "Rupture rate information"; } -}; struct Solution { @@ -168,18 +114,6 @@ struct SolverSteps static constexpr std::string_view getDescription() { return "Solver step Information"; } }; -struct StencilConnection -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Log stencil stored connection"; } -}; - -struct StencilInitialization -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on stencil Initialization"; } -}; - struct Statistics { static constexpr int getMinLogLevel() { return 1; } @@ -192,12 +126,6 @@ struct SurfaceGenerator static constexpr std::string_view getDescription() { return "Fracture generation information"; } }; -struct SystemSolution -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Log single phase well system solution"; } -}; - struct TimeStep { static constexpr int getMinLogLevel() { return 1; } @@ -210,24 +138,6 @@ struct Timers static constexpr std::string_view getDescription() { return "Solver timers information"; } }; -struct WellComponents -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Well components information"; } -}; - -struct WellControl -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Well control information"; } -}; - -struct WellValidity -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Well validity information"; } -}; - /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt index a9f6996454f..95781599894 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt @@ -1,6 +1,7 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} + fluidFlow/LogLevelsInfo.hpp fluidFlow/FlowSolverBase.hpp fluidFlow/FlowSolverBaseFields.hpp fluidFlow/CompositionalMultiphaseBase.hpp @@ -89,6 +90,7 @@ set( physicsSolvers_headers fluidFlow/wells/CompositionalMultiphaseWell.hpp fluidFlow/wells/CompositionalMultiphaseWellFields.hpp fluidFlow/wells/kernels/CompositionalMultiphaseWellKernels.hpp + fluidFlow/wells/LogLevelsInfo.hpp fluidFlow/wells/SinglePhaseWell.hpp fluidFlow/wells/SinglePhaseWellFields.hpp fluidFlow/wells/WellConstants.hpp diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp index 28d360af73b..6a1bbd10efe 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp @@ -23,11 +23,13 @@ #include "constitutive/fluid/multifluid/MultiFluidBase.hpp" #include "constitutive/relativePermeability/RelativePermeabilityBase.hpp" #include "constitutive/solid/CoupledSolidBase.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseBase.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseBaseFields.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/kernels/compositional/StatisticsKernel.hpp" #include "common/format/table/TableData.hpp" #include "common/format/table/TableFormatter.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp new file mode 100644 index 00000000000..978a9b7ec09 --- /dev/null +++ b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp @@ -0,0 +1,89 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP_ +#define GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP_ + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct AggregatedSourceFluxStats +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Print aggregated statistics of all source fluxes in a mesh"; } +}; + +struct CFL +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "CFL information"; } +}; + +struct Crossflow +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Crossflow information"; } +}; + +struct DetailedRegionsSourceFluxStats +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Print statistics for each source flux in each regions"; } +}; + + +struct DetailedSourceFluxStats +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "Print statistics for each source flux in a mesh"; } +}; + +struct StencilConnection +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Log stencil stored connection"; } +}; + +struct StencilInitialization +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Information on stencil Initialization"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SourceFluxStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SourceFluxStatistics.cpp index 60fe1abe0e6..2373d3dd112 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SourceFluxStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SourceFluxStatistics.cpp @@ -22,7 +22,7 @@ #include "fieldSpecification/SourceFluxBoundaryCondition.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "LvArray/src/tensorOps.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" namespace geos { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp index f8776e4c3ee..1453d4bc75f 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp @@ -24,7 +24,7 @@ #include "finiteVolume/TwoPointFluxApproximation.hpp" #include "constitutive/permeability/PermeabilityBase.hpp" #include "constitutive/permeability/PermeabilityFields.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/StencilAccessors.hpp" #include "physicsSolvers/PhysicsSolverManager.hpp" #include "common/format/table/TableFormatter.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index a47a995917d..ddea02b273e 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -35,6 +35,7 @@ #include "mesh/WellElementSubRegion.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" #include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellFields.hpp" #include "physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellFields.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp new file mode 100644 index 00000000000..5c209802abc --- /dev/null +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp @@ -0,0 +1,71 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP_ +#define GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP_ + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct SystemSolution +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Log single phase well system solution"; } +}; + +struct WellComponents +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Well components information"; } +}; + +struct WellControl +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Well control information"; } +}; + +struct WellValidity +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Well validity information"; } +}; + + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp index 9c9f4b60a5e..0a63ebec115 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp @@ -30,7 +30,7 @@ #include "mesh/WellElementSubRegion.hpp" #include "mesh/PerforationFields.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp index 21b787330e6..dd2ba9d1054 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp @@ -17,11 +17,11 @@ * @file WellControls.cpp */ +#include "LogLevelsInfo.hpp" #include "WellControls.hpp" #include "WellConstants.hpp" #include "dataRepository/InputFlags.hpp" #include "functions/FunctionManager.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp index e1b2df5598d..b7f84fa353a 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp @@ -23,7 +23,7 @@ #include "mesh/PerforationFields.hpp" #include "mesh/WellElementRegion.hpp" #include "mesh/WellElementSubRegion.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBase.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" diff --git a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp index ac78a60c706..94b06739486 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp @@ -25,10 +25,10 @@ #include "constitutive/fluid/multifluid/MultiFluidBase.hpp" #include "mesh/PerforationFields.hpp" #include "physicsSolvers/multiphysics/CoupledReservoirAndWellKernels.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseUtilities.hpp" +#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.hpp" #include "physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt b/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt index 0ed8b2031cb..7ac5d3ae114 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt @@ -3,6 +3,7 @@ set( physicsSolvers_headers ${physicsSolvers_headers} surfaceGeneration/EmbeddedSurfaceGenerator.hpp surfaceGeneration/EmbeddedSurfacesParallelSynchronization.hpp + surfaceGeneration/LogLevelsInfo.hpp surfaceGeneration/ParallelTopologyChange.hpp surfaceGeneration/SurfaceGenerator.hpp surfaceGeneration/SurfaceGeneratorFields.hpp diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp new file mode 100644 index 00000000000..85452d82388 --- /dev/null +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp @@ -0,0 +1,51 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP_ +#define GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP_ + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +struct Mapping +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "Mapping information"; } +}; + +struct RuptureRate +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Rupture rate information"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp index b63d1509633..7315c4a0093 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp @@ -30,8 +30,9 @@ #include "physicsSolvers/solidMechanics/SolidMechanicsFields.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/solidMechanics/kernels/SolidMechanicsLagrangianFEMKernels.hpp" -#include "physicsSolvers/surfaceGeneration/SurfaceGeneratorFields.hpp" #include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp" +#include "physicsSolvers/surfaceGeneration/SurfaceGeneratorFields.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "kernels/surfaceGenerationKernels.hpp" diff --git a/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt b/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt index 54fe46da9fa..cfb502c9b1d 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/wavePropagation/CMakeLists.txt @@ -1,6 +1,7 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} + wavePropagation/LogLevelsInfo.hpp wavePropagation/shared/WaveSolverBase.hpp wavePropagation/shared/WaveSolverUtils.hpp wavePropagation/shared/PrecomputeSourcesAndReceiversKernel.hpp diff --git a/src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp new file mode 100644 index 00000000000..a107ff9f481 --- /dev/null +++ b/src/coreComponents/physicsSolvers/wavePropagation/LogLevelsInfo.hpp @@ -0,0 +1,51 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_LOGLEVELSINFO_HPP_ +#define GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_LOGLEVELSINFO_HPP_ + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +struct DASType +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "DAS type information"; } +}; + +struct PMLParameters +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Information on Perfectly match layers parameters"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_WAVEPROPAGATION_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp index 58bde171703..aa449063929 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/sem/acoustic/secondOrderEqn/isotropic/AcousticWaveEquationSEM.cpp @@ -34,7 +34,7 @@ #include "events/EventManager.hpp" #include "AcousticPMLSEMKernel.hpp" #include "physicsSolvers/wavePropagation/shared/PrecomputeSourcesAndReceiversKernel.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/wavePropagation/LogLevelsInfo.hpp" namespace geos { diff --git a/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp b/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp index d3d237d23bd..df5116dcec6 100644 --- a/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/wavePropagation/shared/WaveSolverBase.cpp @@ -23,7 +23,7 @@ #include "dataRepository/KeyNames.hpp" #include "finiteElement/FiniteElementDiscretization.hpp" -#include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/wavePropagation/LogLevelsInfo.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "fieldSpecification/PerfectlyMatchedLayer.hpp" #include "mainInterface/ProblemManager.hpp" From 5280ea40af9c85d67df912395524e4f3d0898482 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 23 Jan 2025 15:15:32 +0100 Subject: [PATCH 24/30] add log rst --- .../docs/LogLevelDocumentation.rst | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst diff --git a/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst b/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst new file mode 100644 index 00000000000..527b4063c29 --- /dev/null +++ b/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst @@ -0,0 +1,53 @@ +.. _LogLevelDocumentation: + +Log levels documentation +======================== + +Add a log level +--------------- + +To add a log level, you must respect the following structure and add it to the appropriate ``LogLevelsInfos.hpp`` : + +.. code-block:: c++ + + struct LogName + { + static constexpr int getMinLogLevel() { return logLevel; } + static constexpr std::string_view getDescription() { return msg ; } + }; + +If there is no ``LogLevelsInfos.hpp`` in the corresponding folder, you can create a ``LogLevelsInfos.hpp`` + +Example of usage +---------------- + +To fill in a log level, make sure it is declared in the constructor : + +.. code-block:: c++ + addLogLevel< logInfo::StructName >(); + +To log a message with a log level, 4 macros are defined in LogLevelsInfo.hpp located in dataRepository : + +* GEOS_LOG_LEVEL_INFO( logInfoStruct, msg ) +* GEOS_LOG_LEVEL_INFO_RANK_0( logInfoStruct, msg ) +* GEOS_LOG_LEVEL_INFO_BY_RANK( logInfoStruct, msg ) +* GEOS_LOG_LEVEL_INFO_RANK_0_NLR( logInfoStruct, msg ) + +with ``logInfoStruct`` the name of the associated structure. + +.. code-block:: c++ + + class Base : public dataRepository::Group + { + public: + Base( string const & name ); + { + addLogLevel< logInfo::Message >(); + } + + void outputMessage() + { + GEOS_LOG_LEVEL_INFO( logInfo::Message, "output some description" ); + } + + }; \ No newline at end of file From d3fc9c1736ae3c100bf7113c932f10f83a33eda5 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 23 Jan 2025 15:35:54 +0100 Subject: [PATCH 25/30] spelling rst --- .../dataRepository/docs/LogLevelDocumentation.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst b/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst index 527b4063c29..64898cf2c8e 100644 --- a/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst +++ b/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst @@ -21,9 +21,10 @@ If there is no ``LogLevelsInfos.hpp`` in the corresponding folder, you can creat Example of usage ---------------- -To fill in a log level, make sure it is declared in the constructor : +To use a log level, make sure it is declared in the constructor : .. code-block:: c++ + addLogLevel< logInfo::StructName >(); To log a message with a log level, 4 macros are defined in LogLevelsInfo.hpp located in dataRepository : @@ -33,8 +34,6 @@ To log a message with a log level, 4 macros are defined in LogLevelsInfo.hpp loc * GEOS_LOG_LEVEL_INFO_BY_RANK( logInfoStruct, msg ) * GEOS_LOG_LEVEL_INFO_RANK_0_NLR( logInfoStruct, msg ) -with ``logInfoStruct`` the name of the associated structure. - .. code-block:: c++ class Base : public dataRepository::Group From 3b9b3f9e4262924d86ce511a1f04528f40f8f250 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 23 Jan 2025 16:00:04 +0100 Subject: [PATCH 26/30] add to toctree --- src/coreComponents/dataRepository/docs/dataRepository.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coreComponents/dataRepository/docs/dataRepository.rst b/src/coreComponents/dataRepository/docs/dataRepository.rst index 221cb8823cf..c807ca713de 100644 --- a/src/coreComponents/dataRepository/docs/dataRepository.rst +++ b/src/coreComponents/dataRepository/docs/dataRepository.rst @@ -19,3 +19,4 @@ The components/classes of the data structure that a developer should have some k /coreComponents/dataRepository/docs/Wrapper /coreComponents/dataRepository/docs/ObjectCatalog /coreComponents/dataRepository/docs/MappedVector + /coreComponents/dataRepository/docs/LogLevelDocumentation From e5b74bcf0af7548cf32ab19472d007717fea88b9 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 23 Jan 2025 17:16:11 +0100 Subject: [PATCH 27/30] update rst --- .../dataRepository/docs/LogLevel.rst | 45 ++++++++++++++++ .../docs/LogLevelDocumentation.rst | 52 ------------------- .../dataRepository/docs/dataRepository.rst | 2 +- 3 files changed, 46 insertions(+), 53 deletions(-) create mode 100644 src/coreComponents/dataRepository/docs/LogLevel.rst delete mode 100644 src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst diff --git a/src/coreComponents/dataRepository/docs/LogLevel.rst b/src/coreComponents/dataRepository/docs/LogLevel.rst new file mode 100644 index 00000000000..37ee3a63176 --- /dev/null +++ b/src/coreComponents/dataRepository/docs/LogLevel.rst @@ -0,0 +1,45 @@ +.. _LogLevelDocumentation: + +Log levels documentation +======================== + +Add a log level +--------------- + +To add a log level, you must respect the following structure and add it to the appropriate ``LogLevelsInfos.hpp`` : + +.. code-block:: c++ + + struct MyMessage + { + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return msg; } + }; + +If there is no ``LogLevelsInfos.hpp`` in the corresponding folder, you can create a ``LogLevelsInfos.hpp`` + +Example of usage +---------------- + +To log a message with a log level, 4 macros are defined in LogLevelsInfo.hpp located in dataRepository: + +* ``GEOS_LOG_LEVEL_INFO( logInfoStruct, msg )``: Output messages based on current ``Group``'s log level. +* ``GEOS_LOG_LEVEL_INFO_RANK_0( logInfoStruct, msg )``: Output messages (only on rank 0) based on current ``Group``'s log level. +* ``GEOS_LOG_LEVEL_INFO_BY_RANK( logInfoStruct, msg )``: Output messages (with one line per rank) based on current ``Group``'s log level. +* ``GEOS_LOG_LEVEL_INFO_RANK_0_NLR( logInfoStruct, msg )``: Output messages (only on rank 0) based on current ``Group``'s log level without the line return. + +An exemple of adding and using a log level in a ``group``: + +.. code-block:: c++ + + MyGroup::MyGroup( string const & name ); + { + // To use a log level, make sure it is declared in the constructor of the group + addLogLevel< logInfo::MyMessage >(); + } + + void MyGroup::outputMessage() + { + // effectively output the message taking into account the log level of the group instance + GEOS_LOG_LEVEL_INFO( logInfo::MyMessage, "output some message" ); + } diff --git a/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst b/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst deleted file mode 100644 index 64898cf2c8e..00000000000 --- a/src/coreComponents/dataRepository/docs/LogLevelDocumentation.rst +++ /dev/null @@ -1,52 +0,0 @@ -.. _LogLevelDocumentation: - -Log levels documentation -======================== - -Add a log level ---------------- - -To add a log level, you must respect the following structure and add it to the appropriate ``LogLevelsInfos.hpp`` : - -.. code-block:: c++ - - struct LogName - { - static constexpr int getMinLogLevel() { return logLevel; } - static constexpr std::string_view getDescription() { return msg ; } - }; - -If there is no ``LogLevelsInfos.hpp`` in the corresponding folder, you can create a ``LogLevelsInfos.hpp`` - -Example of usage ----------------- - -To use a log level, make sure it is declared in the constructor : - -.. code-block:: c++ - - addLogLevel< logInfo::StructName >(); - -To log a message with a log level, 4 macros are defined in LogLevelsInfo.hpp located in dataRepository : - -* GEOS_LOG_LEVEL_INFO( logInfoStruct, msg ) -* GEOS_LOG_LEVEL_INFO_RANK_0( logInfoStruct, msg ) -* GEOS_LOG_LEVEL_INFO_BY_RANK( logInfoStruct, msg ) -* GEOS_LOG_LEVEL_INFO_RANK_0_NLR( logInfoStruct, msg ) - -.. code-block:: c++ - - class Base : public dataRepository::Group - { - public: - Base( string const & name ); - { - addLogLevel< logInfo::Message >(); - } - - void outputMessage() - { - GEOS_LOG_LEVEL_INFO( logInfo::Message, "output some description" ); - } - - }; \ No newline at end of file diff --git a/src/coreComponents/dataRepository/docs/dataRepository.rst b/src/coreComponents/dataRepository/docs/dataRepository.rst index c807ca713de..dc493352677 100644 --- a/src/coreComponents/dataRepository/docs/dataRepository.rst +++ b/src/coreComponents/dataRepository/docs/dataRepository.rst @@ -19,4 +19,4 @@ The components/classes of the data structure that a developer should have some k /coreComponents/dataRepository/docs/Wrapper /coreComponents/dataRepository/docs/ObjectCatalog /coreComponents/dataRepository/docs/MappedVector - /coreComponents/dataRepository/docs/LogLevelDocumentation + /coreComponents/dataRepository/docs/LogLevel From 745cfa82eca3b7d67c8a9a8afaba7866cce54ad4 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 23 Jan 2025 17:41:08 +0100 Subject: [PATCH 28/30] missing log level after merge --- .../inducedSeismicity/ExplicitQDRateAndState.cpp | 15 ++++++++++----- .../inducedSeismicity/ImplicitQDRateAndState.cpp | 9 ++++++--- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/ExplicitQDRateAndState.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/ExplicitQDRateAndState.cpp index d6fc3c74871..45ada3f4b3c 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/ExplicitQDRateAndState.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/ExplicitQDRateAndState.cpp @@ -23,6 +23,7 @@ #include "mesh/DomainPartition.hpp" #include "kernels/ExplicitRateAndStateKernels.hpp" #include "rateAndStateFields.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/contact/ContactFields.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" @@ -42,7 +43,9 @@ ExplicitQDRateAndState::ExplicitQDRateAndState( const string & name, m_stepUpdateFactor( 1.0 ), m_controller( PIDController( { 0.6, -0.2, 0.0 }, 1.0e-6, 1.0e-6, 0.81 )) // TODO: The control parameters should be specified in the XML input -{} +{ + addLogLevel< logInfo::SolverSteps >(); +} ExplicitQDRateAndState::~ExplicitQDRateAndState() { @@ -81,7 +84,7 @@ real64 ExplicitQDRateAndState::solverStep( real64 const & time_n, real64 dtAdaptive = dt; - GEOS_LOG_LEVEL_RANK_0( 1, "Begin adaptive time step" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Rate and State solver" ); while( true ) // Adaptive time step loop. Performs a Runge-Kutta time stepping with error control on state and slip { real64 dtStress; GEOS_UNUSED_VAR( dtStress ); @@ -237,7 +240,7 @@ void ExplicitQDRateAndState::updateSlipVelocity( real64 const & time_n, real64 const & dt, DomainPartition & domain ) const { - GEOS_LOG_LEVEL_RANK_0( 1, "Rate and State solver" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Rate and State solver" ); integer const maxIterNewton = m_nonlinearSolverParameters.m_maxIterNewton; real64 const newtonTol = m_nonlinearSolverParameters.m_newtonTol; forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&]( string const &, @@ -296,11 +299,13 @@ real64 ExplicitQDRateAndState::setNextDt( real64 const & currentDt, DomainPartit real64 const nextDt = m_stepUpdateFactor*currentDt; if( m_successfulStep ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Adaptive time step successful. The next dt will be {:.2e} s", nextDt )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, + GEOS_FMT( "Adaptive time step successful. The next dt will be {:.2e} s", nextDt )); } else { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Adaptive time step failed. Retry step with dt {:.2e} s", nextDt )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, + GEOS_FMT( "Adaptive time step failed. Retry step with dt {:.2e} s", nextDt )); } return nextDt; } diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/ImplicitQDRateAndState.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/ImplicitQDRateAndState.cpp index 733fbe4ab7a..7fb3b15e2ae 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/ImplicitQDRateAndState.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/ImplicitQDRateAndState.cpp @@ -23,6 +23,7 @@ #include "mesh/DomainPartition.hpp" #include "kernels/ImplicitRateAndStateKernels.hpp" #include "rateAndStateFields.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/contact/ContactFields.hpp" @@ -42,6 +43,8 @@ ImplicitQDRateAndState::ImplicitQDRateAndState( const string & name, setInputFlag( InputFlags::OPTIONAL ). setApplyDefaultValue( 1.0e-7 ). setDescription( "Target slip incrmeent for timestep size selction" ); + + addLogLevel< logInfo::SolverSteps >(); } ImplicitQDRateAndState::~ImplicitQDRateAndState() @@ -84,9 +87,9 @@ real64 ImplicitQDRateAndState::solverStep( real64 const & time_n, DomainPartition & domain ) { applyInitialConditionsToFault( cycleNumber, domain ); - GEOS_LOG_LEVEL_RANK_0( 1, "Stress solver" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Stress solver" ); updateStresses( time_n, dt, cycleNumber, domain ); - GEOS_LOG_LEVEL_RANK_0( 1, "Rate and state solver" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Rate and state solver" ); solveRateAndStateEquations( time_n, dt, domain ); saveState( domain ); return dt; @@ -134,7 +137,7 @@ real64 ImplicitQDRateAndState::setNextDt( real64 const & currentDt, DomainPartit real64 const nextDt = m_targetSlipIncrement / maxSlipRate; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "The next dt will be {:.2e} s", nextDt )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, GEOS_FMT( "The next dt will be {:.2e} s", nextDt )); return nextDt; } From 5614b9af8bf75d85664464d616286c10d69a604f Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 30 Jan 2025 13:14:04 +0100 Subject: [PATCH 29/30] xsd --- src/coreComponents/schema/schema.xsd | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 56477870ce1..a8e24eb7fac 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -2245,8 +2245,11 @@ Level 0 outputs no specific information for this solver. Higher levels require m Level 0 outputs no specific information for this solver. Higher levels require more outputs. 1 - Output timing information +2 + - Information on output events (VTK/ChomboIO/HDF5) 3 - - Information on Time history Initialization--> + - Information on Time history Initialization + - Information on buffered data in an HDF5 file --> @@ -2269,7 +2272,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m 1 - Output timing information 2 - - Information on output events, VTK/ChomboIO--> + - Information on output events (VTK/ChomboIO/HDF5)--> @@ -3263,6 +3266,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - Solver step Information 2 - The summary of declared fields and coupling--> @@ -3298,6 +3303,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - Solver step Information 2 - The summary of declared fields and coupling--> @@ -3430,6 +3437,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - Solver step Information 2 - The summary of declared fields and coupling--> @@ -3467,6 +3476,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration + - Solver step Information 2 - The summary of declared fields and coupling--> @@ -3673,6 +3684,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Print linear solver configuration - Coupling information 2 - The summary of declared fields and coupling--> @@ -4475,7 +4487,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Print linear solver configuration 2 - The summary of declared fields and coupling - - Configuration information--> + - Solver runtime settings--> @@ -4589,7 +4601,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Print linear solver configuration 2 - The summary of declared fields and coupling - - Configuration information--> + - Solver runtime settings--> From 6053fe25d7050e9dc01f54be767a9bd5b26518a4 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 30 Jan 2025 13:53:25 +0100 Subject: [PATCH 30/30] remove old addLevelMechanics --- .../fluid/multifluid/CO2Brine/CO2BrineFluid.cpp | 2 -- .../constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp | 1 - .../fluid/multiFluid/reactive/ReactiveFluidDriver.cpp | 2 -- .../relativePermeability/RelpermDriver.cpp | 2 -- .../constitutiveDrivers/solid/TriaxialDriver.cpp | 1 - src/coreComponents/dataRepository/Group.cpp | 9 --------- src/coreComponents/dataRepository/Group.hpp | 5 ----- src/coreComponents/dataRepository/LogLevelsRegistry.cpp | 2 +- src/coreComponents/events/EventBase.cpp | 3 --- src/coreComponents/events/EventManager.cpp | 3 --- .../fieldSpecification/FieldSpecificationBase.cpp | 2 -- src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp | 2 -- src/coreComponents/fileIO/Outputs/VTKOutput.cpp | 2 -- .../mesh/generators/ExternalMeshGeneratorBase.cpp | 2 -- .../mesh/generators/InternalWellGenerator.cpp | 2 -- .../physicsSolvers/FieldStatisticsBase.hpp | 1 - .../physicsSolvers/LinearSolverParameters.cpp | 1 - .../physicsSolvers/NonlinearSolverParameters.cpp | 3 --- .../physicsSolvers/fluidFlow/StencilDataCollection.cpp | 1 - .../physicsSolvers/fluidFlow/wells/WellControls.cpp | 2 -- .../multiphysics/PoromechanicsInitialization.cpp | 1 - .../solidMechanics/SolidMechanicsStateReset.cpp | 1 - 22 files changed, 1 insertion(+), 49 deletions(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.cpp index ee6b5482a92..06df7a19f9b 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.cpp @@ -86,8 +86,6 @@ CO2BrineFluid< PHASE1, PHASE2, FLASH >:: CO2BrineFluid( string const & name, Group * const parent ): MultiFluidBase( name, parent ) { - enableLogLevelInput(); - registerWrapper( viewKeyStruct::phasePVTParaFilesString(), &m_phasePVTParaFiles ). setInputFlag( InputFlags::REQUIRED ). setRestartFlags( RestartFlags::NO_WRITE ). diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp index 56cece6e149..cae20646b4c 100644 --- a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp @@ -41,7 +41,6 @@ PVTDriver::PVTDriver( const string & name, Group * const parent ): TaskBase( name, parent ) { - enableLogLevelInput(); registerWrapper( viewKeyStruct::fluidNameString(), &m_fluidName ). setRTTypeName( rtTypes::CustomTypes::groupNameRef ). diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp index 1d0259bcd5c..966c9099620 100644 --- a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp @@ -32,8 +32,6 @@ ReactiveFluidDriver::ReactiveFluidDriver( const string & name, Group * const parent ): TaskBase( name, parent ) { - enableLogLevelInput(); - registerWrapper( viewKeyStruct::fluidNameString(), &m_fluidName ). setRTTypeName( rtTypes::CustomTypes::groupNameRef ). setInputFlag( InputFlags::REQUIRED ). diff --git a/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp index 06085a50861..f333061692d 100644 --- a/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp @@ -33,8 +33,6 @@ RelpermDriver::RelpermDriver( const geos::string & name, : TaskBase( name, parent ) { - enableLogLevelInput(); - registerWrapper( viewKeyStruct::relpermNameString(), &m_relpermName ). setRTTypeName( rtTypes::CustomTypes::groupNameRef ). setInputFlag( InputFlags::REQUIRED ). diff --git a/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp index 6dbd8bb13c3..371599ad756 100644 --- a/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp @@ -29,7 +29,6 @@ TriaxialDriver::TriaxialDriver( const string & name, Group * const parent ): TaskBase( name, parent ) { - enableLogLevelInput(); registerWrapper( viewKeyStruct::solidMaterialNameString(), &m_solidMaterialName ). setRTTypeName( rtTypes::CustomTypes::groupNameRef ). diff --git a/src/coreComponents/dataRepository/Group.cpp b/src/coreComponents/dataRepository/Group.cpp index 8665b5aa9c7..2e602499447 100644 --- a/src/coreComponents/dataRepository/Group.cpp +++ b/src/coreComponents/dataRepository/Group.cpp @@ -651,15 +651,6 @@ void Group::postRestartInitializationRecursive() postRestartInitialization(); } -void Group::enableLogLevelInput() -{ - // TODO : Improve the Log Level description to clearly assign a usecase per log level (incoming PR). - registerWrapper( viewKeyStruct::logLevelString(), &m_logLevel ). - setApplyDefaultValue( 0 ). - setInputFlag( InputFlags::OPTIONAL ). - setDescription( "Log level" ); -} - Group const & Group::getBaseGroupByPath( string const & path ) const { Group const * currentGroup = this; diff --git a/src/coreComponents/dataRepository/Group.hpp b/src/coreComponents/dataRepository/Group.hpp index 627e0fd4e6f..0beaf06bc82 100644 --- a/src/coreComponents/dataRepository/Group.hpp +++ b/src/coreComponents/dataRepository/Group.hpp @@ -1492,11 +1492,6 @@ class Group */ void loadFromConduit(); - /** - * @deprecated will be remove and replace by addLogLevel - */ - void enableLogLevelInput(); - /** * @brief Set verbosity level * @param logLevel new verbosity level value diff --git a/src/coreComponents/dataRepository/LogLevelsRegistry.cpp b/src/coreComponents/dataRepository/LogLevelsRegistry.cpp index 3f81ef9e285..45f8a0e5361 100644 --- a/src/coreComponents/dataRepository/LogLevelsRegistry.cpp +++ b/src/coreComponents/dataRepository/LogLevelsRegistry.cpp @@ -27,7 +27,7 @@ string LogLevelsRegistry::buildLogLevelDescription() const { std::ostringstream description; description << "Sets the level of information to write in the standard output (the console typically).\n" - "Level 0 outputs no specific information for this solver. Higher levels require more outputs."; + "Information output from lower logLevels is added with the desired log level"; for( auto const & [logLevel, logDescriptions] : m_logLevelsDescriptions ) { description << GEOS_FMT( "\n{}\n", logLevel ); diff --git a/src/coreComponents/events/EventBase.cpp b/src/coreComponents/events/EventBase.cpp index 7ce144eddb4..f3ac05db64c 100644 --- a/src/coreComponents/events/EventBase.cpp +++ b/src/coreComponents/events/EventBase.cpp @@ -54,9 +54,6 @@ EventBase::EventBase( const string & name, { setInputFlags( InputFlags::OPTIONAL_NONUNIQUE ); - // This enables logLevel filtering - enableLogLevelInput(); - registerWrapper( viewKeyStruct::eventTargetString(), &m_eventTarget ). setRTTypeName( rtTypes::CustomTypes::groupNameRef ). setInputFlag( InputFlags::OPTIONAL ). diff --git a/src/coreComponents/events/EventManager.cpp b/src/coreComponents/events/EventManager.cpp index 8be7518cc57..c39296ec74b 100644 --- a/src/coreComponents/events/EventManager.cpp +++ b/src/coreComponents/events/EventManager.cpp @@ -46,9 +46,6 @@ EventManager::EventManager( string const & name, { setInputFlags( InputFlags::REQUIRED ); - // This enables logLevel filtering - enableLogLevelInput(); - registerWrapper( viewKeyStruct::minTimeString(), &m_minTime ). setApplyDefaultValue( 0 ). setInputFlag( InputFlags::OPTIONAL ). diff --git a/src/coreComponents/fieldSpecification/FieldSpecificationBase.cpp b/src/coreComponents/fieldSpecification/FieldSpecificationBase.cpp index 693ecc2f4aa..76c3619a2c4 100644 --- a/src/coreComponents/fieldSpecification/FieldSpecificationBase.cpp +++ b/src/coreComponents/fieldSpecification/FieldSpecificationBase.cpp @@ -82,8 +82,6 @@ FieldSpecificationBase::FieldSpecificationBase( string const & name, Group * par setApplyDefaultValue( 1.0e99 ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Time at which the boundary condition will stop being applied." ); - - enableLogLevelInput(); } diff --git a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp index c97aa459ae2..7302e01754b 100644 --- a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp @@ -49,8 +49,6 @@ TimeHistoryOutput::TimeHistoryOutput( string const & name, m_recordCount( 0 ), m_io( ) { - enableLogLevelInput(); - registerWrapper( viewKeys::timeHistoryOutputTargetString(), &m_collectorPaths ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). setInputFlag( InputFlags::REQUIRED ). diff --git a/src/coreComponents/fileIO/Outputs/VTKOutput.cpp b/src/coreComponents/fileIO/Outputs/VTKOutput.cpp index 23bdb3c4649..872475b0c85 100644 --- a/src/coreComponents/fileIO/Outputs/VTKOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/VTKOutput.cpp @@ -55,8 +55,6 @@ VTKOutput::VTKOutput( string const & name, m_levelNames(), m_writer( getOutputDirectory() + '/' + m_plotFileRoot ) { - enableLogLevelInput(); - registerWrapper( viewKeysStruct::plotFileRoot, &m_plotFileRoot ). setDefaultValue( m_plotFileRoot ). setInputFlag( InputFlags::OPTIONAL ). diff --git a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp index ff3cd238c91..280d062829f 100644 --- a/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp +++ b/src/coreComponents/mesh/generators/ExternalMeshGeneratorBase.cpp @@ -24,8 +24,6 @@ ExternalMeshGeneratorBase::ExternalMeshGeneratorBase( string const & name, dataRepository::Group * const parent ) : MeshGeneratorBase( name, parent ) { - enableLogLevelInput(); - registerWrapper( viewKeyStruct::filePathString(), &m_filePath ). setInputFlag( InputFlags::REQUIRED ). setRestartFlags( RestartFlags::NO_WRITE ). diff --git a/src/coreComponents/mesh/generators/InternalWellGenerator.cpp b/src/coreComponents/mesh/generators/InternalWellGenerator.cpp index ffffbd7e3a8..88a36aebeff 100644 --- a/src/coreComponents/mesh/generators/InternalWellGenerator.cpp +++ b/src/coreComponents/mesh/generators/InternalWellGenerator.cpp @@ -27,8 +27,6 @@ using namespace dataRepository; InternalWellGenerator::InternalWellGenerator( string const & name, Group * const parent ): WellGeneratorBase( name, parent ) { - enableLogLevelInput(); - registerWrapper( viewKeyStruct::polylineNodeCoordsString(), &m_polyNodeCoords ). setInputFlag( InputFlags::REQUIRED ). setSizedFromParent( 0 ). diff --git a/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp b/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp index c2516decb26..2b5e2700a59 100644 --- a/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp +++ b/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp @@ -49,7 +49,6 @@ class FieldStatisticsBase : public TaskBase m_solver( nullptr ), m_outputDir( joinPath( OutputBase::getOutputDirectory(), name ) ) { - enableLogLevelInput(); string const key = SOLVER::coupledSolverAttributePrefix() + "SolverName"; registerWrapper( key, &m_solverName ). diff --git a/src/coreComponents/physicsSolvers/LinearSolverParameters.cpp b/src/coreComponents/physicsSolvers/LinearSolverParameters.cpp index cdf39353527..5b7683e1f95 100644 --- a/src/coreComponents/physicsSolvers/LinearSolverParameters.cpp +++ b/src/coreComponents/physicsSolvers/LinearSolverParameters.cpp @@ -30,7 +30,6 @@ LinearSolverParametersInput::LinearSolverParametersInput( string const & name, Group( name, parent ) { setInputFlags( InputFlags::OPTIONAL ); - enableLogLevelInput(); registerWrapper( viewKeyStruct::solverTypeString(), &m_parameters.solverType ). setApplyDefaultValue( m_parameters.solverType ). diff --git a/src/coreComponents/physicsSolvers/NonlinearSolverParameters.cpp b/src/coreComponents/physicsSolvers/NonlinearSolverParameters.cpp index dd9c0d58a7c..73d38534f4a 100644 --- a/src/coreComponents/physicsSolvers/NonlinearSolverParameters.cpp +++ b/src/coreComponents/physicsSolvers/NonlinearSolverParameters.cpp @@ -28,9 +28,6 @@ NonlinearSolverParameters::NonlinearSolverParameters( string const & name, { setInputFlags( InputFlags::OPTIONAL ); - // This enables logLevel filtering - enableLogLevelInput(); - registerWrapper( viewKeysStruct::lineSearchActionString(), &m_lineSearchAction ). setApplyDefaultValue( LineSearchAction::Attempt ). setInputFlag( InputFlags::OPTIONAL ). diff --git a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp index 1453d4bc75f..55df247b767 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp @@ -40,7 +40,6 @@ StencilDataCollection::StencilDataCollection( const string & name, Group * const parent ): Base( name, parent ) { - enableLogLevelInput(); getWrapperBase( Group::viewKeyStruct::logLevelString() ). setDescription( "When higher than 1: Display store events details." ); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp index dd2ba9d1054..ba2ab9bb0fe 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp @@ -53,8 +53,6 @@ WellControls::WellControls( string const & name, Group * const parent ) { setInputFlags( InputFlags::OPTIONAL_NONUNIQUE ); - enableLogLevelInput(); - registerWrapper( viewKeyStruct::typeString(), &m_type ). setInputFlag( InputFlags::REQUIRED ). setDescription( "Well type. Valid options:\n* " + EnumStrings< Type >::concat( "\n* " ) ); diff --git a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp index 8dae6abbe58..f05e2569e26 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp @@ -47,7 +47,6 @@ PoromechanicsInitialization( const string & name, m_solidMechanicsStatistics(), m_solidMechanicsStateResetTask( name, parent ) { - enableLogLevelInput(); registerWrapper( viewKeyStruct::poromechanicsSolverNameString(), &m_poromechanicsSolverName ). setRTTypeName( rtTypes::CustomTypes::groupNameRef ). diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp index 6524a281dc8..4cd618a734a 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp @@ -36,7 +36,6 @@ SolidMechanicsStateReset::SolidMechanicsStateReset( const string & name, TaskBase( name, parent ), m_solidSolverName() { - enableLogLevelInput(); registerWrapper( viewKeyStruct::solidSolverNameString(), &m_solidSolverName ). setRTTypeName( rtTypes::CustomTypes::groupNameRef ).