diff --git a/inputFiles/compositionalMultiphaseFlow/benchmarks/SPE11/b/include/dirichlet_boundary_vti.xml b/inputFiles/compositionalMultiphaseFlow/benchmarks/SPE11/b/include/dirichlet_boundary_vti.xml index a09e5adc0e3..ccd758c5ff2 100644 --- a/inputFiles/compositionalMultiphaseFlow/benchmarks/SPE11/b/include/dirichlet_boundary_vti.xml +++ b/inputFiles/compositionalMultiphaseFlow/benchmarks/SPE11/b/include/dirichlet_boundary_vti.xml @@ -7,15 +7,13 @@ objectPath="ElementRegions" fieldName="temperature" scale="313.15" - setNames="{ top }" - logLevel="0" /> + setNames="{ top }" /> + setNames="{ bottom }" /> diff --git a/inputFiles/compositionalMultiphaseFlow/benchmarks/SPE11/b/spe11b_vti_source_base.xml b/inputFiles/compositionalMultiphaseFlow/benchmarks/SPE11/b/spe11b_vti_source_base.xml index c57445ffb61..6e154a1faaf 100644 --- a/inputFiles/compositionalMultiphaseFlow/benchmarks/SPE11/b/spe11b_vti_source_base.xml +++ b/inputFiles/compositionalMultiphaseFlow/benchmarks/SPE11/b/spe11b_vti_source_base.xml @@ -216,8 +216,7 @@ component="0" functionName="totalRateTable1" scale="1" - setNames="{ thermalSource1 }" - logLevel="0" /> + setNames="{ thermalSource1 }" /> + setNames="{ thermalSource2 }" /> diff --git a/inputFiles/compositionalMultiphaseFlow/co2_flux_3d.xml b/inputFiles/compositionalMultiphaseFlow/co2_flux_3d.xml index 5620659caa9..04e3d35a82c 100644 --- a/inputFiles/compositionalMultiphaseFlow/co2_flux_3d.xml +++ b/inputFiles/compositionalMultiphaseFlow/co2_flux_3d.xml @@ -231,7 +231,6 @@ + setNames="{ all }"/> diff --git a/inputFiles/singlePhaseFlow/compressible_2d_2fluids_hybrid.xml b/inputFiles/singlePhaseFlow/compressible_2d_2fluids_hybrid.xml index c7589636004..089afa9b95c 100644 --- a/inputFiles/singlePhaseFlow/compressible_2d_2fluids_hybrid.xml +++ b/inputFiles/singlePhaseFlow/compressible_2d_2fluids_hybrid.xml @@ -170,7 +170,6 @@ + setNames="{ zpos }"/> + setNames="{ zpos }"/> + setNames="{ zpos }"/> + setNames="{ zpos }"/> (); + + addLogLevel< logInfo::TableLogOutput >(); } template< typename PHASE1, typename PHASE2, typename FLASH > @@ -214,6 +215,8 @@ void CO2BrineFluid< PHASE1, PHASE2, FLASH >::postInputInitialization() { MultiFluidBase::postInputInitialization(); + m_writeInLog = isLogLevelActive< logInfo::TableLogOutput >( this->getLogLevel() ); + GEOS_THROW_IF_NE_MSG( numFluidPhases(), 2, GEOS_FMT( "{}: invalid number of phases", getFullName() ), InputError ); @@ -337,22 +340,21 @@ void CO2BrineFluid< PHASE1, PHASE2, FLASH >::createPVTModels() // then, we are ready to instantiate the phase models bool const isClone = this->isClone(); - TableFunction::OutputOptions const pvtOutputOpts = { - !isClone && m_writeCSV,// writeCSV - !isClone && isLogLevelActive< logInfo::PVT >( this->getLogLevel()), // writeInLog + TableFunction::OutputOptions const outputOpts = { + !isClone && m_writeCSV, // writeCSV + !isClone && m_writeInLog // writeInLog }; - m_phase1 = std::make_unique< PHASE1 >( getName() + "_phaseModel1", phase1InputParams, m_componentNames, m_componentMolarWeight, - pvtOutputOpts ); + outputOpts ); m_phase2 = std::make_unique< PHASE2 >( getName() + "_phaseModel2", phase2InputParams, m_componentNames, m_componentMolarWeight, - pvtOutputOpts ); + outputOpts ); // 2) Create the flash model @@ -374,16 +376,12 @@ void CO2BrineFluid< PHASE1, PHASE2, FLASH >::createPVTModels() { if( strs[1] == FLASH::catalogName() ) { - TableFunction::OutputOptions const flashOutputOpts = { - !isClone && m_writeCSV,// writeCSV - !isClone && isLogLevelActive< logInfo::PVT >( this->getLogLevel()), // writeInLog - }; m_flash = std::make_unique< FLASH >( getName() + '_' + FLASH::catalogName(), strs, m_phaseNames, m_componentNames, m_componentMolarWeight, - flashOutputOpts ); + outputOpts ); } } else @@ -420,17 +418,12 @@ void CO2BrineFluid< PHASE1, PHASE2, FLASH >::createPVTModels() strs[2] = m_solubilityTables[0]; } - TableFunction::OutputOptions const flashOutputOpts = { - !isClone && m_writeCSV,// writeCSV - !isClone && isLogLevelActive< logInfo::PVT >( this->getLogLevel() ), // writeInLog - }; - m_flash = std::make_unique< FLASH >( getName() + '_' + FLASH::catalogName(), strs, m_phaseNames, m_componentNames, m_componentMolarWeight, - flashOutputOpts ); + outputOpts ); } GEOS_THROW_IF( m_flash == nullptr, diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp index 1b89321acd7..8a1bc5f5d38 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp @@ -210,6 +210,9 @@ class CO2BrineFluid : public MultiFluidBase /// Output csv file containing informations about PVT integer m_writeCSV; + /// Write PVT tables in log + bool m_writeInLog; + /// integer m_checkPhasePresence; diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/LogLevelsInfo.hpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/LogLevelsInfo.hpp deleted file mode 100644 index e976c64b633..00000000000 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/LogLevelsInfo.hpp +++ /dev/null @@ -1,50 +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 common log level informations for CO2Brine - */ - -#ifndef GEOS_CONSTITUTIVE_FLUID_MULTIFLUID_CO2BRINE_LOGLEVELSINFO_HPP -#define GEOS_CONSTITUTIVE_FLUID_MULTIFLUID_CO2BRINE_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. - */ -///@{ - -struct PVT -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Output PVT table"; } -}; - -/// @cond DO_NOT_DOCUMENT -/// @endcond -///@} - -} - -} - -#endif // GEOS_CONSTITUTIVE_FLUID_MULTIFLUID_CO2BRINE_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/constitutive/fluid/multifluid/LogLevelsInfo.hpp b/src/coreComponents/constitutive/fluid/multifluid/LogLevelsInfo.hpp index cc3b7f17048..762c6f29460 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/LogLevelsInfo.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/LogLevelsInfo.hpp @@ -33,10 +33,10 @@ namespace logInfo */ ///@{ -struct PVT +struct TableLogOutput { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Output PVT table"; } + static constexpr std::string_view getDescription() { return "Output PVT table to log"; } }; /// @cond DO_NOT_DOCUMENT diff --git a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveBrineFluid.cpp b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveBrineFluid.cpp index cbcd30ab204..1d0fa125c5b 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveBrineFluid.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveBrineFluid.cpp @@ -89,7 +89,7 @@ ReactiveBrineFluid( string const & name, Group * const parent ): setRestartFlags( RestartFlags::WRITE_AND_READ ); } - addLogLevel< logInfo::PVT >(); + addLogLevel< logInfo::TableLogOutput >(); } template< typename PHASE > @@ -127,6 +127,8 @@ void ReactiveBrineFluid< PHASE > ::postInputInitialization() { ReactiveMultiFluid::postInputInitialization(); + m_writeInLog = isLogLevelActive< logInfo::TableLogOutput >( this->getLogLevel() ); + GEOS_THROW_IF_NE_MSG( numFluidPhases(), 1, GEOS_FMT( "{}: invalid number of phases", getFullName() ), InputError ); @@ -205,8 +207,8 @@ void ReactiveBrineFluid< PHASE > ::createPVTModels() bool const isClone = this->isClone(); TableFunction::OutputOptions const pvtOutputOpts = { - !isClone && m_writeCSV,// writeCSV - !isClone && isLogLevelActive< logInfo::PVT >( this->getLogLevel() ), // writeInLog + !isClone && m_writeCSV, // writeCSV + !isClone && m_writeInLog // writeInLog }; // then, we are ready to instantiate the phase models diff --git a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveBrineFluid.hpp b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveBrineFluid.hpp index f1d88712b00..8b460ffcb1b 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveBrineFluid.hpp +++ b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveBrineFluid.hpp @@ -172,6 +172,9 @@ class ReactiveBrineFluid : public ReactiveMultiFluid /// Output csv file containing informations about PVT integer m_writeCSV; + /// Write PVT tables in log + bool m_writeInLog; + /// Brine constitutive models std::unique_ptr< PHASE > m_phase; diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/LogLevelsInfo.hpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/LogLevelsInfo.hpp index 37c6f61b8d4..492c5e62b1f 100644 --- a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/LogLevelsInfo.hpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/LogLevelsInfo.hpp @@ -36,16 +36,10 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT -struct Initialisation +struct LogOutput { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Informations on initialisation"; } -}; - -struct Results -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Output results"; } + static constexpr std::string_view getDescription() { return "Enable log output"; } }; /// @endcond diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp index 20dd527aea9..49263cd1e07 100644 --- a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp @@ -96,8 +96,7 @@ PVTDriver::PVTDriver( const string & name, setApplyDefaultValue( "none" ). setDescription( "Baseline file" ); - addLogLevel< logInfo::Initialisation >(); - addLogLevel< logInfo::Results >(); + addLogLevel< logInfo::LogOutput >(); } void PVTDriver::postInputInitialization() @@ -212,19 +211,19 @@ bool PVTDriver::execute( real64 const GEOS_UNUSED_PARAM( time_n ), // depending on logLevel, print some useful info - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, "Launching PVT Driver" ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Fluid .................. " << m_fluidName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Type ................... " << baseFluid.getCatalogName() ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " No. of Phases .......... " << m_numPhases ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " No. of Components ...... " << m_numComponents ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Pressure Control ....... " << m_pressureFunctionName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Temperature Control .... " << m_temperatureFunctionName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Steps .................. " << m_numSteps ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Output ................. " << m_outputFile ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Baseline ............... " << m_baselineFile ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Output Mass Density .... " << m_outputMassDensity ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Output Compressibility . " << m_outputCompressibility ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Output Phase Comp. ..... " << m_outputPhaseComposition ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, "Launching PVT Driver" ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Fluid .................. " << m_fluidName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Type ................... " << baseFluid.getCatalogName() ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " No. of Phases .......... " << m_numPhases ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " No. of Components ...... " << m_numComponents ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Pressure Control ....... " << m_pressureFunctionName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Temperature Control .... " << m_temperatureFunctionName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Steps .................. " << m_numSteps ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Output ................. " << m_outputFile ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Baseline ............... " << m_baselineFile ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Output Mass Density .... " << m_outputMassDensity ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Output Compressibility . " << m_outputCompressibility ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Output Phase Comp. ..... " << m_outputPhaseComposition ); // create a dummy discretization with one quadrature point for // storing constitutive data @@ -386,7 +385,7 @@ void PVTDriver::compareWithBaseline() // success - GEOS_LOG_LEVEL_RANK_0( logInfo::Results, " Comparison ............. Internal results consistent with baseline." ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Comparison ............. Internal results consistent with baseline." ); file.close(); } diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp index 940a5336036..8bf8db3077d 100644 --- a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp @@ -66,8 +66,7 @@ ReactiveFluidDriver::ReactiveFluidDriver( const string & name, setApplyDefaultValue( "none" ). setDescription( "Baseline file" ); - addLogLevel< logInfo::Initialisation >(); - addLogLevel< logInfo::Results >(); + addLogLevel< logInfo::LogOutput >(); } @@ -138,18 +137,18 @@ bool ReactiveFluidDriver::execute( real64 const GEOS_UNUSED_PARAM( time_n ), // depending on logLevel, print some useful info - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, "Launching ReactiveFluid Driver" ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Fluid .................. " << m_fluidName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Type ................... " << baseFluid.getCatalogName() ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " No. of Phases .......... " << m_numPhases ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " No. of Primary Species ...... " << m_numPrimarySpecies ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " No. of Secondary Species ...... " << m_numSecondarySpecies ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " No. of Kinetic Reactions ...... " << m_numKineticReactions ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Pressure Control ....... " << m_pressureFunctionName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Temperature Control .... " << m_temperatureFunctionName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Steps .................. " << m_numSteps ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Output ................. " << m_outputFile ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Baseline ............... " << m_baselineFile ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, "Launching ReactiveFluid Driver" ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Fluid .................. " << m_fluidName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Type ................... " << baseFluid.getCatalogName() ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " No. of Phases .......... " << m_numPhases ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " No. of Primary Species ...... " << m_numPrimarySpecies ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " No. of Secondary Species ...... " << m_numSecondarySpecies ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " No. of Kinetic Reactions ...... " << m_numKineticReactions ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Pressure Control ....... " << m_pressureFunctionName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Temperature Control .... " << m_temperatureFunctionName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Steps .................. " << m_numSteps ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Output ................. " << m_outputFile ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Baseline ............... " << m_baselineFile ); // create a dummy discretization with one quadrature point for // storing constitutive data @@ -342,7 +341,7 @@ void ReactiveFluidDriver::compareWithBaseline() // success - GEOS_LOG_LEVEL_RANK_0( logInfo::Results, " Comparison ............. Internal results consistent with baseline." ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Comparison ............. Internal results consistent with baseline." ); file.close(); } diff --git a/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp index 85c9906a151..86e83ee2cf4 100644 --- a/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp @@ -53,8 +53,7 @@ RelpermDriver::RelpermDriver( const geos::string & name, setApplyDefaultValue( "none" ). setDescription( "Baseline file" ); - addLogLevel< logInfo::Initialisation >(); - addLogLevel< logInfo::Results >(); + addLogLevel< logInfo::LogOutput >(); } @@ -119,13 +118,13 @@ bool RelpermDriver::execute( const geos::real64 GEOS_UNUSED_PARAM( time_n ), RelativePermeabilityBase & baseRelperm = constitutiveManager.getGroup< RelativePermeabilityBase >( m_relpermName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, "Launching Relperm Driver" ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Relperm .................. " << m_relpermName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Type ................... " << baseRelperm.getCatalogName() ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " No. of Phases .......... " << m_numPhases ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Steps .................. " << m_numSteps ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Output ................. " << m_outputFile ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Baseline ............... " << m_baselineFile ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, "Launching Relperm Driver" ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Relperm .................. " << m_relpermName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Type ................... " << baseRelperm.getCatalogName() ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " No. of Phases .......... " << m_numPhases ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Steps .................. " << m_numSteps ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Output ................. " << m_outputFile ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Baseline ............... " << m_baselineFile ); // create a dummy discretization with one quadrature point for // storing constitutive data @@ -322,7 +321,7 @@ void RelpermDriver::compareWithBaseline() // success - GEOS_LOG_LEVEL_RANK_0( logInfo::Results, " Comparison ............. Internal results consistent with baseline." ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Comparison ............. Internal results consistent with baseline." ); file.close(); } diff --git a/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp index 747e24e3402..bfeb17f6217 100644 --- a/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp @@ -69,8 +69,7 @@ TriaxialDriver::TriaxialDriver( const string & name, setApplyDefaultValue( "none" ). setDescription( "Baseline file" ); - addLogLevel< logInfo::Initialisation >(); - addLogLevel< logInfo::Results >(); + addLogLevel< logInfo::LogOutput >(); } @@ -406,16 +405,16 @@ bool TriaxialDriver::execute( real64 const GEOS_UNUSED_PARAM( time_n ), // depending on logLevel, print some useful info - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, "Launching Triaxial Driver" ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Material .......... " << m_solidMaterialName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Type .............. " << baseSolid.getCatalogName() ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Mode .............. " << m_mode ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Axial Control ..... " << m_axialFunctionName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Radial Control .... " << m_radialFunctionName ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Initial Stress .... " << m_initialStress ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Steps ............. " << m_numSteps ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Output ............ " << m_outputFile ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Initialisation, " Baseline .......... " << m_baselineFile ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, "Launching Triaxial Driver" ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Material .......... " << m_solidMaterialName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Type .............. " << baseSolid.getCatalogName() ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Mode .............. " << m_mode ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Axial Control ..... " << m_axialFunctionName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Radial Control .... " << m_radialFunctionName ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Initial Stress .... " << m_initialStress ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Steps ............. " << m_numSteps ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Output ............ " << m_outputFile ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Baseline .......... " << m_baselineFile ); // create a dummy discretization with one quadrature point for // storing constitutive data @@ -581,7 +580,7 @@ void TriaxialDriver::compareWithBaseline() // success - GEOS_LOG_LEVEL_RANK_0( logInfo::Results, " Comparison ........ Internal results consistent with baseline." ); + GEOS_LOG_LEVEL_RANK_0( logInfo::LogOutput, " Comparison ........ Internal results consistent with baseline." ); file.close(); } diff --git a/src/coreComponents/events/EventBase.cpp b/src/coreComponents/events/EventBase.cpp index eed2df0600e..d30eea9bdec 100644 --- a/src/coreComponents/events/EventBase.cpp +++ b/src/coreComponents/events/EventBase.cpp @@ -105,7 +105,7 @@ EventBase::EventBase( const string & name, registerWrapper( viewKeyStruct::isTargetExecutingString(), &m_targetExecFlag ). setDescription( "Index of the current subevent" ); - addLogLevel< logInfo::SubEventExecution >(); + addLogLevel< logInfo::EventExecution >(); } @@ -243,7 +243,7 @@ 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( logInfo::SubEventExecution, + GEOS_LOG_LEVEL_RANK_0( logInfo::EventExecution, " SubEvent: " << m_currentSubEvent << " (" << subEvent->getName() << "), dt_request=" << subEvent->getCurrentEventDtRequest() << ", forecast=" << subEvent->getForecast() ); diff --git a/src/coreComponents/events/LogLevelsInfo.hpp b/src/coreComponents/events/LogLevelsInfo.hpp index 51b10c10b3f..1d486f824ec 100644 --- a/src/coreComponents/events/LogLevelsInfo.hpp +++ b/src/coreComponents/events/LogLevelsInfo.hpp @@ -39,13 +39,7 @@ namespace logInfo struct EventExecution { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Informations on events execution"; } -}; - -struct SubEventExecution -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Informations on sub events execution"; } + static constexpr std::string_view getDescription() { return "Informations on events and subevents execution"; } }; /// @endcond diff --git a/src/coreComponents/fieldSpecification/CMakeLists.txt b/src/coreComponents/fieldSpecification/CMakeLists.txt index 4da402d0f2e..0b6ff6691e6 100644 --- a/src/coreComponents/fieldSpecification/CMakeLists.txt +++ b/src/coreComponents/fieldSpecification/CMakeLists.txt @@ -27,7 +27,6 @@ set( fieldSpecification_headers EquilibriumInitialCondition.hpp FieldSpecificationBase.hpp FieldSpecificationManager.hpp - LogLevelsInfo.hpp SourceFluxBoundaryCondition.hpp TractionBoundaryCondition.hpp AquiferBoundaryCondition.hpp diff --git a/src/coreComponents/fieldSpecification/FieldSpecificationBase.cpp b/src/coreComponents/fieldSpecification/FieldSpecificationBase.cpp index 958abe1e166..8321d341b63 100644 --- a/src/coreComponents/fieldSpecification/FieldSpecificationBase.cpp +++ b/src/coreComponents/fieldSpecification/FieldSpecificationBase.cpp @@ -16,7 +16,6 @@ #include "FieldSpecificationBase.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" -#include "fieldSpecification/LogLevelsInfo.hpp" namespace geos { @@ -82,10 +81,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." ); - - addLogLevel< logInfo::BoundaryCondition >(); - addLogLevel< logInfo::FaceBoundaryCondition >(); - addLogLevel< logInfo::SourceFluxFailure >(); } diff --git a/src/coreComponents/fieldSpecification/LogLevelsInfo.hpp b/src/coreComponents/fieldSpecification/LogLevelsInfo.hpp deleted file mode 100644 index c14543e5912..00000000000 --- a/src/coreComponents/fieldSpecification/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 common log level informations for the field specification - */ - -#ifndef GEOS_FIELDSPECIFICATION_LOGLEVELSNFO_HPP_ -#define GEOS_FIELDSPECIFICATION_LOGLEVELSNFO_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 BoundaryCondition -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Boundary condition information"; } -}; - -struct FaceBoundaryCondition -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Face boundary condition information"; } -}; - -struct SourceFluxFailure -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Indicate a source flux failure"; } -}; - -/// @endcond -///@} - -} - -} - -#endif // GEOS_FIELDSPECIFICATION_LOGLEVELSNFO_HPP_ diff --git a/src/coreComponents/fileIO/LogLevelsInfo.hpp b/src/coreComponents/fileIO/LogLevelsInfo.hpp index 5a88bcbf08a..24e1019683a 100644 --- a/src/coreComponents/fileIO/LogLevelsInfo.hpp +++ b/src/coreComponents/fileIO/LogLevelsInfo.hpp @@ -22,6 +22,7 @@ #define GEOS_FILEIO_LOGLEVELSINFO_HPP #include "common/DataTypes.hpp" +#include "dataRepository/LogLevelsInfo.hpp" namespace geos { @@ -70,6 +71,12 @@ struct HDF5Writing static constexpr std::string_view getDescription() { return "Information on buffered data in an HDF5 file "; } }; +struct OutputTimers +{ + static constexpr int getMinLogLevel() { return 1; } + static std::string_view getDescription() { return "Output timing information"; } +}; + /// @endcond ///@} diff --git a/src/coreComponents/fileIO/Outputs/BlueprintOutput.cpp b/src/coreComponents/fileIO/Outputs/BlueprintOutput.cpp index 04cca5e03f3..a3ca597d4a8 100644 --- a/src/coreComponents/fileIO/Outputs/BlueprintOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/BlueprintOutput.cpp @@ -176,7 +176,7 @@ bool BlueprintOutput::execute( real64 const time_n, GEOS_ASSERT_MSG( conduit::blueprint::mesh::index::verify( index, info ), info.to_json() ); /// Write out the root index file, then write out the mesh. - string const completePath = GEOS_FMT( "{}/blueprintFiles/cycle_{:07}", OutputBase::getOutputDirectory(), cycleNumber ); + string const completePath = GEOS_FMT( "{}/blueprintFiles/cycle_{:07}", getOutputDirectory(), cycleNumber ); string const filePathForRank = dataRepository::writeRootFile( fileRoot, completePath ); conduit::relay::io::save( meshRoot, filePathForRank, "hdf5" ); } @@ -311,20 +311,6 @@ void BlueprintOutput::writeOutConstitutiveData( dataRepository::Group const & co } ); } -namespace logInfo -{ -struct BlueprintOutputTimer : public OutputTimerBase -{ - std::string_view getDescription() const override { return "Blueprint output timing"; } -}; -} - -logInfo::OutputTimerBase const & BlueprintOutput::getTimerCategory() const -{ - static logInfo::BlueprintOutputTimer timer; - return timer; -} - REGISTER_CATALOG_ENTRY( OutputBase, BlueprintOutput, string const &, dataRepository::Group * const ) } /* namespace geos */ diff --git a/src/coreComponents/fileIO/Outputs/BlueprintOutput.hpp b/src/coreComponents/fileIO/Outputs/BlueprintOutput.hpp index 7ba575f967d..6c6adb34bbe 100644 --- a/src/coreComponents/fileIO/Outputs/BlueprintOutput.hpp +++ b/src/coreComponents/fileIO/Outputs/BlueprintOutput.hpp @@ -36,11 +36,6 @@ class ElementRegionManager; */ class BlueprintOutput : public OutputBase { -protected: - /** - * @copydoc OutputBase::getTimerCategory - */ - logInfo::OutputTimerBase const & getTimerCategory() const override; public: diff --git a/src/coreComponents/fileIO/Outputs/ChomboIO.cpp b/src/coreComponents/fileIO/Outputs/ChomboIO.cpp index e3b326a4eb6..114b609294e 100644 --- a/src/coreComponents/fileIO/Outputs/ChomboIO.cpp +++ b/src/coreComponents/fileIO/Outputs/ChomboIO.cpp @@ -31,20 +31,6 @@ namespace geos using namespace dataRepository; -namespace logInfo -{ -struct ChomboOutputTimer : public OutputTimerBase -{ - std::string_view getDescription() const override { return "Chombo output timing"; } -}; -} - -logInfo::OutputTimerBase const & ChomboIO::getTimerCategory() const -{ - static logInfo::ChomboOutputTimer timer; - return timer; -} - ChomboIO::ChomboIO( string const & name, Group * const parent ): OutputBase( name, parent ), m_coupler( nullptr ), diff --git a/src/coreComponents/fileIO/Outputs/ChomboIO.hpp b/src/coreComponents/fileIO/Outputs/ChomboIO.hpp index ea6defc059a..fb7ac87fc44 100644 --- a/src/coreComponents/fileIO/Outputs/ChomboIO.hpp +++ b/src/coreComponents/fileIO/Outputs/ChomboIO.hpp @@ -89,12 +89,6 @@ class ChomboIO final : public OutputBase } viewKeys; /// @endcond -protected: - /** - * @copydoc OutputBase::getTimerCategory - */ - logInfo::OutputTimerBase const & getTimerCategory() const override; - private: ChomboCoupler * m_coupler; string m_outputPath; diff --git a/src/coreComponents/fileIO/Outputs/MemoryStatsOutput.cpp b/src/coreComponents/fileIO/Outputs/MemoryStatsOutput.cpp index 995984c6df6..340a6865fb7 100644 --- a/src/coreComponents/fileIO/Outputs/MemoryStatsOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/MemoryStatsOutput.cpp @@ -28,20 +28,6 @@ namespace geos using namespace dataRepository; -namespace logInfo -{ -struct MemoryStatsOutputTimer : public OutputTimerBase -{ - std::string_view getDescription() const override { return "MemoryStats output timing"; } -}; -} - -logInfo::OutputTimerBase const & MemoryStatsOutput::getTimerCategory() const -{ - static logInfo::MemoryStatsOutputTimer timer; - return timer; -} - MemoryStatsOutput::MemoryStatsOutput( string const & name, Group * const parent ): OutputBase( name, parent ), diff --git a/src/coreComponents/fileIO/Outputs/MemoryStatsOutput.hpp b/src/coreComponents/fileIO/Outputs/MemoryStatsOutput.hpp index 3d7dc4756f3..02e92ec7104 100644 --- a/src/coreComponents/fileIO/Outputs/MemoryStatsOutput.hpp +++ b/src/coreComponents/fileIO/Outputs/MemoryStatsOutput.hpp @@ -68,11 +68,6 @@ class MemoryStatsOutput final : public OutputBase void postInputInitialization() override; - /** - * @copydoc OutputBase::getTimerCategory - */ - logInfo::OutputTimerBase const & getTimerCategory() const override; - private: // Flag to enable writing CSV output diff --git a/src/coreComponents/fileIO/Outputs/OutputBase.cpp b/src/coreComponents/fileIO/Outputs/OutputBase.cpp index 89f6ee32c2a..c7319fc2372 100644 --- a/src/coreComponents/fileIO/Outputs/OutputBase.cpp +++ b/src/coreComponents/fileIO/Outputs/OutputBase.cpp @@ -18,6 +18,7 @@ */ #include "OutputBase.hpp" +#include "fileIO/LogLevelsInfo.hpp" #include "common/MpiWrapper.hpp" #include "functions/FunctionBase.hpp" @@ -59,8 +60,6 @@ void OutputBase::initializePreSubGroups() // SetupDirectoryStructure(); } - - string const & OutputBase::getOutputDirectory() { static string m_outputDirectory; diff --git a/src/coreComponents/fileIO/Outputs/OutputBase.hpp b/src/coreComponents/fileIO/Outputs/OutputBase.hpp index f5b54872c85..41e9df785c8 100644 --- a/src/coreComponents/fileIO/Outputs/OutputBase.hpp +++ b/src/coreComponents/fileIO/Outputs/OutputBase.hpp @@ -21,50 +21,11 @@ #include "dataRepository/Group.hpp" #include "dataRepository/ExecutableGroup.hpp" -#include "dataRepository/LogLevelsInfo.hpp" // For logInfo namespace #include "common/Timer.hpp" namespace geos { -namespace logInfo -{ -/** - * @brief Base timer category for output operations - * @details Provides configuration for logging output operation timing information - */ -struct OutputTimers -{ - /** - * @brief Get the description of this timer - * @return String view containing the timer description - */ - static std::string_view getDescription() { return "Output timing information"; } - - /** - * @brief Get the minimum log level for this timer - * @return Integer representing the minimum log level - */ - static constexpr int getMinLogLevel() { return 1; } -}; - -/** - * @brief Base interface for specific output type timers - * @details Each output type (VTK, Silo, etc.) implements this interface to provide - * its own timing category. This is used in conjunction with OutputTimers: - * - OutputTimerBase: For polymorphic behavior in derived output classes - * - OutputTimers: For the general output timing logging infrastructure - */ -struct OutputTimerBase -{ - /** - * @brief Get the description of this timer - * @return String view containing the timer description - */ - virtual std::string_view getDescription() const = 0; -}; -} - /** * @class OutputBase * @@ -135,12 +96,6 @@ class OutputBase : public ExecutableGroup /// Timer used to track duration of file writing operations for this specific output type std::chrono::system_clock::duration m_outputTimer; - /** - * @brief Get the timer category for this output type - * @return Reference to the output timer base for timing statistics - */ - virtual logInfo::OutputTimerBase const & getTimerCategory() const = 0; - /// @copydoc geos::ExecutableGroup::cleanup virtual void cleanup( real64 const time_n, integer const cycleNumber, diff --git a/src/coreComponents/fileIO/Outputs/PythonOutput.cpp b/src/coreComponents/fileIO/Outputs/PythonOutput.cpp index 3ef3adf4d46..d648049474d 100644 --- a/src/coreComponents/fileIO/Outputs/PythonOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/PythonOutput.cpp @@ -18,20 +18,6 @@ namespace geos { -namespace logInfo -{ -struct PythonOutputTimer : public OutputTimerBase -{ - std::string_view getDescription() const override { return "Python output timing"; } -}; -} - -logInfo::OutputTimerBase const & PythonOutput::getTimerCategory() const -{ - static logInfo::PythonOutputTimer timer; - return timer; -} - REGISTER_CATALOG_ENTRY( OutputBase, PythonOutput, string const &, dataRepository::Group * const ) } // namespace geos diff --git a/src/coreComponents/fileIO/Outputs/PythonOutput.hpp b/src/coreComponents/fileIO/Outputs/PythonOutput.hpp index eabcea33fbe..bb03db480fe 100644 --- a/src/coreComponents/fileIO/Outputs/PythonOutput.hpp +++ b/src/coreComponents/fileIO/Outputs/PythonOutput.hpp @@ -76,11 +76,8 @@ class PythonOutput : public OutputBase return true; } -protected: - logInfo::OutputTimerBase const & getTimerCategory() const override; }; - } // namespace geos #endif // GEOS_FILEIO_OUTPUTS_PYTHONOUTPUT_HPP_ diff --git a/src/coreComponents/fileIO/Outputs/RestartOutput.cpp b/src/coreComponents/fileIO/Outputs/RestartOutput.cpp index b8f8e5b9f0c..ee9038f3f2a 100644 --- a/src/coreComponents/fileIO/Outputs/RestartOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/RestartOutput.cpp @@ -24,14 +24,6 @@ namespace geos using namespace dataRepository; -namespace logInfo -{ -struct RestartOutputTimer : public OutputTimerBase -{ - std::string_view getDescription() const override { return "Restart output timing"; } -}; -} - RestartOutput::RestartOutput( string const & name, Group * const parent ): OutputBase( name, parent ) @@ -55,18 +47,12 @@ bool RestartOutput::execute( real64 const GEOS_UNUSED_PARAM( time_n ), Group & rootGroup = this->getGroupByPath( "/Problem" ); string const fileName = GEOS_FMT( "{}_restart_{:09}", getFileNameRoot(), cycleNumber ); rootGroup.prepareToWrite(); - writeTree( joinPath( OutputBase::getOutputDirectory(), fileName ), *(rootGroup.getConduitNode().parent()) ); + writeTree( joinPath( getOutputDirectory(), fileName ), *(rootGroup.getConduitNode().parent()) ); rootGroup.finishWriting(); } return false; } -logInfo::OutputTimerBase const & RestartOutput::getTimerCategory() const -{ - static logInfo::RestartOutputTimer timer; - return timer; -} - REGISTER_CATALOG_ENTRY( OutputBase, RestartOutput, string const &, Group * const ) } /* namespace geos */ diff --git a/src/coreComponents/fileIO/Outputs/RestartOutput.hpp b/src/coreComponents/fileIO/Outputs/RestartOutput.hpp index 09e336a50fe..c8c0d269edf 100644 --- a/src/coreComponents/fileIO/Outputs/RestartOutput.hpp +++ b/src/coreComponents/fileIO/Outputs/RestartOutput.hpp @@ -79,11 +79,6 @@ class RestartOutput : public OutputBase } viewKeys; /// @endcond -protected: - /** - * @copydoc OutputBase::getTimerCategory - */ - logInfo::OutputTimerBase const & getTimerCategory() const override; }; diff --git a/src/coreComponents/fileIO/Outputs/SiloOutput.cpp b/src/coreComponents/fileIO/Outputs/SiloOutput.cpp index 2467731e7b4..0adac80f5c8 100644 --- a/src/coreComponents/fileIO/Outputs/SiloOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/SiloOutput.cpp @@ -28,20 +28,6 @@ namespace geos using namespace dataRepository; -namespace logInfo -{ -struct SiloOutputTimer : public OutputTimerBase -{ - std::string_view getDescription() const override { return "Silo output timing"; } -}; -} - -logInfo::OutputTimerBase const & SiloOutput::getTimerCategory() const -{ - static logInfo::SiloOutputTimer timer; - return timer; -} - SiloOutput::SiloOutput( string const & name, Group * const parent ): OutputBase( name, parent ), diff --git a/src/coreComponents/fileIO/Outputs/SiloOutput.hpp b/src/coreComponents/fileIO/Outputs/SiloOutput.hpp index 4af9bea61b9..ad216fa0c75 100644 --- a/src/coreComponents/fileIO/Outputs/SiloOutput.hpp +++ b/src/coreComponents/fileIO/Outputs/SiloOutput.hpp @@ -86,12 +86,6 @@ class SiloOutput : public OutputBase } siloOutputViewKeys; /// @endcond -protected: - /** - * @copydoc OutputBase::getTimerCategory - */ - logInfo::OutputTimerBase const & getTimerCategory() const override; - private: void postInputInitialization() override; diff --git a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp index d6f1c267f5a..0c66a3bf3bd 100644 --- a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.cpp @@ -26,20 +26,6 @@ namespace geos { using namespace dataRepository; -namespace logInfo -{ -struct TimeHistoryOutputTimer : public OutputTimerBase -{ - std::string_view getDescription() const override { return "Time history output timing"; } -}; -} - -logInfo::OutputTimerBase const & TimeHistoryOutput::getTimerCategory() const -{ - static logInfo::TimeHistoryOutputTimer timer; - return timer; -} - TimeHistoryOutput::TimeHistoryOutput( string const & name, Group * const parent ): OutputBase( name, parent ), @@ -71,7 +57,6 @@ 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 >(); addLogLevel< logInfo::HDF5Writing >(); } diff --git a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.hpp b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.hpp index f4ba40281b0..89f301392e6 100644 --- a/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.hpp +++ b/src/coreComponents/fileIO/Outputs/TimeHistoryOutput.hpp @@ -114,12 +114,6 @@ class TimeHistoryOutput : public OutputBase virtual PyTypeObject * getPythonType() const override; #endif -protected: - /** - * @copydoc OutputBase::getTimerCategory - */ - logInfo::OutputTimerBase const & getTimerCategory() const override; - private: /** diff --git a/src/coreComponents/fileIO/Outputs/VTKOutput.cpp b/src/coreComponents/fileIO/Outputs/VTKOutput.cpp index 4a58402ddf6..9403f0ed9c5 100644 --- a/src/coreComponents/fileIO/Outputs/VTKOutput.cpp +++ b/src/coreComponents/fileIO/Outputs/VTKOutput.cpp @@ -30,20 +30,6 @@ namespace geos using namespace dataRepository; -namespace logInfo -{ -struct VTKOutputTimer : public OutputTimerBase -{ - std::string_view getDescription() const override { return "VTK output timing"; } -}; -} - -logInfo::OutputTimerBase const & VTKOutput::getTimerCategory() const -{ - static logInfo::VTKOutputTimer timer; - return timer; -} - VTKOutput::VTKOutput( string const & name, Group * const parent ): OutputBase( name, parent ), diff --git a/src/coreComponents/fileIO/Outputs/VTKOutput.hpp b/src/coreComponents/fileIO/Outputs/VTKOutput.hpp index 382c34e1f68..3b6ad898c18 100644 --- a/src/coreComponents/fileIO/Outputs/VTKOutput.hpp +++ b/src/coreComponents/fileIO/Outputs/VTKOutput.hpp @@ -112,12 +112,6 @@ class VTKOutput : public OutputBase virtual PyTypeObject * getPythonType() const override; #endif -protected: - /** - * @copydoc OutputBase::getTimerCategory - */ - logInfo::OutputTimerBase const & getTimerCategory() const override; - private: string m_plotFileRoot; diff --git a/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp b/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp index 6ec2c648742..d32cd53dfdb 100644 --- a/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp +++ b/src/coreComponents/fileIO/timeHistory/HDFHistoryIO.cpp @@ -214,10 +214,10 @@ 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() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_LOG_RANK_IF( isLogLevelActive< logInfo::HDF5Writing >( getLogLevel() ), GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); HDFFile target( m_filename, false, true, subcomm ); - GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_LOG_RANK_IF( isLogLevelActive< logInfo::HDF5Writing >( getLogLevel() ), GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); bool inTarget = target.hasDataset( m_name ); if( !inTarget ) @@ -242,7 +242,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() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_LOG_RANK_IF( isLogLevelActive< logInfo::HDF5Writing >( getLogLevel() ), GEOS_FMT( "TimeHistory: {}, created hdf5 dataset {}.", m_filename, m_name ) ); H5Dclose( dataset ); H5Sclose( space ); @@ -256,7 +256,7 @@ void HDFHistoryIO::init( bool existsOkay ) { GEOS_ERROR( "Dataset (" + m_name + ") already exists in output file: " + m_filename ); } - GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_LOG_RANK_IF( isLogLevelActive< logInfo::HDF5Writing >( getLogLevel() ), GEOS_FMT( "TimeHistory: closed file {}.", m_filename ) ); } } @@ -292,10 +292,10 @@ void HDFHistoryIO::write() if( m_subcomm != MPI_COMM_NULL ) { - GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_LOG_RANK_IF( isLogLevelActive< logInfo::HDF5Writing >( getLogLevel() ), GEOS_FMT( "TimeHistory: opening file {}.", m_filename ) ); HDFFile target( m_filename, false, true, m_subcomm ); - GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_LOG_RANK_IF( isLogLevelActive< logInfo::HDF5Writing >( getLogLevel() ), GEOS_FMT( "TimeHistory: opened file {}.", m_filename ) ); if( !target.hasDataset( m_name ) ) @@ -326,7 +326,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() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_LOG_RANK_IF( isLogLevelActive< logInfo::HDF5Writing >( getLogLevel() ), GEOS_FMT( "TimeHistory: wrote row {} of dataset '{}'.", m_writeHead, m_name ) ); H5Pclose( dxplId ); @@ -345,7 +345,7 @@ void HDFHistoryIO::write() H5Sclose( memspace ); H5Sclose( filespace ); H5Dclose( dataset ); - GEOS_LOG_RANK_IF( this->getLogLevel() >= logInfo::HDF5Writing::getMinLogLevel(), + GEOS_LOG_RANK_IF( isLogLevelActive< logInfo::HDF5Writing >( getLogLevel() ), GEOS_FMT( "TimeHistory: closing file {}.", m_filename ) ); } m_writeHead++; diff --git a/src/coreComponents/functions/LogLevelsInfo.hpp b/src/coreComponents/functions/LogLevelsInfo.hpp index 021f81dd77d..0bd52c22b35 100644 --- a/src/coreComponents/functions/LogLevelsInfo.hpp +++ b/src/coreComponents/functions/LogLevelsInfo.hpp @@ -31,13 +31,12 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT -struct TableDataOutput +struct TableLogOutput { static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { - return "Output the loaded/computed table data in the log if succinct enough," - " otherwise output it in a CSV file."; + return "Output the loaded/computed table data in the log"; } }; diff --git a/src/coreComponents/functions/TableFunction.cpp b/src/coreComponents/functions/TableFunction.cpp index 619ffa8907f..92a72497a4e 100644 --- a/src/coreComponents/functions/TableFunction.cpp +++ b/src/coreComponents/functions/TableFunction.cpp @@ -25,6 +25,7 @@ #include "codingUtilities/Parsing.hpp" #include "common/DataTypes.hpp" #include "common/MpiWrapper.hpp" +#include "fileIO/Outputs/OutputBase.hpp" #include @@ -69,7 +70,7 @@ TableFunction::TableFunction( const string & name, setRestartFlags( RestartFlags::NO_WRITE ). setDescription( "When set to 1, write the table into a CSV file" ); - addLogLevel< logInfo::TableDataOutput >(); + addLogLevel< logInfo::TableLogOutput >(); } void TableFunction::readFile( string const & filename, array1d< real64 > & target ) @@ -401,9 +402,10 @@ void TableFunction::outputTableData( OutputOptions const outputOpts ) const void TableFunction::initializePostSubGroups() { // Output user defined tables (not generated PVT tables) + bool const writeLog = isLogLevelActive< logInfo::TableLogOutput >( getLogLevel() ); outputTableData( OutputOptions{ - m_writeCSV != 0, // writeCSV - isLogLevelActive< logInfo::TableDataOutput >( getLogLevel() ) // writeInLog + m_writeCSV != 0, // writeCSV + writeLog // writeLog } ); } diff --git a/src/coreComponents/functions/TableFunction.hpp b/src/coreComponents/functions/TableFunction.hpp index 96f125980fe..54807bfa0af 100644 --- a/src/coreComponents/functions/TableFunction.hpp +++ b/src/coreComponents/functions/TableFunction.hpp @@ -449,6 +449,7 @@ class TableFunction : public FunctionBase integer m_writeCSV; }; /// @cond DO_NOT_DOCUMENT + template< typename IN_ARRAY > GEOS_HOST_DEVICE GEOS_FORCE_INLINE diff --git a/src/coreComponents/mesh/LogLevelsInfo.hpp b/src/coreComponents/mesh/LogLevelsInfo.hpp index 5ed637683b7..502fb305903 100644 --- a/src/coreComponents/mesh/LogLevelsInfo.hpp +++ b/src/coreComponents/mesh/LogLevelsInfo.hpp @@ -40,19 +40,7 @@ namespace logInfo struct ImportFields { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on imported fields"; } -}; - -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"; } + static constexpr std::string_view getDescription() { return "Information on fields import"; } }; struct PartitionCommunication @@ -64,7 +52,7 @@ struct PartitionCommunication struct VTKSteps { static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Display VTK mesh generator steps"; } + static constexpr std::string_view getDescription() { return "VTK mesh generator steps"; } }; diff --git a/src/coreComponents/mesh/MeshManager.cpp b/src/coreComponents/mesh/MeshManager.cpp index ccc62b7672d..c4f6e453e03 100644 --- a/src/coreComponents/mesh/MeshManager.cpp +++ b/src/coreComponents/mesh/MeshManager.cpp @@ -36,6 +36,8 @@ MeshManager::MeshManager( string const & name, Group( name, parent ) { setInputFlags( InputFlags::REQUIRED ); + + addLogLevel< logInfo::ImportFields >(); } MeshManager::~MeshManager() diff --git a/src/coreComponents/mesh/generators/LogLevelsInfo.hpp b/src/coreComponents/mesh/generators/LogLevelsInfo.hpp index 8dbfb400be6..7180fb5a254 100644 --- a/src/coreComponents/mesh/generators/LogLevelsInfo.hpp +++ b/src/coreComponents/mesh/generators/LogLevelsInfo.hpp @@ -35,17 +35,12 @@ namespace logInfo ///@{ /// @cond DO_NOT_DOCUMENT -struct InternalWell +struct GenerateWell { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Output Internal well"; } + static constexpr std::string_view getDescription() { return "Well generation information: internal well table, perforation table"; } }; -struct PerforationTable -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Output perforation table"; } -}; /// @endcond ///@} diff --git a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp index 4c5bf4b60e8..6ab80d320cb 100644 --- a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp +++ b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp @@ -85,11 +85,11 @@ VTKMeshGenerator::VTKMeshGenerator( string const & name, " 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 >(); - registerWrapper( viewKeyStruct::dataSourceString(), &m_dataSourceName ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Name of the VTK data source" ); + + addLogLevel< logInfo::VTKSteps >(); } void VTKMeshGenerator::postInputInitialization() diff --git a/src/coreComponents/mesh/generators/WellGeneratorBase.cpp b/src/coreComponents/mesh/generators/WellGeneratorBase.cpp index a2569c4006c..023dbac0dc6 100644 --- a/src/coreComponents/mesh/generators/WellGeneratorBase.cpp +++ b/src/coreComponents/mesh/generators/WellGeneratorBase.cpp @@ -72,8 +72,7 @@ WellGeneratorBase::WellGeneratorBase( string const & name, Group * const parent setSizedFromParent( 0 ). setDescription( "Name of the set of constraints associated with this well" ); - addLogLevel< logInfo::InternalWell >(); - addLogLevel< logInfo::PerforationTable >(); + addLogLevel< logInfo::GenerateWell >(); } Group * WellGeneratorBase::createChild( string const & childKey, string const & childName ) @@ -135,17 +134,11 @@ void WellGeneratorBase::generateWellGeometry( ) // make sure that the perforation locations are valid checkPerforationLocationsValidity(); - if( isLogLevelActive< logInfo::PerforationTable >( this->getLogLevel() ) && MpiWrapper::commRank() == 0 ) + if( isLogLevelActive< logInfo::GenerateWell >( this->getLogLevel() ) && MpiWrapper::commRank() == 0 ) { logInternalWell(); - } - - if( isLogLevelActive< logInfo::InternalWell >( this->getLogLevel()) && MpiWrapper::commRank() == 0 ) - { logPerforationTable(); } - - } void WellGeneratorBase::postInputInitialization() diff --git a/src/coreComponents/physicsSolvers/LinearSolverParameters.cpp b/src/coreComponents/physicsSolvers/LinearSolverParameters.cpp index 09f07c089e1..dec3fd80ef6 100644 --- a/src/coreComponents/physicsSolvers/LinearSolverParameters.cpp +++ b/src/coreComponents/physicsSolvers/LinearSolverParameters.cpp @@ -315,7 +315,6 @@ LinearSolverParametersInput::LinearSolverParametersInput( string const & name, registerInputBlock< BlockParametersInput >( this, groupKeyStruct::blockString(), m_parameters.block ); addLogLevel< logInfo::LinearSolver >(); - addLogLevel< logInfo::LinearSolverConfiguration >(); } void LinearSolverParametersInput::postInputInitialization() @@ -376,10 +375,8 @@ void LinearSolverParametersInput::postInputInitialization() // TODO input validation for other AMG parameters ? - if( getLogLevel() > 0 ) - { + if( isLogLevelActive< logInfo::LinearSolver >( getLogLevel() ) ) print(); - } } Group * LinearSolverParametersInput::createChild( string const & childKey, diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index e506139cfe7..96cacc0fa6d 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -36,10 +36,11 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT -struct Configuration + +struct BoundaryConditions { - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Solver runtime settings"; } + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Boundary conditions information (incl. source flux)"; } }; struct Convergence @@ -66,12 +67,6 @@ struct LinearSolver 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; } @@ -99,7 +94,7 @@ struct Solution struct SolverInitialization { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on solver Initialization"; } + static constexpr std::string_view getDescription() { return "Information on solver initialization"; } }; struct SolverExecution diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp index 834507026a2..fdea0dcf8fa 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp @@ -24,7 +24,6 @@ #include "math/interpolation/Interpolation.hpp" #include "common/Timer.hpp" #include "common/Units.hpp" -#include "dataRepository/LogLevelsInfo.hpp" #if defined(GEOS_USE_PYGEOSX) #include "python/PySolverType.hpp" @@ -103,10 +102,11 @@ PhysicsSolverBase::PhysicsSolverBase( string const & name, setInputFlag( InputFlags::FALSE ). setRestartFlags( RestartFlags::WRITE_AND_READ ); + addLogLevel< logInfo::Convergence >(); addLogLevel< logInfo::Fields >(); addLogLevel< logInfo::LinearSolver >(); + addLogLevel< logInfo::ResidualNorm >(); addLogLevel< logInfo::Solution >(); - addLogLevel< logInfo::Convergence >(); addLogLevel< logInfo::TimeStep >(); addLogLevel< logInfo::Timers >(); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index 96deb0b5f71..908103f57ad 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -31,7 +31,6 @@ #include "constitutive/thermalConductivity/MultiPhaseThermalConductivitySelector.hpp" #include "fieldSpecification/AquiferBoundaryCondition.hpp" #include "fieldSpecification/EquilibriumInitialCondition.hpp" -#include "fieldSpecification/LogLevelsInfo.hpp" #include "fieldSpecification/SourceFluxBoundaryCondition.hpp" #include "finiteVolume/FluxApproximationBase.hpp" #include "mesh/DomainPartition.hpp" @@ -190,10 +189,7 @@ CompositionalMultiphaseBase::CompositionalMultiphaseBase( const string & name, setApplyDefaultValue( 0.01 ). setDescription( "Minimum value for solution scaling factor" ); - addLogLevel< logInfo::Convergence >(); - addLogLevel< logInfo::Solution >(); - addLogLevel< logInfo::SourceFluxFailure >(); - addLogLevel< logInfo::TimeStep >(); + addLogLevel< logInfo::BoundaryConditions >(); } void CompositionalMultiphaseBase::postInputInitialization() @@ -1573,7 +1569,7 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, if( m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) { globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( targetSet.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( bcLogMessage, getName(), time+dt, fs.getCatalogName(), fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ), @@ -1586,9 +1582,9 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, } if( !subRegion.hasWrapper( dofKey ) ) { - GEOS_LOG_LEVEL_BY_RANK_ON_GROUP( logInfo::SourceFluxFailure, - GEOS_FMT( "{}: trying to apply SourceFlux, but its targetSet named '{}' intersects with non-simulated region named '{}'.", - getDataContext(), setName, subRegion.getName() ), + GEOS_LOG_LEVEL_BY_RANK_ON_GROUP( logInfo::BoundaryConditions, + GEOS_FMT( "{}: trying to apply {}, but its targetSet named '{}' intersects with non-simulated region named '{}'.", + getDataContext(), SourceFluxBoundaryCondition::catalogName(), setName, subRegion.getName() ), fs ); return; } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp index 025fcb9687a..f649ed883d3 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp @@ -28,7 +28,6 @@ #include "dataRepository/Group.hpp" #include "discretizationMethods/NumericalMethodsManager.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" -#include "fieldSpecification/LogLevelsInfo.hpp" #include "fieldSpecification/AquiferBoundaryCondition.hpp" #include "finiteVolume/BoundaryStencil.hpp" #include "finiteVolume/FiniteVolumeManager.hpp" @@ -123,10 +122,6 @@ CompositionalMultiphaseFVM::CompositionalMultiphaseFVM( const string & name, setInputFlag( InputFlags::OPTIONAL ). setDescription( "Target CFL condition `CFL condition `_" " when computing the next timestep." ); - - addLogLevel< logInfo::Convergence >(); - addLogLevel< logInfo::Solution >(); - addLogLevel< logInfo::TimeStep >(); } void CompositionalMultiphaseFVM::postInputInitialization() @@ -1434,7 +1429,7 @@ void CompositionalMultiphaseFVM::applyAquiferBC( real64 const time, if( m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) { globalIndex const numTargetFaces = MpiWrapper::sum< globalIndex >( stencil.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( faceBcLogMessage, getName(), time+dt, bc.getCatalogName(), bc.getName(), setName, faceManager.getName(), bc.getScale(), numTargetFaces ), diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.cpp index 6f8955ad23b..c1ba1463d3e 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.cpp @@ -55,8 +55,6 @@ CompositionalMultiphaseHybridFVM::CompositionalMultiphaseHybridFVM( const std::s m_lengthTolerance( 0 ) { m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseHybridFVM; - - addLogLevel< logInfo::ResidualNorm >(); } void CompositionalMultiphaseHybridFVM::registerDataOnMesh( Group & meshBodies ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp index faaf94487f1..e8a7b812ee2 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp @@ -26,7 +26,6 @@ #include "constitutive/contact/HydraulicApertureBase.hpp" #include "discretizationMethods/NumericalMethodsManager.hpp" #include "fieldSpecification/AquiferBoundaryCondition.hpp" -#include "fieldSpecification/LogLevelsInfo.hpp" #include "fieldSpecification/EquilibriumInitialCondition.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "fieldSpecification/SourceFluxBoundaryCondition.hpp" @@ -146,8 +145,6 @@ FlowSolverBase::FlowSolverBase( string const & name, // allow the user to select a norm getNonlinearSolverParameters().getWrapper< physicsSolverBaseKernels::NormType >( NonlinearSolverParameters::viewKeysStruct::normTypeString() ).setInputFlag( InputFlags::OPTIONAL ); - - addLogLevel< logInfo::Convergence >(); } void FlowSolverBase::registerDataOnMesh( Group & meshBodies ) @@ -834,7 +831,7 @@ void FlowSolverBase::saveAquiferConvergedState( real64 const & time, { localIndex const aquiferIndex = aquiferNameToAquiferId.at( bc.getName() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( "{} {}: at time {} s, the boundary condition produces a volume of {} m3.", bc.getCatalogName(), bc.getName(), time + dt, dt * globalSumFluxes[aquiferIndex] ), diff --git a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp index a373ba0abab..3ea5e19aefd 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp @@ -36,12 +36,6 @@ 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; } @@ -54,13 +48,18 @@ struct Crossflow static constexpr std::string_view getDescription() { return "Crossflow information"; } }; +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 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; } @@ -76,7 +75,7 @@ struct StencilConnection struct StencilInitialization { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on stencil Initialization"; } + static constexpr std::string_view getDescription() { return "Information on stencil initialization"; } }; /// @endcond diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp index 9c458cfdc01..301e3555423 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp @@ -23,7 +23,6 @@ #include "dataRepository/Group.hpp" #include "discretizationMethods/NumericalMethodsManager.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" -#include "fieldSpecification/LogLevelsInfo.hpp" #include "fieldSpecification/SourceFluxBoundaryCondition.hpp" #include "fieldSpecification/EquilibriumInitialCondition.hpp" #include "physicsSolvers/fluidFlow/SourceFluxStatistics.hpp" @@ -122,8 +121,6 @@ ReactiveCompositionalMultiphaseOBL::ReactiveCompositionalMultiphaseOBL( const st setDescription( "List of fluid phases" ); m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::reactiveCompositionalMultiphaseOBL; - - addLogLevel< logInfo::Convergence >(); } void ReactiveCompositionalMultiphaseOBL::initializePreSubGroups() @@ -821,7 +818,7 @@ void ReactiveCompositionalMultiphaseOBL::applySourceFluxBC( real64 const time, if( m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) { globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( targetSet.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( bcLogMessage, getName(), time+dt, fs.getCatalogName(), fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ), @@ -1092,7 +1089,7 @@ void ReactiveCompositionalMultiphaseOBL::applyDirichletBC( real64 const time, if( m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) { globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( targetSet.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( bcLogMessage, getName(), time+dt, fs.getCatalogName(), fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ), @@ -1134,7 +1131,7 @@ void ReactiveCompositionalMultiphaseOBL::applyDirichletBC( real64 const time, if( m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) { globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( targetSet.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( bcLogMessage, getName(), time+dt, fs.getCatalogName(), fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ), diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index acad649f2ba..bb4d66c6122 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -28,7 +28,6 @@ #include "constitutive/solid/SolidInternalEnergy.hpp" #include "constitutive/thermalConductivity/SinglePhaseThermalConductivitySelector.hpp" #include "fieldSpecification/AquiferBoundaryCondition.hpp" -#include "fieldSpecification/LogLevelsInfo.hpp" #include "fieldSpecification/EquilibriumInitialCondition.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "fieldSpecification/SourceFluxBoundaryCondition.hpp" @@ -73,8 +72,7 @@ SinglePhaseBase::SinglePhaseBase( const string & name, "For the energy balance equation, the mass flux is multiplied by the enthalpy in the cell from which the fluid is being produced.", viewKeyStruct::isThermalString() ) ); - addLogLevel< logInfo::Solution >(); - addLogLevel< logInfo::SourceFluxFailure >(); + addLogLevel< logInfo::BoundaryConditions >(); } @@ -987,9 +985,9 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, } if( !subRegion.hasWrapper( dofKey ) ) { - GEOS_LOG_LEVEL_BY_RANK_ON_GROUP( logInfo::SourceFluxFailure, - GEOS_FMT( "{}: trying to apply SourceFlux, but its targetSet named '{}' intersects with non-simulated region named '{}'.", - getDataContext(), setName, subRegion.getName() ), + GEOS_LOG_LEVEL_BY_RANK_ON_GROUP( logInfo::BoundaryConditions, + GEOS_FMT( "{}: trying to apply {}, but its targetSet named '{}' intersects with non-simulated region named '{}'.", + getDataContext(), SourceFluxBoundaryCondition::catalogName(), setName, subRegion.getName() ), fs ); return; } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp index a42263183b4..e4bf8aed5c8 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp @@ -28,8 +28,6 @@ #include "finiteVolume/FluxApproximationBase.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "fieldSpecification/AquiferBoundaryCondition.hpp" -#include "fieldSpecification/LogLevelsInfo.hpp" -#include "mesh/mpiCommunications/CommunicationTools.hpp" #include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBaseFields.hpp" @@ -62,9 +60,7 @@ template< typename BASE > SinglePhaseFVM< BASE >::SinglePhaseFVM( const string & name, Group * const parent ): BASE( name, parent ) -{ - BASE::template addLogLevel< logInfo::Convergence >(); -} +{ } template< typename BASE > void SinglePhaseFVM< BASE >::initializePreSubGroups() @@ -719,7 +715,7 @@ void SinglePhaseFVM< BASE >::applyFaceDirichletBC( real64 const time_n, if( m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) { globalIndex const numTargetFaces = MpiWrapper::sum< globalIndex >( stencil.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::FaceBoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( faceBcLogMessage, this->getName(), time_n+dt, fs.getCatalogName(), fs.getName(), setName, targetGroup.getName(), numTargetFaces ), @@ -755,9 +751,9 @@ void SinglePhaseFVM< BASE >::applyFaceDirichletBC( real64 const time_n, if( m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) { globalIndex const numTargetFaces = MpiWrapper::sum< globalIndex >( stencil.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::FaceBoundaryCondition, GEOS_FMT( faceBcLogMessage, - this->getName(), time_n+dt, fs.getCatalogName(), fs.getName(), - setName, targetGroup.getName(), numTargetFaces ), + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( faceBcLogMessage, + this->getName(), time_n+dt, fs.getCatalogName(), fs.getName(), + setName, targetGroup.getName(), numTargetFaces ), fs ); } @@ -825,7 +821,7 @@ void SinglePhaseFVM< BASE >::applyFaceDirichletBC( real64 const time_n, if( m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) { globalIndex const numTargetFaces = MpiWrapper::sum< globalIndex >( stencil.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::FaceBoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( faceBcLogMessage, this->getName(), time_n+dt, fs.getCatalogName(), fs.getName(), setName, targetGroup.getName(), numTargetFaces ), diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseHybridFVM.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseHybridFVM.cpp index cd89485fe41..c9983892884 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseHybridFVM.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseHybridFVM.cpp @@ -22,7 +22,6 @@ #include "constitutive/ConstitutivePassThru.hpp" #include "constitutive/fluid/singlefluid/SingleFluidBase.hpp" #include "fieldSpecification/AquiferBoundaryCondition.hpp" -#include "fieldSpecification/LogLevelsInfo.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "discretizationMethods/NumericalMethodsManager.hpp" #include "finiteVolume/FiniteVolumeManager.hpp" @@ -56,8 +55,6 @@ SinglePhaseHybridFVM::SinglePhaseHybridFVM( const string & name, // one cell-centered dof per cell m_numDofPerCell = 1; m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhaseHybridFVM; - - addLogLevel< logInfo::ResidualNorm >(); } @@ -383,7 +380,7 @@ void SinglePhaseHybridFVM::applyFaceDirichletBC( real64 const time_n, if( m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) { globalIndex const numTargetFaces = MpiWrapper::sum< globalIndex >( targetSet.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::FaceBoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( faceBcLogMessage, this->getName(), time_n+dt, fs.getCatalogName(), fs.getName(), setName, targetGroup.getName(), numTargetFaces ), diff --git a/src/coreComponents/physicsSolvers/fluidFlow/proppantTransport/ProppantTransport.cpp b/src/coreComponents/physicsSolvers/fluidFlow/proppantTransport/ProppantTransport.cpp index 3708e344998..47a7d3fafdc 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/proppantTransport/ProppantTransport.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/proppantTransport/ProppantTransport.cpp @@ -81,8 +81,6 @@ ProppantTransport::ProppantTransport( const string & name, registerWrapper( viewKeyStruct::updateProppantPackingString(), &m_updateProppantPacking ).setApplyDefaultValue( 0 ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Flag that enables/disables proppant-packing update" ); - - addLogLevel< logInfo::ResidualNorm >(); } void ProppantTransport::postInputInitialization() diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index 8ed44f1f886..39beaa3fffd 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -118,14 +118,6 @@ 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::ResidualNorm >(); - addLogLevel< logInfo::BoundaryConditions >(); - addLogLevel< logInfo::WellComponents >(); - addLogLevel< logInfo::WellControl >(); - addLogLevel< logInfo::WellValidity >(); - addLogLevel< logInfo::Solution >(); - } void CompositionalMultiphaseWell::postInputInitialization() @@ -935,7 +927,7 @@ void CompositionalMultiphaseWell::updateState( DomainPartition & domain ) } ); maxPhaseVolFrac = MpiWrapper::max( maxPhaseVolFrac ); - GEOS_LOG_LEVEL_RANK_0( logInfo::WellComponents, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max well phase volume fraction change = {}", getName(), fmt::format( "{:.{}f}", maxPhaseVolFrac, 4 ) ) ); @@ -1457,10 +1449,10 @@ CompositionalMultiphaseWell::scalingForSystemSolution( DomainPartition & domain, minCompDensScalingFactor = MpiWrapper::min( minCompDensScalingFactor ); string const massUnit = m_useMass ? "kg/m3" : "mol/m3"; - GEOS_LOG_LEVEL_RANK_0( logInfo::WellComponents, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max well pressure change: {} Pa (before scaling)", getName(), GEOS_FMT( "{:.{}f}", maxDeltaPres, 3 ) ) ); - GEOS_LOG_LEVEL_RANK_0( logInfo::WellComponents, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max well component density change: {} {} (before scaling)", getName(), GEOS_FMT( "{:.{}f}", maxDeltaCompDens, 3 ), massUnit ) ); @@ -1468,21 +1460,21 @@ CompositionalMultiphaseWell::scalingForSystemSolution( DomainPartition & domain, { maxDeltaTemp = MpiWrapper::max( maxDeltaTemp ); minTempScalingFactor = MpiWrapper::min( minTempScalingFactor ); - GEOS_LOG_LEVEL_RANK_0( logInfo::WellComponents, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max well temperature change: {} K (before scaling)", getName(), GEOS_FMT( "{:.{}f}", maxDeltaTemp, 3 ) ) ); } - GEOS_LOG_LEVEL_RANK_0( logInfo::WellComponents, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min well pressure scaling factor: {}", getName(), minPresScalingFactor ) ); - GEOS_LOG_LEVEL_RANK_0( logInfo::WellComponents, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min well component density scaling factor: {}", getName(), minCompDensScalingFactor ) ); if( m_isThermal ) { - GEOS_LOG_LEVEL_RANK_0( logInfo::WellComponents, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min well temperature scaling factor: {}", getName(), minTempScalingFactor ) ); } @@ -1584,16 +1576,16 @@ CompositionalMultiphaseWell::checkSystemSolution( DomainPartition & domain, numNegTotalDens = MpiWrapper::sum( numNegTotalDens ); if( numNegPres > 0 ) - GEOS_LOG_LEVEL_RANK_0( logInfo::WellValidity, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, 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( logInfo::WellValidity, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, 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( logInfo::WellValidity, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, 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 1d577ad591b..2d56a9fa8a5 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp @@ -36,37 +36,12 @@ namespace logInfo /// @cond DO_NOT_DOCUMENT -struct BoundaryConditions -{ - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Information on boundary conditions"; } -}; - -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 ///@} diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp index b20be23bd58..9d5ec298f4f 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp @@ -65,11 +65,6 @@ 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::ResidualNorm >(); - addLogLevel< logInfo::BoundaryConditions >(); - addLogLevel< logInfo::SystemSolution >(); - addLogLevel< logInfo::WellControl >(); } void SinglePhaseWell::registerDataOnMesh( Group & meshBodies ) @@ -227,7 +222,7 @@ void SinglePhaseWell::updateBHPForConstraint( WellElementSubRegion & subRegion ) } ); } ); - GEOS_LOG_LEVEL_BY_RANK( logInfo::BoundaryConditions, + GEOS_LOG_LEVEL_BY_RANK( logInfo::WellControl, GEOS_FMT( "{}: The BHP (at the specified reference elevation) = {} Pa", wellControlsName, currentBHP ) ); @@ -264,7 +259,7 @@ void SinglePhaseWell::updateVolRateForConstraint( WellElementSubRegion & subRegi WellControls & wellControls = getWellControls( subRegion ); string const wellControlsName = wellControls.getName(); - bool const logSurfaceCondition = isLogLevelActive< logInfo::BoundaryConditions >( wellControls.getLogLevel()); + bool const logSurfaceCondition = isLogLevelActive< logInfo::WellControl >( wellControls.getLogLevel()); integer const useSurfaceConditions = wellControls.useSurfaceConditions(); real64 const & surfacePres = wellControls.getSurfacePressure(); @@ -1003,7 +998,7 @@ bool SinglePhaseWell::checkSystemSolution( DomainPartition & domain, if( numNegativePressures > 0 ) { - GEOS_LOG_LEVEL_RANK_0( logInfo::SystemSolution, + GEOS_LOG_LEVEL_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Number of negative pressure values: {}, minimum value: {} Pa", getName(), numNegativePressures, fmt::format( "{:.{}f}", minPressure, 3 ) ) ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp index 2fc29270e1d..9c71923dda4 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp @@ -62,6 +62,8 @@ WellSolverBase::WellSolverBase( string const & name, setApplyDefaultValue( 0 ). setInputFlag( dataRepository::InputFlags::OPTIONAL ). setDescription( "Choose time step to honor rates/bhp tables time intervals" ); + + addLogLevel< logInfo::WellControl >(); } Group * WellSolverBase::createChild( string const & childKey, string const & childName ) diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/SeismicityRate.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/SeismicityRate.cpp index 7b9e8938727..f614a96c67b 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/SeismicityRate.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/SeismicityRate.cpp @@ -22,9 +22,9 @@ #include "dataRepository/InputFlags.hpp" #include "mainInterface/GeosxState.hpp" #include "mesh/DomainPartition.hpp" -#include "fieldSpecification/LogLevelsInfo.hpp" -#include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "kernels/SeismicityRateKernels.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/inducedSeismicity/inducedSeismicityFields.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBase.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" @@ -367,7 +367,7 @@ real64 SeismicityRate::updateStresses( real64 const & time_n, string const & ) { globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( lset.size() ); - GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::FaceBoundaryCondition, + GEOS_LOG_LEVEL_RANK_0_ON_GROUP( logInfo::BoundaryConditions, GEOS_FMT( bcLogMessage, this->getName(), time_n+dt, FieldSpecificationBase::catalogName(), fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ), diff --git a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp index 13d8ac7fd2b..87005914e5d 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp @@ -21,7 +21,6 @@ #include "CompositionalMultiphaseReservoirAndWells.hpp" #include "common/TimingMacros.hpp" -#include "dataRepository/LogLevelsInfo.hpp" #include "constitutive/fluid/multifluid/MultiFluidBase.hpp" #include "mesh/PerforationFields.hpp" #include "physicsSolvers/multiphysics/CoupledReservoirAndWellKernels.hpp" @@ -48,7 +47,6 @@ CompositionalMultiphaseReservoirAndWells( const string & name, : Base( name, parent ) { Base::template addLogLevel< logInfo::Crossflow >(); - Base::template addLogLevel< logInfo::LinearSolverConfiguration >(); } template< typename RESERVOIR_SOLVER > @@ -108,7 +106,7 @@ setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirFVM; } } - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } @@ -135,7 +133,7 @@ setMGRStrategy() { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } diff --git a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp index 8c7043e66af..96af5ad250d 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp @@ -57,9 +57,7 @@ class CoupledSolver : public PhysicsSolverBase this->getWrapper< string >( PhysicsSolverBase::viewKeyStruct::discretizationString() ). setInputFlag( dataRepository::InputFlags::FALSE ); - addLogLevel< logInfo::Convergence >(); addLogLevel< logInfo::Coupling >(); - addLogLevel< logInfo::TimeStep >(); } /// deleted copy constructor diff --git a/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp index 5f20e3140e8..b415da3283c 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp @@ -32,9 +32,7 @@ using namespace dataRepository; FlowProppantTransportSolver::FlowProppantTransportSolver( const string & name, Group * const parent ): Base( name, parent ) -{ - addLogLevel< logInfo::Convergence >(); -} +{ } void FlowProppantTransportSolver::preStepUpdate( real64 const & time_n, real64 const & dt, diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp index c815107320c..f29995ba60a 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp @@ -72,10 +72,6 @@ HydrofractureSolver< POROMECHANICS_SOLVER >::HydrofractureSolver( const string & setApplyDefaultValue( 0 ). setInputFlag( InputFlags::OPTIONAL ); - Base::template addLogLevel< logInfo::SurfaceGenerator >(); - Base::template addLogLevel< logInfo::LinearSolverConfiguration >(); - Base::template addLogLevel< logInfo::Solution >(); - registerWrapper( viewKeyStruct::isLaggingFractureStencilWeightsUpdateString(), &m_isLaggingFractureStencilWeightsUpdate ). setApplyDefaultValue( 0 ). setInputFlag( InputFlags::OPTIONAL ). @@ -86,6 +82,8 @@ HydrofractureSolver< POROMECHANICS_SOLVER >::HydrofractureSolver( const string & setInputFlag( InputFlags::OPTIONAL ). setDescription( "Carter's leakoff coefficient (2*delta_p*(k*phi*Ct/mu/pi)^0.5)." ); + Base::template addLogLevel< logInfo::SurfaceGenerator >(); + m_numResolves[0] = 0; } @@ -102,9 +100,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( logInfo::LinearSolverConfiguration - , GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, + 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 f97d86dd5c1..7419649e470 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp @@ -21,7 +21,6 @@ #include "MultiphasePoromechanics.hpp" -#include "dataRepository/LogLevelsInfo.hpp" #include "constitutive/fluid/multifluid/MultiFluidBase.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseHybridFVM.hpp" #include "physicsSolvers/multiphysics/poromechanicsKernels/MultiphasePoromechanics.hpp" @@ -48,9 +47,7 @@ template< typename FLOW_SOLVER, typename MECHANICS_SOLVER > MultiphasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >::MultiphasePoromechanics( const string & name, Group * const parent ) : Base( name, parent ) -{ - Base::template addLogLevel< logInfo::LinearSolverConfiguration >(); -} +{ } template< typename FLOW_SOLVER, typename MECHANICS_SOLVER > void MultiphasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >::postInputInitialization() @@ -313,9 +310,9 @@ void MultiphasePoromechanics<>::setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanics; } } - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration - , GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> @@ -340,7 +337,7 @@ void MultiphasePoromechanics< CompositionalMultiphaseReservoirAndWells<>, SolidM { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp index 76df6d48faf..d67a270bf0e 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp @@ -53,8 +53,6 @@ SinglePhasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >::SinglePhasePoromechan : Base( name, parent ), m_damageFlag() { - Base::template addLogLevel< logInfo::LinearSolverConfiguration >(); - this->registerWrapper( viewKeyStruct::damageFlagString(), &m_damageFlag ). setApplyDefaultValue( 0 ). setInputFlag( InputFlags::OPTIONAL ). @@ -164,7 +162,7 @@ void SinglePhasePoromechanics<>::setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanics; } } - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } @@ -191,7 +189,7 @@ void SinglePhasePoromechanics< SinglePhaseReservoirAndWells<>, SolidMechanicsLag { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp index 431a5f1806a..17df84e8929 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp @@ -30,9 +30,7 @@ template< typename FLOW_SOLVER > SinglePhasePoromechanicsConformingFractures< FLOW_SOLVER >::SinglePhasePoromechanicsConformingFractures( const string & name, Group * const parent ) : Base( name, parent ) -{ - Base::template addLogLevel< logInfo::LinearSolverConfiguration >(); -} +{ } template<> void SinglePhasePoromechanicsConformingFractures<>::setMGRStrategy() @@ -46,7 +44,7 @@ void SinglePhasePoromechanicsConformingFractures<>::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsConformingFractures; - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp index 568709ecf21..cef3fbdf01a 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp @@ -40,12 +40,9 @@ using namespace fields; SinglePhasePoromechanicsEmbeddedFractures::SinglePhasePoromechanicsEmbeddedFractures( const std::string & name, Group * const parent ): SinglePhasePoromechanics( name, parent ) -{ - Base::template addLogLevel< logInfo::LinearSolverConfiguration >(); -} +{ } -SinglePhasePoromechanicsEmbeddedFractures::~SinglePhasePoromechanicsEmbeddedFractures() -{} +SinglePhasePoromechanicsEmbeddedFractures::~SinglePhasePoromechanicsEmbeddedFractures() = default; void SinglePhasePoromechanicsEmbeddedFractures::setMGRStrategy() { @@ -58,7 +55,7 @@ void SinglePhasePoromechanicsEmbeddedFractures::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsEmbeddedFractures; - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp index 35c22984872..e246883e392 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp @@ -43,14 +43,11 @@ SinglePhaseReservoirAndWells< RESERVOIR_SOLVER >:: SinglePhaseReservoirAndWells( const string & name, Group * const parent ) : Base( name, parent ) -{ - Base::template addLogLevel< logInfo::LinearSolverConfiguration >(); -} +{ } template< typename RESERVOIR_SOLVER > SinglePhaseReservoirAndWells< RESERVOIR_SOLVER >:: -~SinglePhaseReservoirAndWells() -{} +~SinglePhaseReservoirAndWells() = default; template<> SinglePhaseBase * @@ -89,7 +86,7 @@ setMGRStrategy() { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhaseReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } @@ -116,7 +113,7 @@ setMGRStrategy() { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } diff --git a/src/coreComponents/physicsSolvers/solidMechanics/contact/ContactSolverBase.cpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/ContactSolverBase.cpp index 3b1b8aed17f..d7f5bdb2591 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/ContactSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/ContactSolverBase.cpp @@ -44,6 +44,9 @@ ContactSolverBase::ContactSolverBase( const string & name, this->getWrapper< string >( viewKeyStruct::surfaceGeneratorNameString() ). setInputFlag( dataRepository::InputFlags::FALSE ); + + addLogLevel< logInfo::ConfigurationStatistics >(); + addLogLevel< logInfo::ContactTolerance >(); } void ContactSolverBase::postInputInitialization() diff --git a/src/coreComponents/physicsSolvers/solidMechanics/contact/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/LogLevelsInfo.hpp index cbb2e9f7790..80f86c71c80 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/LogLevelsInfo.hpp @@ -41,10 +41,10 @@ struct ConfigurationStatistics static constexpr std::string_view getDescription() { return "Output configuration statistics"; } }; -struct Tolerance +struct ContactTolerance { static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Output Tolerance computed the given fracture element"; } + static constexpr std::string_view getDescription() { return "Output tolerance computed the given fracture element"; } }; /// @endcond diff --git a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.cpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.cpp index f0fcbb3e604..3bfdd7d4a93 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsAugmentedLagrangianContact.cpp @@ -89,9 +89,6 @@ SolidMechanicsAugmentedLagrangianContact::SolidMechanicsAugmentedLagrangianConta // Set the default linear solver parameters LinearSolverParameters & linSolParams = m_linearSolverParameters.get(); - addLogLevel< logInfo::Configuration >(); - addLogLevel< logInfo::Convergence >(); - addLogLevel< logInfo::Tolerance >(); // Strategy: AMG with separate displacement components linSolParams.dofsPerNode = 3; @@ -1149,7 +1146,7 @@ void SolidMechanicsAugmentedLagrangianContact::updateStickSlipList( DomainPartit this->m_faceTypesToFaceElementsStick[meshName][finiteElementName] = stickList; this->m_faceTypesToFaceElementsSlip[meshName][finiteElementName] = slipList; - GEOS_LOG_LEVEL_RANK_0( logInfo::Configuration, GEOS_FMT( "# stick elements: {}, # slip elements: {}", nStick, nSlip )) + GEOS_LOG_LEVEL_RANK_0( logInfo::ConfigurationStatistics, GEOS_FMT( "# stick elements: {}, # slip elements: {}", nStick, nSlip )) } ); } ); @@ -1835,7 +1832,7 @@ void SolidMechanicsAugmentedLagrangianContact::computeTolerances( DomainPartitio normalTractionTolerance[kfe] = m_tolNormalTracFac * (averageConstrainedModulus / averageBoxSize0) * (normalDisplacementTolerance[kfe]); - GEOS_LOG_LEVEL( logInfo::Tolerance, + GEOS_LOG_LEVEL( logInfo::ContactTolerance, GEOS_FMT( "kfe: {}, normalDisplacementTolerance: {}, slidingTolerance: {}, normalTractionTolerance: {}", kfe, normalDisplacementTolerance[kfe], slidingTolerance[kfe], normalTractionTolerance[kfe] )); diff --git a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsEmbeddedFractures.cpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsEmbeddedFractures.cpp index 65e6fb49e67..ff4adb59ae5 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsEmbeddedFractures.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsEmbeddedFractures.cpp @@ -57,8 +57,6 @@ SolidMechanicsEmbeddedFractures::SolidMechanicsEmbeddedFractures( const string & getWrapperBase( viewKeyStruct::contactPenaltyStiffnessString() ). setInputFlag( InputFlags::REQUIRED ). setDescription( "Value of the penetration penalty stiffness. Units of Pressure/length" ); - - addLogLevel< logInfo::LinearSolverConfiguration >(); } SolidMechanicsEmbeddedFractures::~SolidMechanicsEmbeddedFractures() @@ -95,8 +93,8 @@ void SolidMechanicsEmbeddedFractures::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::solidMechanicsEmbeddedFractures; - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, 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/solidMechanics/contact/SolidMechanicsLagrangeContact.cpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContact.cpp index 2911d338f9a..fbb95ec5be6 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContact.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContact.cpp @@ -32,6 +32,7 @@ #include "physicsSolvers/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" // needed to register pressure(_n) #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" +#include "physicsSolvers/solidMechanics/contact/LogLevelsInfo.hpp" #include "physicsSolvers/solidMechanics/contact/ContactFields.hpp" #include "common/GEOS_RAJA_Interface.hpp" #include "linearAlgebra/utilities/LAIHelperFunctions.hpp" @@ -68,9 +69,6 @@ SolidMechanicsLagrangeContact::SolidMechanicsLagrangeContact( const string & nam setInputFlag( InputFlags::OPTIONAL ). setApplyDefaultValue( 1.0 ). setDescription( "It be used to increase the scale of the stabilization entries. A value < 1.0 results in larger entries in the stabilization matrix." ); - - addLogLevel< logInfo::Configuration >(); - addLogLevel< logInfo::LinearSolverConfiguration >(); } void SolidMechanicsLagrangeContact::postInputInitialization() @@ -91,8 +89,8 @@ void SolidMechanicsLagrangeContact::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanics; - GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolverConfiguration, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_RANK_0( logInfo::LinearSolver, GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } void SolidMechanicsLagrangeContact::registerDataOnMesh( Group & meshBodies ) @@ -443,7 +441,7 @@ void SolidMechanicsLagrangeContact::computeTolerances( DomainPartition & domain } ); } ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Configuration, + GEOS_LOG_LEVEL_RANK_0( logInfo::ContactTolerance, GEOS_FMT( "{}: normal displacement tolerance = [{}, {}], sliding tolerance = [{}, {}], normal traction tolerance = [{}, {}]", getName(), minNormalDisplacementTolerance, maxNormalDisplacementTolerance, minSlidingTolerance, maxSlidingTolerance, @@ -2329,7 +2327,7 @@ bool SolidMechanicsLagrangeContact::updateConfiguration( DomainPartition & domai // and total area of fracture elements totalArea = MpiWrapper::sum( totalArea ); - GEOS_LOG_LEVEL_RANK_0( logInfo::Configuration, GEOS_FMT( " {}: changed area {} out of {}", getName(), changedArea, totalArea ) ); + GEOS_LOG_LEVEL_RANK_0( logInfo::ConfigurationStatistics, 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/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.cpp b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.cpp index 1d0f8da0ad3..b67540426fd 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.cpp @@ -965,7 +965,7 @@ void SolidMechanicsLagrangeContactBubbleStab::updateStickSlipList( DomainPartiti this->m_faceTypesToFaceElementsStick[meshName][finiteElementName] = stickList; this->m_faceTypesToFaceElementsSlip[meshName][finiteElementName] = slipList; - GEOS_LOG_LEVEL_RANK_0( logInfo::Configuration, GEOS_FMT( "# stick elements: {}, # slip elements: {}", nStick, nSlip )) + GEOS_LOG_LEVEL_RANK_0( logInfo::ConfigurationStatistics, GEOS_FMT( "# stick elements: {}, # slip elements: {}", nStick, nSlip )) } ); } );