diff --git a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp index 456a40b92c..acdbdc0def 100644 --- a/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp +++ b/src/coreComponents/mesh/generators/VTKMeshGenerator.cpp @@ -186,7 +186,8 @@ void VTKMeshGenerator::fillCellBlockManager( CellBlockManager & cellBlockManager } } - GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{} '{}': redistributing mesh...", catalogName(), getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::VTKSteps, + GEOS_FMT( "{} '{}': redistributing mesh...", catalogName(), getName() ) ); vtk::AllMeshes redistributedMeshes = vtk::redistributeMeshes( getLogLevel(), allMeshes.getMainMesh(), allMeshes.getFaceBlocks(), comm, m_partitionMethod, m_partitionRefinement, m_useGlobalIds ); m_vtkMesh = redistributedMeshes.getMainMesh(); diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index bd9c0f86ba..7881c7a47f 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -84,6 +84,12 @@ struct Timers static constexpr std::string_view getDescription() { return "Solver timers information"; } }; +struct LinearSolverConfiguration +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Print linear solver configuration"; } +}; + /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp index 14ec3cbfd4..6aa67fecd3 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp @@ -104,6 +104,7 @@ PhysicsSolverBase::PhysicsSolverBase( string const & name, addLogLevel< logInfo::LinearSolver >(); addLogLevel< logInfo::NonlinearSolver >(); addLogLevel< logInfo::Timers >(); + addLogLevel< logInfo::LinearSolverConfiguration >(); registerGroup( groupKeyStruct::linearSolverParametersString(), &m_linearSolverParameters ); registerGroup( groupKeyStruct::nonlinearSolverParametersString(), &m_nonlinearSolverParameters ); diff --git a/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp b/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp index 6fecd60e93..482fb6c8e9 100644 --- a/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp @@ -23,8 +23,8 @@ #include "constitutive/contact/FrictionBase.hpp" #include "mesh/DomainPartition.hpp" #include "mesh/SurfaceElementRegion.hpp" -#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" +#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "common/GEOS_RAJA_Interface.hpp" namespace geos diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp index b78afce691..a8ead01898 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsEmbeddedFractures.cpp @@ -90,9 +90,10 @@ void SolidMechanicsEmbeddedFractures::setMGRStrategy() linearSolverParameters.mgr.separateComponents = true; linearSolverParameters.dofsPerNode = 3; - linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::solidMechanicsEmbeddedFractures; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::solidMechanicsEmbeddedFractures; "linear solver settings" + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } void SolidMechanicsEmbeddedFractures::registerDataOnMesh( dataRepository::Group & meshBodies ) diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp index 9a76b95632..ce3557ba65 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp @@ -35,7 +35,6 @@ #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" // needed to register pressure(_n) #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/contact/ContactFields.hpp" -#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "common/GEOS_RAJA_Interface.hpp" #include "linearAlgebra/utilities/LAIHelperFunctions.hpp" #include "linearAlgebra/solvers/PreconditionerJacobi.hpp" @@ -93,8 +92,9 @@ void SolidMechanicsLagrangeContact::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanics; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } void SolidMechanicsLagrangeContact::registerDataOnMesh( Group & meshBodies ) diff --git a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp index 28ff8f5ff1..d0e0f76a48 100644 --- a/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp +++ b/src/coreComponents/physicsSolvers/inducedSeismicity/QuasiDynamicEQRK32.cpp @@ -52,6 +52,8 @@ QuasiDynamicEQRK32::QuasiDynamicEQRK32( const string & name, this->registerWrapper( viewKeyStruct::stressSolverNameString(), &m_stressSolverName ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Name of solver for computing stress. If empty, the spring-slider model is run." ); + + addLogLevel< logInfo::SolverSteps >(); } void QuasiDynamicEQRK32::postInputInitialization() @@ -162,7 +164,7 @@ real64 QuasiDynamicEQRK32::solverStep( real64 const & time_n, real64 dtAdaptive = dt; - GEOS_LOG_LEVEL_RANK_0( 1, "Begin adaptive time step" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Begin adaptive time step" ); while( true ) // Adaptive time step loop. Performs a Runge-Kutta time stepping with error control on state and slip { real64 dtStress; GEOS_UNUSED_VAR( dtStress ); @@ -321,7 +323,7 @@ real64 QuasiDynamicEQRK32::updateStresses( real64 const & time_n, const int cycleNumber, DomainPartition & domain ) const { - GEOS_LOG_LEVEL_RANK_0( 1, "Stress solver" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Stress solver" ); // Call member variable stress solver to update the stress state if( m_stressSolver ) { @@ -375,7 +377,7 @@ void QuasiDynamicEQRK32::updateSlipVelocity( real64 const & time_n, real64 const & dt, DomainPartition & domain ) const { - GEOS_LOG_LEVEL_RANK_0( 1, "Rate and State solver" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, "Rate and State solver" ); integer const maxIterNewton = m_nonlinearSolverParameters.m_maxIterNewton; real64 const newtonTol = m_nonlinearSolverParameters.m_newtonTol; forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&]( string const &, @@ -463,11 +465,13 @@ real64 QuasiDynamicEQRK32::setNextDt( real64 const & currentDt, DomainPartition { m_controller.errors[2] = m_controller.errors[1]; m_controller.errors[1] = m_controller.errors[0]; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Adaptive time step successful. The next dt will be {:.2e} s", nextDt )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, + GEOS_FMT( "Adaptive time step successful. The next dt will be {:.2e} s", nextDt )); } else { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Adaptive time step failed. The next dt will be {:.2e} s", nextDt )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverSteps, + GEOS_FMT( "Adaptive time step failed. The next dt will be {:.2e} s", nextDt )); } return nextDt; diff --git a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp index ea2c6f34b3..9b8d109b92 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp @@ -108,8 +108,9 @@ setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirFVM; } } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration + , GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> @@ -134,8 +135,9 @@ setMGRStrategy() { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename RESERVOIR_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp index c11d99f3fa..2c0fa5d6e9 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp @@ -96,8 +96,9 @@ void HydrofractureSolver< POROMECHANICS_SOLVER >::setMGRStrategy() // This may need to be different depending on whether poroelasticity is on or not. linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::hydrofracture; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration + , GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename POROMECHANICS_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp b/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp index 6b01f872f5..415a4195fe 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp @@ -310,8 +310,9 @@ void MultiphasePoromechanics<>::setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanics; } } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration + , GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> @@ -336,8 +337,9 @@ void MultiphasePoromechanics< CompositionalMultiphaseReservoirAndWells<>, SolidM { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename FLOW_SOLVER, typename MECHANICS_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp index 0bfa9146a2..b58f975550 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanics.cpp @@ -140,8 +140,9 @@ void SinglePhasePoromechanics<>::setMGRStrategy() linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanics; } } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> @@ -166,8 +167,9 @@ void SinglePhasePoromechanics< SinglePhaseReservoirAndWells<>, SolidMechanicsLag { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename FLOW_SOLVER, typename MECHANICS_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp index 51fef65a2d..f9004e4529 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp @@ -58,8 +58,9 @@ void SinglePhasePoromechanicsConformingFractures<>::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsConformingFractures; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename FLOW_SOLVER > diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp index 6c6e2be5bc..b78093bb2f 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.cpp @@ -57,8 +57,9 @@ void SinglePhasePoromechanicsEmbeddedFractures::setMGRStrategy() linearSolverParameters.dofsPerNode = 3; linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsEmbeddedFractures; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } void SinglePhasePoromechanicsEmbeddedFractures::postInputInitialization() diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp index f83652d745..4017faf66e 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.cpp @@ -86,8 +86,9 @@ setMGRStrategy() { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhaseReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template<> @@ -112,8 +113,9 @@ setMGRStrategy() { linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsReservoirFVM; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), - EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolverConfiguration, + GEOS_FMT( "{}: MGR strategy set to {}", this->getName(), + EnumStrings< LinearSolverParameters::MGR::StrategyType >::toString( linearSolverParameters.mgr.strategy ))); } template< typename RESERVOIR_SOLVER >