Skip to content

Commit

Permalink
updating log level after merging with develop
Browse files Browse the repository at this point in the history
  • Loading branch information
arng40 committed Dec 19, 2024
1 parent fc7135d commit 1c7408c
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 35 deletions.
3 changes: 2 additions & 1 deletion src/coreComponents/mesh/generators/VTKMeshGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions src/coreComponents/physicsSolvers/LogLevelsInfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
///@}

Expand Down
1 change: 1 addition & 0 deletions src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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 &,
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<>
Expand All @@ -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 >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<>
Expand All @@ -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 >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<>
Expand All @@ -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 >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<>
Expand All @@ -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 >
Expand Down

0 comments on commit 1c7408c

Please sign in to comment.