From 6e7e98d48eca7c0af47f40adfcb72bf007013895 Mon Sep 17 00:00:00 2001 From: Pavel Tomin Date: Tue, 1 Oct 2024 18:04:25 -0500 Subject: [PATCH 01/10] log levels info for solvers --- .../dataRepository/LogLevelsInfo.hpp | 123 +----------------- .../physicsSolvers/CMakeLists.txt | 3 +- .../physicsSolvers/LogLevelsInfo.hpp | 106 +++++++++++++++ .../physicsSolvers/SolverBase.cpp | 60 ++++----- .../physicsSolvers/SolverBase.hpp | 9 +- .../physicsSolvers/contact/CMakeLists.txt | 1 + .../physicsSolvers/contact/LogLevelsInfo.hpp | 52 ++++++++ ...lidMechanicsAugmentedLagrangianContact.cpp | 12 +- .../contact/SolidMechanicsLagrangeContact.cpp | 11 +- .../physicsSolvers/fluidFlow/CMakeLists.txt | 2 + .../fluidFlow/CompositionalMultiphaseBase.cpp | 26 ++-- .../fluidFlow/CompositionalMultiphaseFVM.cpp | 34 ++--- .../CompositionalMultiphaseStatistics.cpp | 53 ++++---- .../fluidFlow/FlowSolverBase.cpp | 8 +- .../fluidFlow/LogLevelsInfo.hpp | 52 ++++++++ .../ReactiveCompositionalMultiphaseOBL.cpp | 2 +- .../fluidFlow/SinglePhaseBase.cpp | 8 +- .../fluidFlow/SinglePhaseFVM.cpp | 6 +- .../fluidFlow/SinglePhaseStatistics.cpp | 22 ++-- .../wells/CompositionalMultiphaseWell.cpp | 17 +-- .../fluidFlow/wells/LogLevelsInfo.hpp | 58 +++++++++ .../fluidFlow/wells/SinglePhaseWell.cpp | 9 +- .../fluidFlow/wells/WellControls.cpp | 6 +- .../multiphysics/CMakeLists.txt | 1 + ...mpositionalMultiphaseReservoirAndWells.cpp | 13 +- .../multiphysics/CoupledSolver.hpp | 15 ++- .../FlowProppantTransportSolver.cpp | 6 +- .../multiphysics/HydrofractureSolver.cpp | 19 ++- .../multiphysics/LogLevelsInfo.hpp | 52 ++++++++ .../multiphysics/MultiphasePoromechanics.cpp | 4 +- .../PoromechanicsInitialization.cpp | 15 ++- ...ePhasePoromechanicsConformingFractures.cpp | 6 - .../SolidMechanicsStateReset.cpp | 13 +- .../SolidMechanicsStatistics.cpp | 12 +- .../surfaceGeneration/CMakeLists.txt | 1 + .../EmbeddedSurfaceGenerator.cpp | 6 +- .../surfaceGeneration/LogLevelsInfo.hpp | 58 +++++++++ .../surfaceGeneration/SurfaceGenerator.cpp | 52 +++----- 38 files changed, 602 insertions(+), 351 deletions(-) create mode 100644 src/coreComponents/physicsSolvers/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp create mode 100644 src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp diff --git a/src/coreComponents/dataRepository/LogLevelsInfo.hpp b/src/coreComponents/dataRepository/LogLevelsInfo.hpp index 1569d5cb42e..aae6e38323c 100644 --- a/src/coreComponents/dataRepository/LogLevelsInfo.hpp +++ b/src/coreComponents/dataRepository/LogLevelsInfo.hpp @@ -14,7 +14,7 @@ /** * @file LogLevelsInfo.hpp - * This file contains all log level informations and the mecanism to ensure LOG_LEVEL_INFO structure is valid + * This file contains log level information infrastructure and the mecanism to ensure LOG_LEVEL_INFO structure is valid */ #ifndef GEOS_COMMON_LOGLEVELSINFO_HPP #define GEOS_COMMON_LOGLEVELSINFO_HPP @@ -25,123 +25,6 @@ namespace geos { -namespace logInfo -{ - -/** - * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT -struct LineSearch -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on line search"; } -}; - -struct LineSearchFailed -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "On Incorrect solution, output the failed line search step"; } -}; - -struct ScalingFactor -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on global solution scaling factor"; } -}; - -struct TimeStep -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on the timestep"; } -}; - -struct SolverTimers -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on solver timers"; } -}; - -struct ScreenLinearSystem -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Output to screen the assembled linear system and solutions (matrices and vectors)"; } - -}; - -struct FileLinearSystem -{ - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "Output to file the assembled linear system and solutions (matrices and vectors)"; } -}; - -struct SolverBaseNonlinearSystem -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "On non linear system, output informations about new configurations"; } -}; - -struct ResidualNorm -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Print residual norm"; } -}; - -struct ResidualValues -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Print the residual values"; } -}; - -struct LinearSystem -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on linear system"; } -}; - -struct CrossflowWarning -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "If the well is injector and crossflow enabled, display informations about crossflow for injectors"; } -}; - -struct HydraulicAperture -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Information on aperture and hydraulic aperture"; } -}; - -struct SolverTimeStep -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Informations on solver time step"; } -}; - -struct SolverNextDt -{ - static constexpr int getMinLogLevel() { return 3; } - static constexpr std::string_view getDescription() { return "Informations on changing DT"; } -}; - -struct Dof -{ - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "The summary of declared fields and coupling"; } -}; - -struct PoromechanicsPhaseFraction -{ - static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Print poromechanics phase volume fraction"; } -}; -/// @endcond -///@} - -} - - /** * @brief Trait used to check whether a LOG_LEVEL_INFO structure is valid. * @tparam LOG_LEVEL_INFO The log level structure to check. @@ -160,7 +43,7 @@ static constexpr bool is_log_level_info = * */ template< typename LOG_LEVEL_INFO > -std::enable_if_t< geos::is_log_level_info< LOG_LEVEL_INFO >, bool > +std::enable_if_t< is_log_level_info< LOG_LEVEL_INFO >, bool > isLogLevelActive( int level ) { return level >= LOG_LEVEL_INFO::getMinLogLevel(); @@ -190,4 +73,4 @@ isLogLevelActive( int level ) } -#endif +#endif // GEOS_COMMON_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/CMakeLists.txt b/src/coreComponents/physicsSolvers/CMakeLists.txt index ed3ea6de356..6bc42626602 100644 --- a/src/coreComponents/physicsSolvers/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/CMakeLists.txt @@ -6,7 +6,8 @@ set( physicsSolvers_headers SolverBase.hpp SolverBaseKernels.hpp SolverStatistics.hpp - FieldStatisticsBase.hpp ) + FieldStatisticsBase.hpp + LogLevelsInfo.hpp ) # Specify solver sources set( physicsSolvers_sources diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp new file mode 100644 index 00000000000..bed386d9e6d --- /dev/null +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -0,0 +1,106 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains common log level informations for physics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_LOGLEVELSINFO_HPP +#define GEOS_PHYSICSSOLVERS_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Common LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct Fields +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "The summary of declared fields and coupling"; } +}; + +struct LineSearch +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Line search information"; } +}; + +struct Solution +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Solutiuon information (scaling, maximum changes, quality check)"; } +}; + +struct Convergence +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Convergence information"; } +}; + +struct TimeStep +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Time step information"; } +}; + +struct LinearSolver +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Linear solver information"; } +}; + +struct NonlinearSolver +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Nonlinear solver information"; } +}; + +struct SolverTimers +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Solver timers information"; } +}; + +struct Initialization +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Initialization information"; } +}; + +struct Statistics +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Print statistics when supported"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_LOGLEVELSINFO_HPP + diff --git a/src/coreComponents/physicsSolvers/SolverBase.cpp b/src/coreComponents/physicsSolvers/SolverBase.cpp index c0999a1ab16..4e4fd3772a5 100644 --- a/src/coreComponents/physicsSolvers/SolverBase.cpp +++ b/src/coreComponents/physicsSolvers/SolverBase.cpp @@ -96,16 +96,14 @@ SolverBase::SolverBase( string const & name, setRestartFlags( RestartFlags::WRITE_AND_READ ). setDescription( "Write matrix, rhs, solution to screen ( = 1) or file ( = 2)." ); + addLogLevel< logInfo::Fields >(); addLogLevel< logInfo::LineSearch >(); - addLogLevel< logInfo::LineSearchFailed >(); - addLogLevel< logInfo::ScalingFactor >(); + addLogLevel< logInfo::Solution >(); + addLogLevel< logInfo::Convergence >(); addLogLevel< logInfo::TimeStep >(); + addLogLevel< logInfo::LinearSolver >(); + addLogLevel< logInfo::NonlinearSolver >(); addLogLevel< logInfo::SolverTimers >(); - addLogLevel< logInfo::ScreenLinearSystem >(); - addLogLevel< logInfo::FileLinearSystem >(); - addLogLevel< logInfo::SolverBaseNonlinearSystem >(); - addLogLevel< logInfo::ResidualNorm >(); - addLogLevel< logInfo::LinearSystem >(); registerGroup( groupKeyStruct::linearSolverParametersString(), &m_linearSolverParameters ); registerGroup( groupKeyStruct::nonlinearSolverParametersString(), &m_nonlinearSolverParameters ); @@ -236,6 +234,10 @@ real64 SolverBase::solverStep( real64 const & time_n, { setupSystem( domain, m_dofManager, m_localMatrix, m_rhs, m_solution ); setSystemSetupTimestamp( meshModificationTimestamp ); + + std::ostringstream oss; + m_dofManager.printFieldInfo( oss ); + GEOS_LOG_LEVEL_INFO( logInfo::Fields, oss.str()) } implicitStepSetup( time_n, dt, domain ); @@ -373,8 +375,8 @@ real64 SolverBase::setNextDt( real64 const & currentDt, if( ( m_numTimestepsSinceLastDtCut >= 0 ) && ( m_numTimestepsSinceLastDtCut < minTimeStepIncreaseInterval ) ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: time-step size will be kept the same since it's been {} cycles since last cut.", - getName(), m_numTimestepsSinceLastDtCut ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: time-step size will be kept the same since it's been {} cycles since last cut.", + getName(), m_numTimestepsSinceLastDtCut ) ); return currentDt; } @@ -597,7 +599,7 @@ bool SolverBase::lineSearch( real64 const & time_n, if( !checkSystemSolution( domain, dofManager, solution.values(), localScaleFactor ) ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearchFailed, GEOS_FMT( " Line search {}, solution check failed", lineSearchIteration ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " Line search {}, solution check failed", lineSearchIteration ) ); continue; } @@ -615,14 +617,11 @@ bool SolverBase::lineSearch( real64 const & time_n, applyBoundaryConditions( time_n, dt, domain, dofManager, localMatrix, localRhs ); rhs.close(); - if( logger::internal::rank==0 ) - { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " Line search @ {:0.3f}: ", cumulativeScale )); - } + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " Line search @ {:0.3f}: ", cumulativeScale )); // get residual norm residualNorm = calculateResidualNorm( time_n, dt, domain, dofManager, rhs.values() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::ResidualNorm, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); // if the residual norm is less than the last residual, we can proceed to the // solution step @@ -689,7 +688,7 @@ bool SolverBase::lineSearchWithParabolicInterpolation( real64 const & time_n, if( !checkSystemSolution( domain, dofManager, solution.values(), deltaLocalScaleFactor ) ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearchFailed, " Line search " << lineSearchIteration << ", solution check failed" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " Line search {}, solution check failed", lineSearchIteration ) ); continue; } @@ -719,7 +718,7 @@ bool SolverBase::lineSearchWithParabolicInterpolation( real64 const & time_n, // get residual norm residualNormT = calculateResidualNorm( time_n, dt, domain, dofManager, rhs.values() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::ResidualNorm, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNormT ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LineSearch, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNormT ) ); ffm = ffT; @@ -754,11 +753,9 @@ real64 SolverBase::eisenstatWalker( real64 const newNewtonNorm, krylovTol = std::min( krylovTol, krylovParams.weakestTol ); krylovTol = std::max( krylovTol, krylovParams.strongestTol ); - if( logLevel > 0 ) - { - GEOS_LOG_RANK_0( GEOS_FMT( " Adaptive linear tolerance = {:4.2e} (norm ratio = {:4.2e}, old tolerance = {:4.2e}, new tolerance = {:4.2e}, safeguard = {:4.2e})", - krylovTol, normRatio, krylovParams.relTolerance, newKrylovTol, altKrylovTol ) ); - } + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolver, + GEOS_FMT( " Adaptive linear tolerance = {:4.2e} (norm ratio = {:4.2e}, old tolerance = {:4.2e}, new tolerance = {:4.2e}, safeguard = {:4.2e})", + krylovTol, normRatio, krylovParams.relTolerance, newKrylovTol, altKrylovTol ) ); return krylovTol; } @@ -823,7 +820,7 @@ real64 SolverBase::nonlinearImplicitStep( real64 const & time_n, { // increment the solver statistics for reporting purposes m_solverStatistics.logOuterLoopIteration(); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverBaseNonlinearSystem, "---------- Configuration did not converge. Testing new configuration. ----------" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, "---------- Configuration did not converge. Testing new configuration. ----------" ); } } else if( !attemptedSimplestConfiguration ) @@ -853,7 +850,7 @@ real64 SolverBase::nonlinearImplicitStep( real64 const & time_n, // cut timestep, go back to beginning of step and restart the Newton loop stepDt *= dtCutFactor; m_numTimestepsSinceLastDtCut = 0; - GEOS_LOG_LEVEL_INFO_RANK_0 ( logInfo::SolverBaseNonlinearSystem, GEOS_FMT( "New dt = {}", stepDt ) ); + GEOS_LOG_LEVEL_INFO_RANK_0 ( logInfo::TimeStep, GEOS_FMT( "New dt = {}", stepDt ) ); // notify the solver statistics counter that this is a time step cut m_solverStatistics.logTimeStepCut(); @@ -899,7 +896,7 @@ bool SolverBase::solveNonlinearSystem( real64 const & time_n, for( newtonIter = 0; newtonIter < maxNewtonIter; ++newtonIter ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverBaseNonlinearSystem, GEOS_FMT( " Attempt: {:2}, ConfigurationIter: {:2}, NewtonIter: {:2}", dtAttempt, configurationLoopIter, newtonIter ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, GEOS_FMT( " Attempt: {:2}, ConfigurationIter: {:2}, NewtonIter: {:2}", dtAttempt, configurationLoopIter, newtonIter ) ); { Timer timer( m_timers["assemble"] ); @@ -948,7 +945,7 @@ bool SolverBase::solveNonlinearSystem( real64 const & time_n, // get residual norm residualNorm = calculateResidualNorm( time_n, stepDt, domain, m_dofManager, m_rhs.values() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::ResidualNorm, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); } // if the residual norm is less than the Newton tolerance we denote that we have @@ -964,9 +961,9 @@ bool SolverBase::solveNonlinearSystem( real64 const & time_n, if( residualNorm > m_nonlinearSolverParameters.m_maxAllowedResidualNorm ) { string const maxAllowedResidualNormString = NonlinearSolverParameters::viewKeysStruct::maxAllowedResidualNormString(); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::ResidualNorm, GEOS_FMT( " The residual norm is above the {} of {}. Newton loop terminated.", - maxAllowedResidualNormString, - m_nonlinearSolverParameters.m_maxAllowedResidualNorm ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " The residual norm is above the {} of {}. Newton loop terminated.", + maxAllowedResidualNormString, + m_nonlinearSolverParameters.m_maxAllowedResidualNorm ) ); isNewtonConverged = false; break; } @@ -1064,7 +1061,7 @@ bool SolverBase::solveNonlinearSystem( real64 const & time_n, // Compute the scaling factor for the Newton update scaleFactor = scalingForSystemSolution( domain, m_dofManager, m_solution.values() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::ScalingFactor, GEOS_FMT( " {}: Global solution scaling factor = {}", getName(), scaleFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Global solution scaling factor = {}", getName(), scaleFactor ) ); if( !checkSystemSolution( domain, m_dofManager, m_solution.values(), scaleFactor ) ) { @@ -1301,7 +1298,7 @@ void SolverBase::solveLinearSystem( DofManager const & dofManager, m_linearSolverResult = solver->result(); } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSystem, GEOS_FMT( " Last LinSolve(iter,res) = ( {:3}, {:4.2e} )", + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::LinearSolver, GEOS_FMT( " Last LinSolve(iter,res) = ( {:3}, {:4.2e} )", m_linearSolverResult.numIterations, m_linearSolverResult.residualReduction ) ); @@ -1385,7 +1382,6 @@ void SolverBase::cleanup( real64 const GEOS_UNUSED_PARAM( time_n ), { m_solverStatistics.outputStatistics(); - for( auto & timer : m_timers ) { real64 const time = std::chrono::duration< double >( timer.second ).count(); diff --git a/src/coreComponents/physicsSolvers/SolverBase.hpp b/src/coreComponents/physicsSolvers/SolverBase.hpp index 3003bab3cde..923321e2002 100644 --- a/src/coreComponents/physicsSolvers/SolverBase.hpp +++ b/src/coreComponents/physicsSolvers/SolverBase.hpp @@ -30,6 +30,7 @@ #include "physicsSolvers/NonlinearSolverParameters.hpp" #include "physicsSolvers/LinearSolverParameters.hpp" #include "physicsSolvers/SolverStatistics.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include @@ -938,10 +939,10 @@ class SolverBase : public ExecutableGroup * @param logLevel Log level * @return Adaptive tolerance recommendation */ - static real64 eisenstatWalker( real64 const newNewtonNorm, - real64 const oldNewtonNorm, - LinearSolverParameters::Krylov const & krylovParams, - integer const logLevel ); + real64 eisenstatWalker( real64 const newNewtonNorm, + real64 const oldNewtonNorm, + LinearSolverParameters::Krylov const & krylovParams, + integer const logLevel ); /** * @brief Get the Constitutive Name object diff --git a/src/coreComponents/physicsSolvers/contact/CMakeLists.txt b/src/coreComponents/physicsSolvers/contact/CMakeLists.txt index 23c4693cedd..c9bf75bec3e 100644 --- a/src/coreComponents/physicsSolvers/contact/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/contact/CMakeLists.txt @@ -15,6 +15,7 @@ set( physicsSolvers_headers contact/SolidMechanicsALMKernelsHelper.hpp contact/SolidMechanicsALMJumpUpdateKernels.hpp contact/SolidMechanicsALMBubbleKernels.hpp + contact/LogLevelsInfo.hpp PARENT_SCOPE ) diff --git a/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp new file mode 100644 index 00000000000..3d20705acc2 --- /dev/null +++ b/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp @@ -0,0 +1,52 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains log level informations for contact solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_CONTACT_LOGLEVELSINFO_HPP +#define GEOS_PHYSICSSOLVERS_CONTACT_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct Configuration +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Configuration information"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_CONTACT_LOGLEVELSINFO_HPP + diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp index eb9fc81049e..bb05f4905dd 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp @@ -24,6 +24,7 @@ #include "physicsSolvers/contact/SolidMechanicsALMSimultaneousKernels.hpp" #include "physicsSolvers/contact/SolidMechanicsALMJumpUpdateKernels.hpp" #include "physicsSolvers/contact/SolidMechanicsALMBubbleKernels.hpp" +#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "constitutive/ConstitutiveManager.hpp" #include "constitutive/contact/FrictionSelector.hpp" @@ -903,10 +904,10 @@ bool SolidMechanicsAugmentedLagrangianContact::updateConfiguration( DomainPartit int hasConfigurationConvergedGlobally = (totCondNotConv == 0) ? true : false; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " ALM convergence summary:" - " converged: {:6} | stick & gn>0: {:6} | compenetration: {:6} | stick & gt>lim: {:6} | tau>tauLim: {:6}\n", - globalCondConv[0], globalCondConv[1], globalCondConv[2], - globalCondConv[3], globalCondConv[4] )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ALM convergence summary:" + " converged: {:6} | stick & gn>0: {:6} | compenetration: {:6} | stick & gt>lim: {:6} | tau>tauLim: {:6}\n", + globalCondConv[0], globalCondConv[1], globalCondConv[2], + globalCondConv[3], globalCondConv[4] )); if( hasConfigurationConvergedGlobally ) { @@ -1089,8 +1090,7 @@ void SolidMechanicsAugmentedLagrangianContact::updateStickSlipList( DomainPartit this->m_faceTypesToFaceElementsStick[meshName][finiteElementName] = stickList; this->m_faceTypesToFaceElementsSlip[meshName][finiteElementName] = slipList; - GEOS_LOG_LEVEL( 2, - GEOS_FMT( "# stick elements: {}, # slip elements: {}", nStick, nSlip )) + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Configuration, GEOS_FMT( "# stick elements: {}, # slip elements: {}", nStick, nSlip )) } ); } ); diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp index 2b66ae59da0..83277a61fbc 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp @@ -35,6 +35,7 @@ #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" // needed to register pressure(_n) #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/contact/ContactFields.hpp" +#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "common/GEOS_RAJA_Interface.hpp" #include "linearAlgebra/utilities/LAIHelperFunctions.hpp" #include "linearAlgebra/solvers/PreconditionerJacobi.hpp" @@ -426,10 +427,10 @@ void SolidMechanicsLagrangeContact::computeTolerances( DomainPartition & domain } ); } ); - GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{}: normal displacement tolerance = [{}, {}], sliding tolerance = [{}, {}], normal traction tolerance = [{}, {}]", - this->getName(), minNormalDisplacementTolerance, maxNormalDisplacementTolerance, - minSlidingTolerance, maxSlidingTolerance, - minNormalTractionTolerance, maxNormalTractionTolerance ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Configuration, GEOS_FMT( "{}: normal displacement tolerance = [{}, {}], sliding tolerance = [{}, {}], normal traction tolerance = [{}, {}]", + this->getName(), minNormalDisplacementTolerance, maxNormalDisplacementTolerance, + minSlidingTolerance, maxSlidingTolerance, + minNormalTractionTolerance, maxNormalTractionTolerance ) ); } void SolidMechanicsLagrangeContact::resetStateToBeginningOfStep( DomainPartition & domain ) @@ -2333,7 +2334,7 @@ bool SolidMechanicsLagrangeContact::updateConfiguration( DomainPartition & domai // and total area of fracture elements totalArea = MpiWrapper::sum( totalArea ); - GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( " {}: changed area {} out of {}", getName(), changedArea, totalArea ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Configuration, GEOS_FMT( " {}: changed area {} out of {}", getName(), changedArea, totalArea ) ); // Assume converged if changed area is below certain fraction of total area return changedArea <= m_nonlinearSolverParameters.m_configurationTolerance * totalArea; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt index 37b41360330..0f9bb90d40e 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/fluidFlow/CMakeLists.txt @@ -42,6 +42,7 @@ set( physicsSolvers_headers fluidFlow/StencilDataCollection.hpp fluidFlow/ThermalSinglePhaseBaseKernels.hpp fluidFlow/ThermalSinglePhaseFVMKernels.hpp + fluidFlow/LogLevelsInfo.hpp fluidFlow/wells/CompositionalMultiphaseWell.hpp fluidFlow/wells/CompositionalMultiphaseWellFields.hpp fluidFlow/wells/CompositionalMultiphaseWellKernels.hpp @@ -52,6 +53,7 @@ set( physicsSolvers_headers fluidFlow/wells/WellControls.hpp fluidFlow/wells/WellSolverBase.hpp fluidFlow/wells/WellSolverBaseFields.hpp + fluidFlow/wells/LogLevelsInfo.hpp PARENT_SCOPE ) # Specify solver sources diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index a8d6f99ecec..5bbfccf29a5 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -2152,23 +2152,23 @@ real64 CompositionalMultiphaseBase::setNextDtBasedOnStateChange( real64 const & maxRelativePresChange = MpiWrapper::max( maxRelativePresChange ); maxAbsolutePhaseVolFracChange = MpiWrapper::max( maxAbsolutePhaseVolFracChange ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: max relative pressure change during time step = {} %", - getName(), GEOS_FMT( "{:.{}f}", 100*maxRelativePresChange, 3 ) ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: max absolute phase volume fraction change during time step = {}", - getName(), GEOS_FMT( "{:.{}f}", maxAbsolutePhaseVolFracChange, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: max relative pressure change during time step = {} %", + getName(), GEOS_FMT( "{:.{}f}", 100*maxRelativePresChange, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: max absolute phase volume fraction change during time step = {}", + getName(), GEOS_FMT( "{:.{}f}", maxAbsolutePhaseVolFracChange, 3 ) ) ); if( m_targetRelativeCompDensChange < LvArray::NumericLimits< real64 >::max ) { maxRelativeCompDensChange = MpiWrapper::max( maxRelativeCompDensChange ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: max relative component density change during time step = {} %", - getName(), GEOS_FMT( "{:.{}f}", 100*maxRelativeCompDensChange, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: max relative component density change during time step = {} %", + getName(), GEOS_FMT( "{:.{}f}", 100*maxRelativeCompDensChange, 3 ) ) ); } if( m_isThermal ) { maxRelativeTempChange = MpiWrapper::max( maxRelativeTempChange ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: max relative temperature change during time step = {} %", - getName(), GEOS_FMT( "{:.{}f}", 100*maxRelativeTempChange, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: max relative temperature change during time step = {} %", + getName(), GEOS_FMT( "{:.{}f}", 100*maxRelativeTempChange, 3 ) ) ); } real64 const eps = LvArray::NumericLimits< real64 >::epsilon; @@ -2208,8 +2208,8 @@ real64 CompositionalMultiphaseBase::setNextDtBasedOnCFL( const geos::real64 & cu computeCFLNumbers( domain, currentDt, maxPhaseCFL, maxCompCFL ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: max phase CFL number = {}", getName(), maxPhaseCFL ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: max component CFL number = {} ", getName(), maxCompCFL ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: max phase CFL number = {}", getName(), maxPhaseCFL ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: max component CFL number = {} ", getName(), maxCompCFL ) ); return std::min( m_targetFlowCFL * currentDt / maxCompCFL, m_targetFlowCFL * currentDt / maxPhaseCFL ); @@ -2611,7 +2611,7 @@ void CompositionalMultiphaseBase::updateState( DomainPartition & domain ) maxDeltaPhaseVolFrac = MpiWrapper::max( maxDeltaPhaseVolFrac ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max phase volume fraction change = {}", getName(), fmt::format( "{:.{}f}", maxDeltaPhaseVolFrac, 4 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max phase volume fraction change = {}", getName(), fmt::format( "{:.{}f}", maxDeltaPhaseVolFrac, 4 ) ) ); } bool CompositionalMultiphaseBase::checkSequentialSolutionIncrements( DomainPartition & domain ) const @@ -2619,8 +2619,8 @@ bool CompositionalMultiphaseBase::checkSequentialSolutionIncrements( DomainParti bool isConverged = FlowSolverBase::checkSequentialSolutionIncrements( domain ); string const unit = m_useMass ? "kg/m3" : "mol/m3"; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max component density change during outer iteration: {} {}", - getName(), fmt::format( "{:.{}f}", m_sequentialCompDensChange, 3 ), unit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " {}: Max component density change during outer iteration: {} {}", + getName(), fmt::format( "{:.{}f}", m_sequentialCompDensChange, 3 ), unit ) ); return isConverged && (m_sequentialCompDensChange < m_maxSequentialCompDensChange); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp index 4886541723b..b1969aabd49 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseFVM.cpp @@ -435,8 +435,8 @@ real64 CompositionalMultiphaseFVM::calculateResidualNorm( real64 const & GEOS_UN } residualNorm = sqrt( globalResidualNorm[0] * globalResidualNorm[0] + globalResidualNorm[1] * globalResidualNorm[1] ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::ResidualNorm, GEOS_FMT( " ( R{} ) = ( {:4.2e} ) ( Renergy ) = ( {:4.2e} )", - coupledSolverAttributePrefix(), globalResidualNorm[0], globalResidualNorm[1] )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ( R{} ) = ( {:4.2e} ) ( Renergy ) = ( {:4.2e} )", + coupledSolverAttributePrefix(), globalResidualNorm[0], globalResidualNorm[1] )); } else { @@ -523,26 +523,26 @@ real64 CompositionalMultiphaseFVM::scalingForSystemSolution( DomainPartition & d minCompDensScalingFactor = MpiWrapper::min( minCompDensScalingFactor ); string const massUnit = m_useMass ? "kg/m3" : "mol/m3"; - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max pressure change = {} Pa (before scaling)", - getName(), GEOS_FMT( "{:.{}f}", maxDeltaPres, 3 ) ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max component density change = {} {} (before scaling)", - getName(), GEOS_FMT( "{:.{}f}", maxDeltaCompDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max pressure change = {} Pa (before scaling)", + getName(), GEOS_FMT( "{:.{}f}", maxDeltaPres, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max component density change = {} {} (before scaling)", + getName(), GEOS_FMT( "{:.{}f}", maxDeltaCompDens, 3 ), massUnit ) ); if( m_isThermal ) { maxDeltaTemp = MpiWrapper::max( maxDeltaTemp ); minTempScalingFactor = MpiWrapper::min( minTempScalingFactor ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max temperature change = {} K (before scaling)", - getName(), GEOS_FMT( "{:.{}f}", maxDeltaTemp, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max temperature change = {} K (before scaling)", + getName(), GEOS_FMT( "{:.{}f}", maxDeltaTemp, 3 ) ) ); } if( m_scalingType == ScalingType::Local ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Min pressure scaling factor = {}", getName(), minPresScalingFactor ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Min component density scaling factor = {}", getName(), minCompDensScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min pressure scaling factor = {}", getName(), minPresScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min component density scaling factor = {}", getName(), minCompDensScalingFactor ) ); if( m_isThermal ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Min temperature scaling factor = {}", getName(), minTempScalingFactor ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min temperature scaling factor = {}", getName(), minTempScalingFactor ) ); } } @@ -615,15 +615,15 @@ bool CompositionalMultiphaseFVM::checkSystemSolution( DomainPartition & domain, numNegTotalDens = MpiWrapper::sum( numNegTotalDens ); if( numNegPres > 0 ) - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Number of negative pressure values: {}, minimum value: {} Pa", - getName(), numNegPres, fmt::format( "{:.{}f}", minPres, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Number of negative pressure values: {}, minimum value: {} Pa", + getName(), numNegPres, fmt::format( "{:.{}f}", minPres, 3 ) ) ); string const massUnit = m_useMass ? "kg/m3" : "mol/m3"; if( numNegDens > 0 ) - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Number of negative component density values: {}, minimum value: {} {}}", - getName(), numNegDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Number of negative component density values: {}, minimum value: {} {}}", + getName(), numNegDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); if( minTotalDens > 0 ) - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Number of negative total density values: {}, minimum value: {} {}}", - getName(), minTotalDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Number of negative total density values: {}, minimum value: {} {}}", + getName(), minTotalDens, fmt::format( "{:.{}f}", minDens, 3 ), massUnit ) ); return MpiWrapper::min( localCheck ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp index 8240c9b3eaf..b4a6fbe5a09 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp @@ -32,6 +32,7 @@ #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseBaseKernels.hpp" #include "physicsSolvers/fluidFlow/IsothermalCompositionalMultiphaseFVMKernels.hpp" +#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" namespace geos @@ -391,8 +392,7 @@ void CompositionalMultiphaseStatistics::computeRegionStatistics( real64 const ti { regionStatistics.averagePressure = 0.0; regionStatistics.averageTemperature = 0.0; - GEOS_LOG_LEVEL_RANK_0( 1, getName() << ", " << regionNames[i] - << ": Cannot compute average pressure because region pore volume is zero." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {}: Cannot compute average pressure because region pore volume is zero.", getName(), regionNames[i] ) ); } @@ -407,33 +407,34 @@ void CompositionalMultiphaseStatistics::computeRegionStatistics( real64 const ti string_view massUnit = units::getSymbol( m_solver->getMassUnit() ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Pressure (min, average, max): {}, {}, {} Pa", - getName(), regionNames[i], time, regionStatistics.minPressure, regionStatistics.averagePressure, regionStatistics.maxPressure ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Delta pressure (min, max): {}, {} Pa", - getName(), regionNames[i], time, regionStatistics.minDeltaPressure, regionStatistics.maxDeltaPressure ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Temperature (min, average, max): {}, {}, {} K", - getName(), regionNames[i], time, regionStatistics.minTemperature, regionStatistics.averageTemperature, regionStatistics.maxTemperature ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Total dynamic pore volume: {} rm^3", - getName(), regionNames[i], time, regionStatistics.totalPoreVolume ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Phase dynamic pore volume: {} rm^3", - getName(), regionNames[i], time, regionStatistics.phasePoreVolume ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Phase mass: {} {}", - getName(), regionNames[i], time, regionStatistics.phaseMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Pressure (min, average, max): {}, {}, {} Pa", + getName(), regionNames[i], time, regionStatistics.minPressure, regionStatistics.averagePressure, regionStatistics.maxPressure ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Delta pressure (min, max): {}, {} Pa", + getName(), regionNames[i], time, regionStatistics.minDeltaPressure, regionStatistics.maxDeltaPressure ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Temperature (min, average, max): {}, {}, {} K", + getName(), regionNames[i], time, regionStatistics.minTemperature, regionStatistics.averageTemperature, + regionStatistics.maxTemperature ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Total dynamic pore volume: {} rm^3", + getName(), regionNames[i], time, regionStatistics.totalPoreVolume ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Phase dynamic pore volume: {} rm^3", + getName(), regionNames[i], time, regionStatistics.phasePoreVolume ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Phase mass: {} {}", + getName(), regionNames[i], time, regionStatistics.phaseMass, massUnit ) ); // metric 1: trapping computed with the Land trapping coefficient (similar to Eclipse) - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Trapped phase mass (metric 1): {} {}", - getName(), regionNames[i], time, regionStatistics.trappedPhaseMass, massUnit ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Non-trapped phase mass (metric 1): {} {}", - getName(), regionNames[i], time, nonTrappedPhaseMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Trapped phase mass (metric 1): {} {}", + getName(), regionNames[i], time, regionStatistics.trappedPhaseMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Non-trapped phase mass (metric 1): {} {}", + getName(), regionNames[i], time, nonTrappedPhaseMass, massUnit ) ); // metric 2: immobile phase mass computed with a threshold on relative permeability - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Immobile phase mass (metric 2): {} {}", - getName(), regionNames[i], time, regionStatistics.immobilePhaseMass, massUnit ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Mobile phase mass (metric 2): {} {}", - getName(), regionNames[i], time, mobilePhaseMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Immobile phase mass (metric 2): {} {}", + getName(), regionNames[i], time, regionStatistics.immobilePhaseMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Mobile phase mass (metric 2): {} {}", + getName(), regionNames[i], time, mobilePhaseMass, massUnit ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Component mass: {} {}", - getName(), regionNames[i], time, regionStatistics.componentMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Component mass: {} {}", + getName(), regionNames[i], time, regionStatistics.componentMass, massUnit ) ); if( m_writeCSV > 0 && MpiWrapper::commRank() == 0 ) { @@ -472,8 +473,8 @@ void CompositionalMultiphaseStatistics::computeCFLNumbers( real64 const time, real64 maxPhaseCFL, maxCompCFL; m_solver->computeCFLNumbers( domain, dt, maxPhaseCFL, maxCompCFL ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{} (time {} s): Max phase CFL number: {}", getName(), time, maxPhaseCFL ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{} (time {} s): Max component CFL number: {}", getName(), time, maxCompCFL ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::CFL, GEOS_FMT( "{} (time {} s): Max phase CFL number: {}", getName(), time, maxPhaseCFL ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::CFL, GEOS_FMT( "{} (time {} s): Max component CFL number: {}", getName(), time, maxCompCFL ) ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp index 5c54deae9b5..041b30899e8 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp @@ -795,13 +795,13 @@ void FlowSolverBase::updateStencilWeights( DomainPartition & domain ) const bool FlowSolverBase::checkSequentialSolutionIncrements( DomainPartition & GEOS_UNUSED_PARAM( domain ) ) const { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max pressure change during outer iteration: {} Pa", - getName(), fmt::format( "{:.{}f}", m_sequentialPresChange, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " {}: Max pressure change during outer iteration: {} Pa", + getName(), fmt::format( "{:.{}f}", m_sequentialPresChange, 3 ) ) ); if( m_isThermal ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max temperature change during outer iteration: {} K", - getName(), fmt::format( "{:.{}f}", m_sequentialTempChange, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " {}: Max temperature change during outer iteration: {} K", + getName(), fmt::format( "{:.{}f}", m_sequentialTempChange, 3 ) ) ); } return (m_sequentialPresChange < m_maxSequentialPresChange) && (m_sequentialTempChange < m_maxSequentialTempChange); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp new file mode 100644 index 00000000000..68a48f9d134 --- /dev/null +++ b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp @@ -0,0 +1,52 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains log level informations for flow solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP +#define GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct CFL +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "CFL information"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP + diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp index 2cc82207076..8c22b18deab 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp @@ -367,7 +367,7 @@ real64 ReactiveCompositionalMultiphaseOBL::calculateResidualNorm( real64 const & real64 const residual = m_useDARTSL2Norm ? MpiWrapper::max( localResidualNorm ) : std::sqrt( MpiWrapper::sum( localResidualNorm ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::ResidualNorm, GEOS_FMT( " ( Rflow ) = ( {:4.2e} )", residual ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ( Rflow ) = ( {:4.2e} )", residual ) ); return residual; } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 05dbc006843..29bb60d7ad2 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1339,8 +1339,8 @@ real64 SinglePhaseBase::scalingForSystemSolution( DomainPartition & domain, scalingFactor = MpiWrapper::min( scalingFactor ); maxDeltaPres = MpiWrapper::max( maxDeltaPres ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Max pressure change = {} Pa (before scaling)", - getName(), fmt::format( "{:.{}f}", maxDeltaPres, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max pressure change = {} Pa (before scaling)", + getName(), fmt::format( "{:.{}f}", maxDeltaPres, 3 ) ) ); return scalingFactor; } @@ -1381,8 +1381,8 @@ bool SinglePhaseBase::checkSystemSolution( DomainPartition & domain, numNegativePressures = MpiWrapper::sum( numNegativePressures ); if( numNegativePressures > 0 ) - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " {}: Number of negative pressure values: {}, minimum value: {} Pa", - getName(), numNegativePressures, fmt::format( "{:.{}f}", minPressure, 3 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Number of negative pressure values: {}, minimum value: {} Pa", + getName(), numNegativePressures, fmt::format( "{:.{}f}", minPressure, 3 ) ) ); return (m_allowNegativePressure || numNegativePressures == 0) ? 1 : 0; } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp index 3f833f7248e..7497c55e653 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseFVM.cpp @@ -228,8 +228,8 @@ real64 SinglePhaseFVM< BASE >::calculateResidualNorm( real64 const & GEOS_UNUSED } residualNorm = sqrt( globalResidualNorm[0] * globalResidualNorm[0] + globalResidualNorm[1] * globalResidualNorm[1] ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::ResidualNorm, GEOS_FMT( " ( R{} ) = ( {:4.2e} ) ( Renergy ) = ( {:4.2e} )", - FlowSolverBase::coupledSolverAttributePrefix(), globalResidualNorm[0], globalResidualNorm[1] )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ( R{} ) = ( {:4.2e} ) ( Renergy ) = ( {:4.2e} )", + FlowSolverBase::coupledSolverAttributePrefix(), globalResidualNorm[0], globalResidualNorm[1] )); } else { @@ -243,7 +243,7 @@ real64 SinglePhaseFVM< BASE >::calculateResidualNorm( real64 const & GEOS_UNUSED solverBaseKernels::L2ResidualNormHelper::computeGlobalNorm( localResidualNorm[0], localResidualNormalizer[0], residualNorm ); } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::ResidualNorm, GEOS_FMT( " ( R{} ) = ( {:4.2e} )", FlowSolverBase::coupledSolverAttributePrefix(), residualNorm )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ( R{} ) = ( {:4.2e} )", FlowSolverBase::coupledSolverAttributePrefix(), residualNorm )); } return residualNorm; } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp index 4a54f7f3ab1..aacd30a8715 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp @@ -25,6 +25,7 @@ #include "physicsSolvers/fluidFlow/SinglePhaseBaseFields.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBaseKernels.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" +#include "physicsSolvers/fluidFlow/LogLevelsInfo.hpp" namespace geos { @@ -247,16 +248,17 @@ void SinglePhaseStatistics::computeRegionStatistics( real64 const time, GEOS_WARNING( GEOS_FMT( "{}, {}: Cannot compute average pressure & temperature because region pore volume is zero.", getName(), regionNames[i] ) ); } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Pressure (min, average, max): {}, {}, {} Pa", - getName(), regionNames[i], time, regionStatistics.minPressure, regionStatistics.averagePressure, regionStatistics.maxPressure ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Delta pressure (min, max): {}, {} Pa", - getName(), regionNames[i], time, regionStatistics.minDeltaPressure, regionStatistics.maxDeltaPressure ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Temperature (min, average, max): {}, {}, {} K", - getName(), regionNames[i], time, regionStatistics.minTemperature, regionStatistics.averageTemperature, regionStatistics.maxTemperature ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Total dynamic pore volume: {} rm^3", - getName(), regionNames[i], time, regionStatistics.totalPoreVolume ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Total fluid mass: {} kg", - getName(), regionNames[i], time, regionStatistics.totalMass ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Pressure (min, average, max): {}, {}, {} Pa", + getName(), regionNames[i], time, regionStatistics.minPressure, regionStatistics.averagePressure, regionStatistics.maxPressure ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Delta pressure (min, max): {}, {} Pa", + getName(), regionNames[i], time, regionStatistics.minDeltaPressure, regionStatistics.maxDeltaPressure ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Temperature (min, average, max): {}, {}, {} K", + getName(), regionNames[i], time, regionStatistics.minTemperature, regionStatistics.averageTemperature, + regionStatistics.maxTemperature ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Total dynamic pore volume: {} rm^3", + getName(), regionNames[i], time, regionStatistics.totalPoreVolume ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Total fluid mass: {} kg", + getName(), regionNames[i], time, regionStatistics.totalMass ) ); if( m_writeCSV > 0 && MpiWrapper::commRank() == 0 ) { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index 2ad8b918fd7..5015b9ba1eb 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -42,6 +42,7 @@ #include "physicsSolvers/fluidFlow/wells/SinglePhaseWellKernels.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #if defined( __INTEL_COMPILER ) #pragma GCC optimize "O0" @@ -1336,8 +1337,8 @@ CompositionalMultiphaseWell::checkSystemSolution( DomainPartition & domain, if( !subRegionData.localMinVal ) { - GEOS_LOG_LEVEL( 1, "Solution is invalid in well " << subRegion.getName() - << " (either a negative pressure or a negative component density was found)." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, "Solution is invalid in well " << subRegion.getName() + << " (either a negative pressure or a negative component density was found)." ); } localCheck = std::min( localCheck, subRegionData.localMinVal ); @@ -1665,21 +1666,21 @@ void CompositionalMultiphaseWell::assemblePressureRelations( real64 const & time if( wellControls.isProducer() ) { wellControls.switchToPhaseRateControl( wellControls.getTargetPhaseRate( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL( 1, "Control switch for well " << subRegion.getName() - << " from BHP constraint to phase volumetric rate constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() + << " from BHP constraint to phase volumetric rate constraint" ); } else { wellControls.switchToTotalRateControl( wellControls.getTargetTotalRate( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL( 1, "Control switch for well " << subRegion.getName() - << " from BHP constraint to total volumetric rate constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() + << " from BHP constraint to total volumetric rate constraint" ); } } else { wellControls.switchToBHPControl( wellControls.getTargetBHP( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL( 1, "Control switch for well " << subRegion.getName() - << " from rate constraint to BHP constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() + << " from rate constraint to BHP constraint" ); } } } ); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp new file mode 100644 index 00000000000..0367c784c36 --- /dev/null +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp @@ -0,0 +1,58 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains log level informations for wells + */ + +#ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP +#define GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct WellControl +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Well control information"; } +}; + +struct Crossflow +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Crossflow information"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP + diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp index 59c73f57eb9..81924241f7a 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp @@ -35,6 +35,7 @@ #include "physicsSolvers/fluidFlow/wells/SinglePhaseWellFields.hpp" #include "physicsSolvers/fluidFlow/wells/SinglePhaseWellKernels.hpp" #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" namespace geos { @@ -521,14 +522,14 @@ void SinglePhaseWell::assemblePressureRelations( real64 const & time_n, if( wellControls.getControl() == WellControls::Control::BHP ) { wellControls.switchToTotalRateControl( wellControls.getTargetTotalRate( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL( 1, "Control switch for well " << subRegion.getName() - << " from BHP constraint to rate constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() + << " from BHP constraint to rate constraint" ); } else { wellControls.switchToBHPControl( wellControls.getTargetBHP( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL( 1, "Control switch for well " << subRegion.getName() - << " from rate constraint to BHP constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() + << " from rate constraint to BHP constraint" ); } } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp index a71969ca029..42182377bfd 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp @@ -21,6 +21,8 @@ #include "WellConstants.hpp" #include "dataRepository/InputFlags.hpp" #include "functions/FunctionManager.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" + namespace geos { @@ -340,8 +342,8 @@ void WellControls::postInputInitialization() else if( m_targetBHP <= 0.0 && m_targetBHPTableName.empty() ) { m_targetBHP = isProducer() ? WellConstants::defaultProducerBHP : WellConstants::defaultInjectorBHP; - GEOS_LOG_LEVEL_RANK_0( 1, "WellControls " << getDataContext() << ": Setting " << viewKeyStruct::targetBHPString() << " to default value " - << m_targetBHP << "." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "WellControls " << getDataContext() << ": Setting " << viewKeyStruct::targetBHPString() << " to default value " + << m_targetBHP << "." ); } // 6.2) Check incoherent information diff --git a/src/coreComponents/physicsSolvers/multiphysics/CMakeLists.txt b/src/coreComponents/physicsSolvers/multiphysics/CMakeLists.txt index 60408e700ec..89a34cbc276 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/multiphysics/CMakeLists.txt @@ -13,6 +13,7 @@ set( physicsSolvers_headers multiphysics/PoromechanicsInitialization.hpp multiphysics/PoromechanicsFields.hpp multiphysics/PoromechanicsInitialization.hpp + multiphysics/LogLevelsInfo.hpp multiphysics/poromechanicsKernels/MultiphasePoromechanics.hpp multiphysics/poromechanicsKernels/MultiphasePoromechanics_impl.hpp multiphysics/poromechanicsKernels/PoromechanicsBase.hpp diff --git a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp index 07ec6a1638e..5853f513231 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.cpp @@ -31,6 +31,7 @@ #include "physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellFields.hpp" #include "physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWellKernels.hpp" #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "physicsSolvers/multiphysics/MultiphasePoromechanics.hpp" namespace geos @@ -45,7 +46,7 @@ CompositionalMultiphaseReservoirAndWells( const string & name, Group * const parent ) : Base( name, parent ) { - Base::template addLogLevel< logInfo::CrossflowWarning >(); + Base::template addLogLevel< logInfo::Crossflow >(); } template< typename RESERVOIR_SOLVER > @@ -94,7 +95,7 @@ setMGRStrategy() // flow solver here is indeed flow solver, not poromechanics solver if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseHybridFVM ) { - GEOS_LOG_RANK_0( "The poromechanics MGR strategy for hybrid FVM is not implemented" ); + GEOS_ERROR( "The poromechanics MGR strategy for hybrid FVM is not implemented" ); } else { @@ -415,10 +416,10 @@ assembleCouplingTerms( real64 const time_n, globalIndex const totalNumCrossflowPerforations = MpiWrapper::sum( numCrossflowPerforations.get() ); if( totalNumCrossflowPerforations > 0 ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::CrossflowWarning, GEOS_FMT( "CompositionalMultiphaseReservoir '{}': Warning! Crossflow detected at {} perforations in well {}" - "To disable crossflow for injectors, you can use the field '{}' in the WellControls '{}' section", - this->getName(), totalNumCrossflowPerforations, subRegion.getName(), - WellControls::viewKeyStruct::enableCrossflowString(), wellControls.getName() )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Crossflow, GEOS_FMT( "CompositionalMultiphaseReservoir '{}': Warning! Crossflow detected at {} perforations in well {}" + "To disable crossflow for injectors, you can use the field '{}' in the WellControls '{}' section", + this->getName(), totalNumCrossflowPerforations, subRegion.getName(), + WellControls::viewKeyStruct::enableCrossflowString(), wellControls.getName() )); } } } ); diff --git a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp index 93a5d49c243..bbbf109e1f6 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp @@ -22,6 +22,7 @@ #define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_COUPLEDSOLVER_HPP_ #include "physicsSolvers/SolverBase.hpp" +#include "physicsSolvers/multiphysics/LogLevelsInfo.hpp" #include @@ -88,7 +89,7 @@ class CoupledSolver : public SolverBase getDataContext(), solverName, solverType ), InputError ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}: found {} solver named {}", getName(), solver->getCatalogName(), solverName ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Coupling, GEOS_FMT( "{}: found {} solver named {}", getName(), solver->getCatalogName(), solverName ) ); } ); } @@ -479,7 +480,7 @@ class CoupledSolver : public SolverBase // Solve the subproblems nonlinearly forEachArgInTuple( m_solvers, [&]( auto & solver, auto idx ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " Iteration {:2}: {}", iter + 1, solver->getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, GEOS_FMT( " Iteration {:2}: {}", iter + 1, solver->getName() ) ); real64 solverDt = solver->nonlinearImplicitStep( time_n, stepDt, cycleNumber, @@ -530,7 +531,7 @@ class CoupledSolver : public SolverBase { // cut timestep, go back to beginning of step and restart the Newton loop stepDt *= dtCutFactor; - GEOS_LOG_LEVEL_RANK_0 ( 1, GEOS_FMT( "New dt = {}", stepDt ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "New dt = {}", stepDt ) ); // notify the solver statistics counter that this is a time step cut m_solverStatistics.logTimeStepCut(); @@ -582,11 +583,11 @@ class CoupledSolver : public SolverBase if( params.m_subcyclingOption == 0 ) { - GEOS_LOG_LEVEL_RANK_0( 1, "***** Single Pass solver, no subcycling *****" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, "***** Single Pass solver, no subcycling *****" ); } else { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " Iteration {:2}: outer-loop convergence check", iter + 1 ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " Iteration {:2}: outer-loop convergence check", iter + 1 ) ); if( params.sequentialConvergenceCriterion() == NonlinearSolverParameters::SequentialConvergenceCriterion::ResidualNorm ) { @@ -627,7 +628,7 @@ class CoupledSolver : public SolverBase // finally, we perform the convergence check on the multiphysics residual residualNorm = sqrt( residualNorm ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ( R ) = ( {:4.2e} )", residualNorm ) ); isConverged = ( residualNorm < params.m_newtonTol ); } @@ -654,7 +655,7 @@ class CoupledSolver : public SolverBase if( isConverged ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "***** The iterative coupling has converged in {} iteration(s) *****", iter + 1 ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( "***** The iterative coupling has converged in {} iteration(s) *****", iter + 1 ) ); } } return isConverged; diff --git a/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp index 6102c209659..b0b07f0c2b0 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/FlowProppantTransportSolver.cpp @@ -102,7 +102,7 @@ real64 FlowProppantTransportSolver::sequentiallyCoupledSolverStep( real64 const resetStateToBeginningOfStep( domain ); } - GEOS_LOG_LEVEL_RANK_0( 1, " Iteration: " << iter+1 << ", FlowSolver: " ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, GEOS_FMT( " Iteration: {}, FlowSolver: ", iter+1 ) ); dtReturnTemporary = flowSolver()->nonlinearImplicitStep( time_n, dtReturn, cycleNumber, domain ); @@ -117,11 +117,11 @@ real64 FlowProppantTransportSolver::sequentiallyCoupledSolverStep( real64 const if( fluidNonLinearParams.m_numNewtonIterations <= this->m_nonlinearSolverParameters.m_minIterNewton && iter > 0 ) { m_solverStatistics.logNonlinearIteration(); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "***** The iterative coupling has converged in {} iterations *****", iter ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( "***** The iterative coupling has converged in {} iterations *****", iter ) ); break; } - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( " Iteration: {}, Proppant Solver: ", iter+1 ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, GEOS_FMT( " Iteration: {}, Proppant Solver: ", iter+1 ) ); dtReturnTemporary = proppantTransportSolver()->nonlinearImplicitStep( time_n, dtReturn, cycleNumber, domain ); diff --git a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp index db458d9d44a..dfb47daebbe 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/HydrofractureSolver.cpp @@ -26,6 +26,7 @@ #include "physicsSolvers/multiphysics/SinglePhasePoromechanics.hpp" #include "physicsSolvers/multiphysics/MultiphasePoromechanics.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" +#include "physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp" #include "dataRepository/LogLevelsInfo.hpp" #include "mesh/MeshFields.hpp" #include "constitutive/fluid/singlefluid/SingleFluidFields.hpp" @@ -71,8 +72,7 @@ HydrofractureSolver< POROMECHANICS_SOLVER >::HydrofractureSolver( const string & setApplyDefaultValue( 0 ). setInputFlag( InputFlags::OPTIONAL ); - Base::template addLogLevel< logInfo::HydraulicAperture >(); - Base::template addLogLevel< logInfo::SolverNextDt >(); + Base::template addLogLevel< logInfo::SurfaceGenerator >(); registerWrapper( viewKeyStruct::isLaggingFractureStencilWeightsUpdateString(), &m_isLaggingFractureStencilWeightsUpdate ). setApplyDefaultValue( 0 ). @@ -366,12 +366,12 @@ void HydrofractureSolver< POROMECHANICS_SOLVER >::updateHydraulicApertureAndFrac minHydraulicAperture = MpiWrapper::min( minHydraulicAperture ); maxHydraulicAperture = MpiWrapper::max( maxHydraulicAperture ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::HydraulicAperture, GEOS_FMT( " {}: Max aperture change: {} m, max hydraulic aperture change: {} m", - this->getName(), fmt::format( "{:.{}f}", maxApertureChange, 6 ), fmt::format( "{:.{}f}", maxHydraulicApertureChange, 6 ) ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::HydraulicAperture, GEOS_FMT( " {}: Min aperture: {} m, max aperture: {} m", - this->getName(), fmt::format( "{:.{}f}", minAperture, 6 ), fmt::format( "{:.{}f}", maxAperture, 6 ) ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::HydraulicAperture, GEOS_FMT( " {}: Min hydraulic aperture: {} m, max hydraulic aperture: {} m", - this->getName(), fmt::format( "{:.{}f}", minHydraulicAperture, 6 ), fmt::format( "{:.{}f}", maxHydraulicAperture, 6 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max aperture change: {} m, max hydraulic aperture change: {} m", + this->getName(), fmt::format( "{:.{}f}", maxApertureChange, 6 ), fmt::format( "{:.{}f}", maxHydraulicApertureChange, 6 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min aperture: {} m, max aperture: {} m", + this->getName(), fmt::format( "{:.{}f}", minAperture, 6 ), fmt::format( "{:.{}f}", maxAperture, 6 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Min hydraulic aperture: {} m, max hydraulic aperture: {} m", + this->getName(), fmt::format( "{:.{}f}", minHydraulicAperture, 6 ), fmt::format( "{:.{}f}", maxHydraulicAperture, 6 ) ) ); } template< typename POROMECHANICS_SOLVER > void HydrofractureSolver< POROMECHANICS_SOLVER >::setupCoupling( DomainPartition const & domain, @@ -920,7 +920,6 @@ real64 HydrofractureSolver< POROMECHANICS_SOLVER >::setNextDt( real64 const & cu { nextDt = m_surfaceGenerator->getTimestepRequest() < 1e99 ? m_surfaceGenerator->getTimestepRequest() : currentDt; } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverNextDt, this->getName() << ": nextDt request is " << nextDt ); return nextDt; } @@ -1113,7 +1112,7 @@ void HydrofractureSolver< POROMECHANICS_SOLVER >::initializeNewFractureFields( D aperture[newElemIndex] = 0; } } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::HydraulicAperture, + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, GEOS_FMT( "New elem index = {:4d} , init aper = {:4.2e}, init press = {:4.2e} ", newElemIndex, aperture[newElemIndex], fluidPressure[newElemIndex] ) ); } ); diff --git a/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp new file mode 100644 index 00000000000..0db31d35645 --- /dev/null +++ b/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp @@ -0,0 +1,52 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains log level informations for coupled multiphysics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP +#define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct Coupling +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Coupling information"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP + diff --git a/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp b/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp index bd7ba1e5fbb..1f4f06d0db3 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.cpp @@ -46,8 +46,6 @@ MultiphasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >::MultiphasePoromechanic Group * const parent ) : Base( name, parent ) { - Base::template addLogLevel< logInfo::PoromechanicsPhaseFraction >(); - LinearSolverParameters & linearSolverParameters = this->m_linearSolverParameters.get(); linearSolverParameters.mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanics; linearSolverParameters.mgr.separateComponents = true; @@ -247,7 +245,7 @@ void MultiphasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >::updateState( Doma maxDeltaPhaseVolFrac = MpiWrapper::max( maxDeltaPhaseVolFrac ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::PoromechanicsPhaseFraction, + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max phase volume fraction change = {}", this->getName(), GEOS_FMT( "{:.{}f}", maxDeltaPhaseVolFrac, 4 ) ) ); } diff --git a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp index e86c9553544..23d08b298dd 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp @@ -19,17 +19,18 @@ #include "PoromechanicsInitialization.hpp" +#include "events/tasks/TasksManager.hpp" #include "physicsSolvers/PhysicsSolverManager.hpp" +#include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" +#include "physicsSolvers/solidMechanics/SolidMechanicsStatistics.hpp" #include "physicsSolvers/multiphysics/MultiphasePoromechanics.hpp" #include "physicsSolvers/multiphysics/SinglePhasePoromechanics.hpp" #include "physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.hpp" #include "physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.hpp" #include "physicsSolvers/multiphysics/HydrofractureSolver.hpp" -#include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" #include "physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.hpp" #include "physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.hpp" -#include "physicsSolvers/solidMechanics/SolidMechanicsStatistics.hpp" -#include "events/tasks/TasksManager.hpp" +#include "physicsSolvers/multiphysics/LogLevelsInfo.hpp" namespace geos { @@ -107,16 +108,16 @@ execute( real64 const time_n, real64 const eventProgress, DomainPartition & domain ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is set to perform stress initialization during the next time step(s)", - getName(), time_n, m_poromechanicsSolverName ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is set to perform stress initialization during the next time step(s)", + getName(), time_n, m_poromechanicsSolverName ) ); m_poromechanicsSolver->setStressInitialization( true ); m_solidMechanicsStateResetTask.execute( time_n, dt, cycleNumber, eventCounter, eventProgress, domain ); m_poromechanicsSolver->execute( time_n, dt, cycleNumber, eventCounter, eventProgress, domain ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` has completed stress initialization", - getName(), time_n + dt, m_poromechanicsSolverName ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` has completed stress initialization", + getName(), time_n + dt, m_poromechanicsSolverName ) ); m_poromechanicsSolver->setStressInitialization( false ); if( m_solidMechanicsStatistics != nullptr ) diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp index 68b5f51f45a..5991b0fb3b1 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp @@ -44,8 +44,6 @@ SinglePhasePoromechanicsConformingFractures< FLOW_SOLVER >::SinglePhasePoromecha Group * const parent ) : Base( name, parent ) { - Base::template addLogLevel< logInfo::Dof >(); - LinearSolverParameters & params = this->m_linearSolverParameters.get(); params.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsConformingFractures; params.mgr.separateComponents = false; @@ -84,10 +82,6 @@ void SinglePhasePoromechanicsConformingFractures< FLOW_SOLVER >::setupSystem( Do this->setupDofs( domain, dofManager ); dofManager.reorderByRank(); - std::ostringstream oss; - dofManager.printFieldInfo( oss ); - GEOS_LOG_LEVEL_INFO( logInfo::SolverNextDt, oss.str()) - /// 2. Add coupling terms not added by the DofManager. localIndex const numLocalRows = dofManager.numLocalDofs(); diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp index 8df7ee28d80..5229e741fa8 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp @@ -21,6 +21,7 @@ #include "physicsSolvers/PhysicsSolverManager.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" +#include "physicsSolvers/LogLevelsInfo.hpp" #include "mesh/DomainPartition.hpp" namespace geos @@ -83,8 +84,8 @@ bool SolidMechanicsStateReset::execute( real64 const time_n, // Option 1: zero out velocity, incremental displacement, and displacement if( m_resetDisplacements ) { - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is resetting total displacement and velocity to zero", - getName(), time_n, m_solidSolverName ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is resetting total displacement and velocity to zero", + getName(), time_n, m_solidSolverName ) ); NodeManager & nodeManager = mesh.getNodeManager(); @@ -105,10 +106,10 @@ bool SolidMechanicsStateReset::execute( real64 const time_n, string const & solidMaterialName = subRegion.getReference< string >( SolidMechanicsLagrangianFEM::viewKeyStruct::solidMaterialNamesString() ); Group & constitutiveModels = subRegion.getGroup( ElementSubRegionBase::groupKeyStruct::constitutiveModelsString() ); - GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "Task `{}`: at time {}s, solid model `{}` is setting inelastic behavior to `{}` on subRegion `{}`. ", - getName(), time_n, solidMaterialName, - m_disableInelasticity ? "OFF" : "ON", - subRegion.getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, solid model `{}` is setting inelastic behavior to `{}` on subRegion `{}`. ", + getName(), time_n, solidMaterialName, + m_disableInelasticity ? "OFF" : "ON", + subRegion.getName() ) ); SolidBase & constitutiveRelation = constitutiveModels.getGroup< SolidBase >( solidMaterialName ); constitutiveRelation.disableInelasticity( m_disableInelasticity ); diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStatistics.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStatistics.cpp index 578c9c82ee6..a7e366c1b6c 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStatistics.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStatistics.cpp @@ -152,12 +152,12 @@ void SolidMechanicsStatistics::computeNodeStatistics( MeshLevel & mesh, real64 c MpiWrapper::getMpiOp( MpiWrapper::Reduction::Min ), MPI_COMM_GEOS ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{} (time {} s): Min displacement (X, Y, Z): {}, {}, {} m", - getName(), time, nodeStatistics.minDisplacement[0], - nodeStatistics.minDisplacement[1], nodeStatistics.minDisplacement[2] ) ); - GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{} (time {} s): Max displacement (X, Y, Z): {}, {}, {} m", - getName(), time, nodeStatistics.maxDisplacement[0], - nodeStatistics.maxDisplacement[1], nodeStatistics.maxDisplacement[2] ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{} (time {} s): Min displacement (X, Y, Z): {}, {}, {} m", + getName(), time, nodeStatistics.minDisplacement[0], + nodeStatistics.minDisplacement[1], nodeStatistics.minDisplacement[2] ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{} (time {} s): Max displacement (X, Y, Z): {}, {}, {} m", + getName(), time, nodeStatistics.maxDisplacement[0], + nodeStatistics.maxDisplacement[1], nodeStatistics.maxDisplacement[2] ) ); if( m_writeCSV > 0 && MpiWrapper::commRank() == 0 ) { diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt b/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt index ede9eacf734..9bcfd8fdc9b 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/CMakeLists.txt @@ -6,6 +6,7 @@ set( physicsSolvers_headers surfaceGeneration/ParallelTopologyChange.hpp surfaceGeneration/SurfaceGenerator.hpp surfaceGeneration/SurfaceGeneratorFields.hpp + surfaceGeneration/LogLevelsInfo.hpp surfaceGeneration/kernels/surfaceGenerationKernels.hpp surfaceGeneration/kernels/surfaceGenerationKernelsHelpers.hpp PARENT_SCOPE ) diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp index 0bc16f129e0..7b13c4618d5 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/EmbeddedSurfaceGenerator.cpp @@ -36,7 +36,7 @@ #include "mesh/simpleGeometricObjects/GeometricObjectManager.hpp" #include "mesh/simpleGeometricObjects/Rectangle.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" - +#include "physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp" namespace geos @@ -191,7 +191,7 @@ void EmbeddedSurfaceGenerator::initializePostSubGroups() if( added ) { - GEOS_LOG_LEVEL_RANK_0( 2, "Element " << cellIndex << " is fractured" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, "Element " << cellIndex << " is fractured" ); // Add the information to the CellElementSubRegion subRegion.addFracturedElement( cellIndex, localNumberOfSurfaceElems ); @@ -353,7 +353,7 @@ void EmbeddedSurfaceGenerator::setGlobalIndices( ElementRegionManager & elemMana totalNumberOfSurfaceElements += numberOfSurfaceElemsPerRank[rank]; } - GEOS_LOG_LEVEL_RANK_0( 1, "Number of embedded surface elements: " << totalNumberOfSurfaceElements ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, "Number of embedded surface elements: " << totalNumberOfSurfaceElements ); arrayView1d< globalIndex > const & elemLocalToGlobal = embeddedSurfaceSubRegion.localToGlobalMap(); diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp new file mode 100644 index 00000000000..0d5f4d479f8 --- /dev/null +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp @@ -0,0 +1,58 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains log level informations for surface generators + */ + +#ifndef GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP +#define GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct SurfaceGenerator +{ + static constexpr int getMinLogLevel() { return 1; } + static constexpr std::string_view getDescription() { return "Fracture generation information"; } +}; + +struct Mapping +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "Mapping information"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP + diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp index 86848694ce6..e2265df7d54 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp @@ -32,6 +32,7 @@ #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/solidMechanics/kernels/SolidMechanicsLagrangianFEMKernels.hpp" #include "physicsSolvers/surfaceGeneration/SurfaceGeneratorFields.hpp" +#include "physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "kernels/surfaceGenerationKernels.hpp" @@ -745,7 +746,7 @@ int SurfaceGenerator::separationDriver( DomainPartition & domain, real64 ruptureRate = calculateRuptureRate( elementManager.getRegion< SurfaceElementRegion >( this->m_fractureRegionName ) ); - GEOS_LOG_LEVEL_RANK_0( 3, "rupture rate is " << ruptureRate ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, "rupture rate is " << ruptureRate ); if( ruptureRate > 0 ) m_nextDt = ruptureRate < 1e99 ? m_cflFactor / ruptureRate : 1e99; @@ -1724,14 +1725,13 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, // Split the node into two, using the original index, and a new one. localIndex newNodeIndex; - if( getLogLevel() > 0 ) { std::ostringstream s; for( std::set< localIndex >::const_iterator i=separationPathFaces.begin(); i!=separationPathFaces.end(); ++i ) { s << *i << " "; } - GEOS_LOG_RANK( GEOS_FMT( "Splitting node {} along separation plane faces: {}", nodeID, s.str() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, GEOS_FMT( "Splitting node {} along separation plane faces: {}", nodeID, s.str() ) ); } @@ -1770,11 +1770,7 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, // >("usedFaces")[newNodeIndex]; // usedFacesNew = usedFaces[nodeID]; - - if( getLogLevel() > 0 ) - { - GEOS_LOG_RANK( GEOS_FMT( "Done splitting node {} into nodes {} and {}", nodeID, nodeID, newNodeIndex ) ); - } + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, GEOS_FMT( "Done splitting node {} into nodes {} and {}", nodeID, nodeID, newNodeIndex ) ); // split edges map< localIndex, localIndex > splitEdges; @@ -1795,10 +1791,7 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, edgeToFaceMap.clearSet( newEdgeIndex ); - if( getLogLevel() > 0 ) - { - GEOS_LOG_RANK( GEOS_FMT ( "Split edge {} into edges {} and {}", parentEdgeIndex, parentEdgeIndex, newEdgeIndex ) ); - } + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, GEOS_FMT ( "Split edge {} into edges {} and {}", parentEdgeIndex, parentEdgeIndex, newEdgeIndex ) ); splitEdges[parentEdgeIndex] = newEdgeIndex; modifiedObjects.newEdges.insert( newEdgeIndex ); @@ -1854,11 +1847,7 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, if( faceManager.splitObject( faceIndex, rank, newFaceIndex ) ) { - - if( getLogLevel() > 0 ) - { - GEOS_LOG_RANK( GEOS_FMT ( "Split face {} into faces {} and {}", faceIndex, faceIndex, newFaceIndex ) ); - } + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, GEOS_FMT ( "Split face {} into faces {} and {}", faceIndex, faceIndex, newFaceIndex ) ); splitFaces[faceIndex] = newFaceIndex; modifiedObjects.newFaces.insert( newFaceIndex ); @@ -2125,23 +2114,19 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, faceToElementMap[faceIndex][1] = -1; } - if( getLogLevel() > 1 ) - { - GEOS_LOG( " faceToRegionMap["< Date: Tue, 1 Oct 2024 18:09:06 -0500 Subject: [PATCH 02/10] rename --- src/coreComponents/physicsSolvers/LogLevelsInfo.hpp | 2 +- src/coreComponents/physicsSolvers/SolverBase.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index bed386d9e6d..a47c2e2caa9 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -77,7 +77,7 @@ struct NonlinearSolver static constexpr std::string_view getDescription() { return "Nonlinear solver information"; } }; -struct SolverTimers +struct Timers { static constexpr int getMinLogLevel() { return 1; } static constexpr std::string_view getDescription() { return "Solver timers information"; } diff --git a/src/coreComponents/physicsSolvers/SolverBase.cpp b/src/coreComponents/physicsSolvers/SolverBase.cpp index 4e4fd3772a5..c0d8624422e 100644 --- a/src/coreComponents/physicsSolvers/SolverBase.cpp +++ b/src/coreComponents/physicsSolvers/SolverBase.cpp @@ -103,7 +103,7 @@ SolverBase::SolverBase( string const & name, addLogLevel< logInfo::TimeStep >(); addLogLevel< logInfo::LinearSolver >(); addLogLevel< logInfo::NonlinearSolver >(); - addLogLevel< logInfo::SolverTimers >(); + addLogLevel< logInfo::Timers >(); registerGroup( groupKeyStruct::linearSolverParametersString(), &m_linearSolverParameters ); registerGroup( groupKeyStruct::nonlinearSolverParametersString(), &m_nonlinearSolverParameters ); @@ -1389,7 +1389,7 @@ void SolverBase::cleanup( real64 const GEOS_UNUSED_PARAM( time_n ), real64 const maxTime = MpiWrapper::max( time ); if( maxTime > 0 ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolverTimers, GEOS_FMT( "{}: {} time = {} s (min), {} s (max)", getName(), timer.first, minTime, maxTime ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Timers, GEOS_FMT( "{}: {} time = {} s (min), {} s (max)", getName(), timer.first, minTime, maxTime ) ); } } From 65f9ea71dee35f6a23c6c2b237432003730a54d3 Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 2 Oct 2024 10:08:41 +0200 Subject: [PATCH 03/10] remove unecessary loglevel --- src/coreComponents/physicsSolvers/SolverBase.cpp | 5 ++--- src/coreComponents/physicsSolvers/SolverBase.hpp | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/coreComponents/physicsSolvers/SolverBase.cpp b/src/coreComponents/physicsSolvers/SolverBase.cpp index c0d8624422e..b06c7a26031 100644 --- a/src/coreComponents/physicsSolvers/SolverBase.cpp +++ b/src/coreComponents/physicsSolvers/SolverBase.cpp @@ -740,8 +740,7 @@ bool SolverBase::lineSearchWithParabolicInterpolation( real64 const & time_n, real64 SolverBase::eisenstatWalker( real64 const newNewtonNorm, real64 const oldNewtonNorm, - LinearSolverParameters::Krylov const & krylovParams, - integer const logLevel ) + LinearSolverParameters::Krylov const & krylovParams ) { real64 normRatio = std::min( newNewtonNorm / oldNewtonNorm, 1.0 ); real64 newKrylovTol = krylovParams.adaptiveGamma * std::pow( normRatio, krylovParams.adaptiveExponent ); @@ -1025,7 +1024,7 @@ bool SolverBase::solveNonlinearSystem( real64 const & time_n, LinearSolverParameters::Krylov & krylovParams = m_linearSolverParameters.get().krylov; if( krylovParams.useAdaptiveTol ) { - krylovParams.relTolerance = newtonIter > 0 ? eisenstatWalker( residualNorm, lastResidual, krylovParams, m_linearSolverParameters.getLogLevel() ) : krylovParams.weakestTol; + krylovParams.relTolerance = newtonIter > 0 ? eisenstatWalker( residualNorm, lastResidual, krylovParams ) : krylovParams.weakestTol; } // TODO: Trilinos currently requires this, re-evaluate after moving to Tpetra-based solvers diff --git a/src/coreComponents/physicsSolvers/SolverBase.hpp b/src/coreComponents/physicsSolvers/SolverBase.hpp index 923321e2002..265b1298bfa 100644 --- a/src/coreComponents/physicsSolvers/SolverBase.hpp +++ b/src/coreComponents/physicsSolvers/SolverBase.hpp @@ -941,8 +941,7 @@ class SolverBase : public ExecutableGroup */ real64 eisenstatWalker( real64 const newNewtonNorm, real64 const oldNewtonNorm, - LinearSolverParameters::Krylov const & krylovParams, - integer const logLevel ); + LinearSolverParameters::Krylov const & krylovParams ); /** * @brief Get the Constitutive Name object From 21937f376d20869dd569dc0c0cc7711d9c00fca8 Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 2 Oct 2024 11:37:09 +0200 Subject: [PATCH 04/10] added/updated logLevel --- .../physicsSolvers/LogLevelsInfo.hpp | 2 +- .../physicsSolvers/contact/LogLevelsInfo.hpp | 2 +- .../multiphysics/LogLevelsInfo.hpp | 7 ++- ...ePhasePoromechanicsConformingFractures.cpp | 6 +++ .../solidMechanics/CMakeLists.txt | 1 + .../solidMechanics/LogLevelsInfo.hpp | 51 +++++++++++++++++++ .../SolidMechanicsStateReset.cpp | 12 +++-- .../surfaceGeneration/LogLevelsInfo.hpp | 6 +++ .../surfaceGeneration/SurfaceGenerator.cpp | 12 +++-- 9 files changed, 87 insertions(+), 12 deletions(-) create mode 100644 src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index a47c2e2caa9..68960dd9dc5 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -50,7 +50,7 @@ struct LineSearch struct Solution { static constexpr int getMinLogLevel() { return 1; } - static constexpr std::string_view getDescription() { return "Solutiuon information (scaling, maximum changes, quality check)"; } + static constexpr std::string_view getDescription() { return "Solution information (scaling, maximum changes, quality check)"; } }; struct Convergence diff --git a/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp index 3d20705acc2..11d097d9a07 100644 --- a/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp @@ -37,7 +37,7 @@ namespace logInfo struct Configuration { - static constexpr int getMinLogLevel() { return 1; } + static constexpr int getMinLogLevel() { return 2; } static constexpr std::string_view getDescription() { return "Configuration information"; } }; diff --git a/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp index 0db31d35645..6ea8a4412c7 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp @@ -41,6 +41,12 @@ struct Coupling static constexpr std::string_view getDescription() { return "Coupling information"; } }; +struct Dof +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Dof information"; } +}; + /// @endcond ///@} @@ -49,4 +55,3 @@ struct Coupling } #endif // GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP - diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp index 5991b0fb3b1..920f4b4b7b1 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp @@ -44,6 +44,8 @@ SinglePhasePoromechanicsConformingFractures< FLOW_SOLVER >::SinglePhasePoromecha Group * const parent ) : Base( name, parent ) { + Base::template addLogLevel< logInfo::Dof >(); + LinearSolverParameters & params = this->m_linearSolverParameters.get(); params.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsConformingFractures; params.mgr.separateComponents = false; @@ -82,6 +84,10 @@ void SinglePhasePoromechanicsConformingFractures< FLOW_SOLVER >::setupSystem( Do this->setupDofs( domain, dofManager ); dofManager.reorderByRank(); + std::ostringstream oss; + dofManager.printFieldInfo( oss ); + GEOS_LOG_LEVEL_INFO( logInfo::Dof, oss.str()) + /// 2. Add coupling terms not added by the DofManager. localIndex const numLocalRows = dofManager.numLocalDofs(); diff --git a/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt b/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt index ba9d4709fb5..83bd80ae358 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt @@ -1,6 +1,7 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} + solidMechanics/LogLevelsInfo.hpp solidMechanics/SolidMechanicsFields.hpp solidMechanics/SolidMechanicsLagrangianFEM.hpp solidMechanics/SolidMechanicsLagrangianFEM.hpp diff --git a/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp new file mode 100644 index 00000000000..db77eda1e5c --- /dev/null +++ b/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp @@ -0,0 +1,51 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogLevelsInfo.hpp + * This file contains log level informations for coupled multiphysics solvers + */ + +#ifndef GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP +#define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP + +#include "common/DataTypes.hpp" + +namespace geos +{ + +namespace logInfo +{ + +/** + * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. + */ +///@{ + +/// @cond DO_NOT_DOCUMENT + +struct SolidMechanicsInitialization +{ + static constexpr int getMinLogLevel() { return 2; } + static constexpr std::string_view getDescription() { return "SolidMechanics Initialization information"; } +}; + +/// @endcond +///@} + +} + +} + +#endif // GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp index 5229e741fa8..83cb923879e 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp @@ -22,6 +22,7 @@ #include "physicsSolvers/PhysicsSolverManager.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/LogLevelsInfo.hpp" +#include "physicsSolvers/solidMechanics/LogLevelsInfo.hpp" #include "mesh/DomainPartition.hpp" namespace geos @@ -52,6 +53,9 @@ SolidMechanicsStateReset::SolidMechanicsStateReset( const string & name, setApplyDefaultValue( false ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Flag to enable/disable inelastic behavior" ); + + addLogLevel< logInfo::SolidMechanicsInitialization >(); + } SolidMechanicsStateReset::~SolidMechanicsStateReset() @@ -106,10 +110,10 @@ bool SolidMechanicsStateReset::execute( real64 const time_n, string const & solidMaterialName = subRegion.getReference< string >( SolidMechanicsLagrangianFEM::viewKeyStruct::solidMaterialNamesString() ); Group & constitutiveModels = subRegion.getGroup( ElementSubRegionBase::groupKeyStruct::constitutiveModelsString() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, solid model `{}` is setting inelastic behavior to `{}` on subRegion `{}`. ", - getName(), time_n, solidMaterialName, - m_disableInelasticity ? "OFF" : "ON", - subRegion.getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolidMechanicsInitialization, GEOS_FMT( "Task `{}`: at time {}s, solid model `{}` is setting inelastic behavior to `{}` on subRegion `{}`. ", + getName(), time_n, solidMaterialName, + m_disableInelasticity ? "OFF" : "ON", + subRegion.getName() ) ); SolidBase & constitutiveRelation = constitutiveModels.getGroup< SolidBase >( solidMaterialName ); constitutiveRelation.disableInelasticity( m_disableInelasticity ); diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp index 0d5f4d479f8..d07515b3253 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp @@ -41,6 +41,12 @@ struct SurfaceGenerator static constexpr std::string_view getDescription() { return "Fracture generation information"; } }; +struct RuptureRate +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Rupture rate information"; } +}; + struct Mapping { static constexpr int getMinLogLevel() { return 2; } diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp index e2265df7d54..9016add5be8 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp @@ -221,6 +221,8 @@ SurfaceGenerator::SurfaceGenerator( const string & name, this->getWrapper< string >( viewKeyStruct::discretizationString() ). setInputFlag( InputFlags::FALSE ); + + addLogLevel< logInfo::RuptureRate >(); } void SurfaceGenerator::postInputInitialization() @@ -746,7 +748,7 @@ int SurfaceGenerator::separationDriver( DomainPartition & domain, real64 ruptureRate = calculateRuptureRate( elementManager.getRegion< SurfaceElementRegion >( this->m_fractureRegionName ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, "rupture rate is " << ruptureRate ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::RuptureRate, "rupture rate is " << ruptureRate ); if( ruptureRate > 0 ) m_nextDt = ruptureRate < 1e99 ? m_cflFactor / ruptureRate : 1e99; @@ -1731,7 +1733,7 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, { s << *i << " "; } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, GEOS_FMT( "Splitting node {} along separation plane faces: {}", nodeID, s.str() ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, GEOS_FMT( "Splitting node {} along separation plane faces: {}", nodeID, s.str() ) ); } @@ -1770,7 +1772,7 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, // >("usedFaces")[newNodeIndex]; // usedFacesNew = usedFaces[nodeID]; - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, GEOS_FMT( "Done splitting node {} into nodes {} and {}", nodeID, nodeID, newNodeIndex ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, GEOS_FMT( "Done splitting node {} into nodes {} and {}", nodeID, nodeID, newNodeIndex ) ); // split edges map< localIndex, localIndex > splitEdges; @@ -1791,7 +1793,7 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, edgeToFaceMap.clearSet( newEdgeIndex ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, GEOS_FMT ( "Split edge {} into edges {} and {}", parentEdgeIndex, parentEdgeIndex, newEdgeIndex ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, GEOS_FMT ( "Split edge {} into edges {} and {}", parentEdgeIndex, parentEdgeIndex, newEdgeIndex ) ); splitEdges[parentEdgeIndex] = newEdgeIndex; modifiedObjects.newEdges.insert( newEdgeIndex ); @@ -1847,7 +1849,7 @@ void SurfaceGenerator::performFracture( const localIndex nodeID, if( faceManager.splitObject( faceIndex, rank, newFaceIndex ) ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SurfaceGenerator, GEOS_FMT ( "Split face {} into faces {} and {}", faceIndex, faceIndex, newFaceIndex ) ); + GEOS_LOG_LEVEL_INFO_BY_RANK( logInfo::SurfaceGenerator, GEOS_FMT ( "Split face {} into faces {} and {}", faceIndex, faceIndex, newFaceIndex ) ); splitFaces[faceIndex] = newFaceIndex; modifiedObjects.newFaces.insert( newFaceIndex ); From 94c6ffd895f36c2fd4d3547138c234491bcb8d05 Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 2 Oct 2024 11:37:23 +0200 Subject: [PATCH 05/10] xsd --- src/coreComponents/schema/schema.xsd | 844 ++++++++++++--------------- 1 file changed, 386 insertions(+), 458 deletions(-) diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 10a986ab359..e5f84d17d1b 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -1770,6 +1770,10 @@ stress - traction is applied to the faces as specified by the inner product of i + + + + @@ -1822,6 +1826,8 @@ stress - traction is applied to the faces as specified by the inner product of i + + +* Require - Use line search. If smaller residual than starting resdual is not achieved, cut time-step.--> @@ -1922,10 +1928,12 @@ the relative residual norm satisfies: - + + + @@ -1941,15 +1949,15 @@ the relative residual norm satisfies: - + - + - + - + - + + - The summary of declared fields and coupling--> @@ -2273,19 +2279,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -2356,19 +2360,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -2429,19 +2431,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -2496,19 +2496,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -2595,19 +2593,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -2668,20 +2664,18 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -2704,20 +2698,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -2757,19 +2748,17 @@ Local- Add jump stabilization on interior of macro elements--> + - The summary of declared fields and coupling--> @@ -2891,19 +2880,17 @@ Equal to 1 for surface conditions, and to 0 for reservoir conditions--> + - The summary of declared fields and coupling--> @@ -2964,19 +2951,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3027,19 +3012,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3064,19 +3047,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3105,24 +3086,18 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3169,19 +3144,17 @@ Local- Add jump stabilization on interior of macro elements--> + - The summary of declared fields and coupling--> @@ -3213,20 +3186,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3256,20 +3226,18 @@ Local- Add jump stabilization on interior of macro elements--> + - The summary of declared fields and coupling--> @@ -3302,19 +3270,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3347,19 +3313,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3392,19 +3356,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3451,19 +3413,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3508,19 +3468,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3551,19 +3509,17 @@ SourceFluxes application if isThermal is enabled : For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced.--> + - The summary of declared fields and coupling--> @@ -3600,19 +3556,17 @@ SourceFluxes application if isThermal is enabled : For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced.--> + - The summary of declared fields and coupling--> @@ -3643,19 +3597,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3689,20 +3641,19 @@ Local- Add jump stabilization on interior of macro elements--> + - The summary of declared fields and coupling +3 + - Dof information--> @@ -3732,19 +3683,17 @@ Local- Add jump stabilization on interior of macro elements--> + - The summary of declared fields and coupling--> @@ -3771,19 +3720,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3813,19 +3760,17 @@ Local- Add jump stabilization on interior of macro elements--> + - The summary of declared fields and coupling--> @@ -3858,19 +3803,17 @@ SourceFluxes application if isThermal is enabled : For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced.--> + - The summary of declared fields and coupling--> @@ -3899,19 +3842,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3934,19 +3875,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -3979,19 +3918,17 @@ Local- Add jump stabilization on interior of macro elements--> + - The summary of declared fields and coupling--> @@ -4016,19 +3953,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -4075,19 +4010,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -4131,19 +4064,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -4191,19 +4122,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -4249,19 +4178,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -4321,19 +4248,17 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling--> @@ -4388,19 +4313,19 @@ A level of 0 outputs minimal information, higher levels require more. + - The summary of declared fields and coupling +3 + - Rupture rate information--> @@ -4620,7 +4545,10 @@ A level of 0 outputs minimal information, higher levels require more. - + From 21d94fb49467328a2b92f02728c9a914fdb6f86a Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 2 Oct 2024 11:52:15 +0200 Subject: [PATCH 06/10] uncrustify + doxygen --- src/coreComponents/physicsSolvers/LogLevelsInfo.hpp | 1 - src/coreComponents/physicsSolvers/SolverBase.hpp | 1 - src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp | 1 - src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp | 1 - .../physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp | 1 - .../physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp | 1 - 6 files changed, 6 deletions(-) diff --git a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp index 68960dd9dc5..b0c13d09d15 100644 --- a/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/LogLevelsInfo.hpp @@ -103,4 +103,3 @@ struct Statistics } #endif // GEOS_PHYSICSSOLVERS_LOGLEVELSINFO_HPP - diff --git a/src/coreComponents/physicsSolvers/SolverBase.hpp b/src/coreComponents/physicsSolvers/SolverBase.hpp index 265b1298bfa..98bd390ef9c 100644 --- a/src/coreComponents/physicsSolvers/SolverBase.hpp +++ b/src/coreComponents/physicsSolvers/SolverBase.hpp @@ -936,7 +936,6 @@ class SolverBase : public ExecutableGroup * @param newNewtonNorm Residual norm at current iteration * @param oldNewtonNorm Residual norm at previous iteration * @param krylovParams Linear solver parameters - * @param logLevel Log level * @return Adaptive tolerance recommendation */ real64 eisenstatWalker( real64 const newNewtonNorm, diff --git a/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp index 11d097d9a07..f58f9494b0d 100644 --- a/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/contact/LogLevelsInfo.hpp @@ -49,4 +49,3 @@ struct Configuration } #endif // GEOS_PHYSICSSOLVERS_CONTACT_LOGLEVELSINFO_HPP - diff --git a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp index 68a48f9d134..0d0a2a10768 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/LogLevelsInfo.hpp @@ -49,4 +49,3 @@ struct CFL } #endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_LOGLEVELSINFO_HPP - diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp index 0367c784c36..9e9b9f20b50 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp @@ -55,4 +55,3 @@ struct Crossflow } #endif // GEOS_PHYSICSSOLVERS_FLUIDFLOW_WELLS_LOGLEVELSINFO_HPP - diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp index d07515b3253..0a698349589 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp @@ -61,4 +61,3 @@ struct Mapping } #endif // GEOS_PHYSICSSOLVERS_SURFACEGENERATION_LOGLEVELSINFO_HPP - From e65e8ab309239fc24ff33d1c0a8c117afd7e5b3d Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 2 Oct 2024 15:30:15 +0200 Subject: [PATCH 07/10] remove dof description --- .../physicsSolvers/multiphysics/LogLevelsInfo.hpp | 6 ------ .../SinglePhasePoromechanicsConformingFractures.cpp | 6 ------ 2 files changed, 12 deletions(-) diff --git a/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp index 6ea8a4412c7..fb9322e1021 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/LogLevelsInfo.hpp @@ -41,12 +41,6 @@ struct Coupling static constexpr std::string_view getDescription() { return "Coupling information"; } }; -struct Dof -{ - static constexpr int getMinLogLevel() { return 3; } - static constexpr std::string_view getDescription() { return "Dof information"; } -}; - /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp index 920f4b4b7b1..5991b0fb3b1 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp @@ -44,8 +44,6 @@ SinglePhasePoromechanicsConformingFractures< FLOW_SOLVER >::SinglePhasePoromecha Group * const parent ) : Base( name, parent ) { - Base::template addLogLevel< logInfo::Dof >(); - LinearSolverParameters & params = this->m_linearSolverParameters.get(); params.mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsConformingFractures; params.mgr.separateComponents = false; @@ -84,10 +82,6 @@ void SinglePhasePoromechanicsConformingFractures< FLOW_SOLVER >::setupSystem( Do this->setupDofs( domain, dofManager ); dofManager.reorderByRank(); - std::ostringstream oss; - dofManager.printFieldInfo( oss ); - GEOS_LOG_LEVEL_INFO( logInfo::Dof, oss.str()) - /// 2. Add coupling terms not added by the DofManager. localIndex const numLocalRows = dofManager.numLocalDofs(); From a3943bc71f6fb29fc635399f92a267926fecbfaf Mon Sep 17 00:00:00 2001 From: Pavel Tomin Date: Wed, 2 Oct 2024 09:42:19 -0500 Subject: [PATCH 08/10] final pass --- .../physicsSolvers/SolverBase.cpp | 8 ++- .../contact/ContactSolverBase.cpp | 3 + ...lidMechanicsAugmentedLagrangianContact.cpp | 9 +-- .../contact/SolidMechanicsLagrangeContact.cpp | 9 +-- .../fluidFlow/CompositionalMultiphaseBase.cpp | 3 +- .../CompositionalMultiphaseStatistics.cpp | 64 +++++++++++-------- .../fluidFlow/SinglePhaseStatistics.cpp | 27 ++++---- .../wells/CompositionalMultiphaseWell.cpp | 35 +++++----- .../fluidFlow/wells/SinglePhaseWell.cpp | 6 +- .../fluidFlow/wells/WellControls.cpp | 4 +- .../fluidFlow/wells/WellSolverBase.cpp | 4 ++ .../multiphysics/CoupledSolver.hpp | 2 + .../solidMechanics/LogLevelsInfo.hpp | 51 --------------- .../SolidMechanicsStateReset.cpp | 16 ++--- .../surfaceGeneration/LogLevelsInfo.hpp | 12 ++-- .../surfaceGeneration/SurfaceGenerator.cpp | 4 +- 16 files changed, 121 insertions(+), 136 deletions(-) delete mode 100644 src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp diff --git a/src/coreComponents/physicsSolvers/SolverBase.cpp b/src/coreComponents/physicsSolvers/SolverBase.cpp index b06c7a26031..c2ec0943d67 100644 --- a/src/coreComponents/physicsSolvers/SolverBase.cpp +++ b/src/coreComponents/physicsSolvers/SolverBase.cpp @@ -104,6 +104,8 @@ SolverBase::SolverBase( string const & name, addLogLevel< logInfo::LinearSolver >(); addLogLevel< logInfo::NonlinearSolver >(); addLogLevel< logInfo::Timers >(); + addLogLevel< logInfo::Initialization >(); + addLogLevel< logInfo::Statistics >(); registerGroup( groupKeyStruct::linearSolverParametersString(), &m_linearSolverParameters ); registerGroup( groupKeyStruct::nonlinearSolverParametersString(), &m_nonlinearSolverParameters ); @@ -323,7 +325,8 @@ bool SolverBase::execute( real64 const time_n, if( dtRemaining > 0.0 ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, GEOS_FMT( "{}: sub-step = {}, accepted dt = {}, next dt = {}, remaining dt = {}", getName(), subStep, dtAccepted, nextDt, dtRemaining ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::TimeStep, + GEOS_FMT( "{}: sub-step = {}, accepted dt = {}, next dt = {}, remaining dt = {}", getName(), subStep, dtAccepted, nextDt, dtRemaining ) ); } } @@ -895,7 +898,8 @@ bool SolverBase::solveNonlinearSystem( real64 const & time_n, for( newtonIter = 0; newtonIter < maxNewtonIter; ++newtonIter ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, GEOS_FMT( " Attempt: {:2}, ConfigurationIter: {:2}, NewtonIter: {:2}", dtAttempt, configurationLoopIter, newtonIter ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::NonlinearSolver, + GEOS_FMT( " Attempt: {:2}, ConfigurationIter: {:2}, NewtonIter: {:2}", dtAttempt, configurationLoopIter, newtonIter ) ); { Timer timer( m_timers["assemble"] ); diff --git a/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp b/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp index 185a4c798c9..a3781514d75 100644 --- a/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp @@ -23,6 +23,7 @@ #include "constitutive/contact/FrictionBase.hpp" #include "mesh/DomainPartition.hpp" #include "mesh/SurfaceElementRegion.hpp" +#include "physicsSolvers/contact/LogLevelsInfo.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "common/GEOS_RAJA_Interface.hpp" @@ -42,6 +43,8 @@ ContactSolverBase::ContactSolverBase( const string & name, this->getWrapper< string >( viewKeyStruct::surfaceGeneratorNameString() ). setInputFlag( dataRepository::InputFlags::FALSE ); + + addLogLevel< logInfo::Configuration >(); } void ContactSolverBase::postInputInitialization() diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp index bb05f4905dd..96ab501b0fb 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsAugmentedLagrangianContact.cpp @@ -904,10 +904,11 @@ bool SolidMechanicsAugmentedLagrangianContact::updateConfiguration( DomainPartit int hasConfigurationConvergedGlobally = (totCondNotConv == 0) ? true : false; - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, GEOS_FMT( " ALM convergence summary:" - " converged: {:6} | stick & gn>0: {:6} | compenetration: {:6} | stick & gt>lim: {:6} | tau>tauLim: {:6}\n", - globalCondConv[0], globalCondConv[1], globalCondConv[2], - globalCondConv[3], globalCondConv[4] )); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Convergence, + GEOS_FMT( " ALM convergence summary:" + " converged: {:6} | stick & gn>0: {:6} | compenetration: {:6} | stick & gt>lim: {:6} | tau>tauLim: {:6}\n", + globalCondConv[0], globalCondConv[1], globalCondConv[2], + globalCondConv[3], globalCondConv[4] )); if( hasConfigurationConvergedGlobally ) { diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp index 83277a61fbc..85f0120e6ef 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp @@ -427,10 +427,11 @@ void SolidMechanicsLagrangeContact::computeTolerances( DomainPartition & domain } ); } ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Configuration, GEOS_FMT( "{}: normal displacement tolerance = [{}, {}], sliding tolerance = [{}, {}], normal traction tolerance = [{}, {}]", - this->getName(), minNormalDisplacementTolerance, maxNormalDisplacementTolerance, - minSlidingTolerance, maxSlidingTolerance, - minNormalTractionTolerance, maxNormalTractionTolerance ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Configuration, + GEOS_FMT( "{}: normal displacement tolerance = [{}, {}], sliding tolerance = [{}, {}], normal traction tolerance = [{}, {}]", + this->getName(), minNormalDisplacementTolerance, maxNormalDisplacementTolerance, + minSlidingTolerance, maxSlidingTolerance, + minNormalTractionTolerance, maxNormalTractionTolerance ) ); } void SolidMechanicsLagrangeContact::resetStateToBeginningOfStep( DomainPartition & domain ) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index 5bbfccf29a5..24bfc0dbff0 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -2611,7 +2611,8 @@ void CompositionalMultiphaseBase::updateState( DomainPartition & domain ) maxDeltaPhaseVolFrac = MpiWrapper::max( maxDeltaPhaseVolFrac ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, GEOS_FMT( " {}: Max phase volume fraction change = {}", getName(), fmt::format( "{:.{}f}", maxDeltaPhaseVolFrac, 4 ) ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( " {}: Max phase volume fraction change = {}", getName(), fmt::format( "{:.{}f}", maxDeltaPhaseVolFrac, 4 ) ) ); } bool CompositionalMultiphaseBase::checkSequentialSolutionIncrements( DomainPartition & domain ) const diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp index b4a6fbe5a09..96dd8e83636 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp @@ -61,6 +61,8 @@ CompositionalMultiphaseStatistics::CompositionalMultiphaseStatistics( const stri setApplyDefaultValue( 1e-6 ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Flag to decide whether a phase is considered mobile (when the relperm is above the threshold) or immobile (when the relperm is below the threshold) in metric 2" ); + + addLogLevel< logInfo::CFL >(); } void CompositionalMultiphaseStatistics::postInputInitialization() @@ -392,7 +394,8 @@ void CompositionalMultiphaseStatistics::computeRegionStatistics( real64 const ti { regionStatistics.averagePressure = 0.0; regionStatistics.averageTemperature = 0.0; - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {}: Cannot compute average pressure because region pore volume is zero.", getName(), regionNames[i] ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {}: Cannot compute average pressure because region pore volume is zero.", getName(), regionNames[i] ) ); } @@ -407,34 +410,45 @@ void CompositionalMultiphaseStatistics::computeRegionStatistics( real64 const ti string_view massUnit = units::getSymbol( m_solver->getMassUnit() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Pressure (min, average, max): {}, {}, {} Pa", - getName(), regionNames[i], time, regionStatistics.minPressure, regionStatistics.averagePressure, regionStatistics.maxPressure ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Delta pressure (min, max): {}, {} Pa", - getName(), regionNames[i], time, regionStatistics.minDeltaPressure, regionStatistics.maxDeltaPressure ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Temperature (min, average, max): {}, {}, {} K", - getName(), regionNames[i], time, regionStatistics.minTemperature, regionStatistics.averageTemperature, - regionStatistics.maxTemperature ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Total dynamic pore volume: {} rm^3", - getName(), regionNames[i], time, regionStatistics.totalPoreVolume ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Phase dynamic pore volume: {} rm^3", - getName(), regionNames[i], time, regionStatistics.phasePoreVolume ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Phase mass: {} {}", - getName(), regionNames[i], time, regionStatistics.phaseMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Pressure (min, average, max): {}, {}, {} Pa", + getName(), regionNames[i], time, regionStatistics.minPressure, regionStatistics.averagePressure, regionStatistics.maxPressure ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Delta pressure (min, max): {}, {} Pa", + getName(), regionNames[i], time, regionStatistics.minDeltaPressure, regionStatistics.maxDeltaPressure ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Temperature (min, average, max): {}, {}, {} K", + getName(), regionNames[i], time, regionStatistics.minTemperature, regionStatistics.averageTemperature, + regionStatistics.maxTemperature ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Total dynamic pore volume: {} rm^3", + getName(), regionNames[i], time, regionStatistics.totalPoreVolume ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Phase dynamic pore volume: {} rm^3", + getName(), regionNames[i], time, regionStatistics.phasePoreVolume ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Phase mass: {} {}", + getName(), regionNames[i], time, regionStatistics.phaseMass, massUnit ) ); // metric 1: trapping computed with the Land trapping coefficient (similar to Eclipse) - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Trapped phase mass (metric 1): {} {}", - getName(), regionNames[i], time, regionStatistics.trappedPhaseMass, massUnit ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Non-trapped phase mass (metric 1): {} {}", - getName(), regionNames[i], time, nonTrappedPhaseMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Trapped phase mass (metric 1): {} {}", + getName(), regionNames[i], time, regionStatistics.trappedPhaseMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Non-trapped phase mass (metric 1): {} {}", + getName(), regionNames[i], time, nonTrappedPhaseMass, massUnit ) ); // metric 2: immobile phase mass computed with a threshold on relative permeability - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Immobile phase mass (metric 2): {} {}", - getName(), regionNames[i], time, regionStatistics.immobilePhaseMass, massUnit ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Mobile phase mass (metric 2): {} {}", - getName(), regionNames[i], time, mobilePhaseMass, massUnit ) ); - - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Component mass: {} {}", - getName(), regionNames[i], time, regionStatistics.componentMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Immobile phase mass (metric 2): {} {}", + getName(), regionNames[i], time, regionStatistics.immobilePhaseMass, massUnit ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Mobile phase mass (metric 2): {} {}", + getName(), regionNames[i], time, mobilePhaseMass, massUnit ) ); + + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Component mass: {} {}", + getName(), regionNames[i], time, regionStatistics.componentMass, massUnit ) ); if( m_writeCSV > 0 && MpiWrapper::commRank() == 0 ) { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp index aacd30a8715..d95c9b08f23 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp @@ -248,17 +248,22 @@ void SinglePhaseStatistics::computeRegionStatistics( real64 const time, GEOS_WARNING( GEOS_FMT( "{}, {}: Cannot compute average pressure & temperature because region pore volume is zero.", getName(), regionNames[i] ) ); } - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Pressure (min, average, max): {}, {}, {} Pa", - getName(), regionNames[i], time, regionStatistics.minPressure, regionStatistics.averagePressure, regionStatistics.maxPressure ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Delta pressure (min, max): {}, {} Pa", - getName(), regionNames[i], time, regionStatistics.minDeltaPressure, regionStatistics.maxDeltaPressure ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Temperature (min, average, max): {}, {}, {} K", - getName(), regionNames[i], time, regionStatistics.minTemperature, regionStatistics.averageTemperature, - regionStatistics.maxTemperature ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Total dynamic pore volume: {} rm^3", - getName(), regionNames[i], time, regionStatistics.totalPoreVolume ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, GEOS_FMT( "{}, {} (time {} s): Total fluid mass: {} kg", - getName(), regionNames[i], time, regionStatistics.totalMass ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Pressure (min, average, max): {}, {}, {} Pa", + getName(), regionNames[i], time, regionStatistics.minPressure, regionStatistics.averagePressure, regionStatistics.maxPressure ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Delta pressure (min, max): {}, {} Pa", + getName(), regionNames[i], time, regionStatistics.minDeltaPressure, regionStatistics.maxDeltaPressure ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Temperature (min, average, max): {}, {}, {} K", + getName(), regionNames[i], time, regionStatistics.minTemperature, regionStatistics.averageTemperature, + regionStatistics.maxTemperature ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Total dynamic pore volume: {} rm^3", + getName(), regionNames[i], time, regionStatistics.totalPoreVolume ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Statistics, + GEOS_FMT( "{}, {} (time {} s): Total fluid mass: {} kg", + getName(), regionNames[i], time, regionStatistics.totalMass ) ); if( m_writeCSV > 0 && MpiWrapper::commRank() == 0 ) { diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp index 5015b9ba1eb..2b03545c197 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/CompositionalMultiphaseWell.cpp @@ -1337,8 +1337,8 @@ CompositionalMultiphaseWell::checkSystemSolution( DomainPartition & domain, if( !subRegionData.localMinVal ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, "Solution is invalid in well " << subRegion.getName() - << " (either a negative pressure or a negative component density was found)." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Solution, + GEOS_FMT( "Solution is invalid in well {} (either a negative pressure or a negative component density was found)", subRegion.getName()) ); } localCheck = std::min( localCheck, subRegionData.localMinVal ); @@ -1597,9 +1597,9 @@ void CompositionalMultiphaseWell::assemblePressureRelations( real64 const & time { GEOS_MARK_FUNCTION; - forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &, - MeshLevel const & mesh, - arrayView1d< string const > const & regionNames ) + forDiscretizationOnMeshTargets ( domain.getMeshBodies(), [&] ( string const &, + MeshLevel const & mesh, + arrayView1d< string const > const & regionNames ) { ElementRegionManager const & elemManager = mesh.getElemManager(); @@ -1642,7 +1642,7 @@ void CompositionalMultiphaseWell::assemblePressureRelations( real64 const & time subRegion.getTopWellElementIndex(), m_targetPhaseIndex, wellControls, - time_n + dt, // controls evaluated with BHP/rate of the end of step + time_n + dt, // controls evaluated with BHP/rate of the end of step wellElemDofNumber, wellElemGravCoef, nextWellElemIndex, @@ -1666,25 +1666,26 @@ void CompositionalMultiphaseWell::assemblePressureRelations( real64 const & time if( wellControls.isProducer() ) { wellControls.switchToPhaseRateControl( wellControls.getTargetPhaseRate( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() - << " from BHP constraint to phase volumetric rate constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, + GEOS_FMT( "Control switch for well {} from BHP constraint to phase volumetric rate constraint", subRegion.getName() ) ); } else { wellControls.switchToTotalRateControl( wellControls.getTargetTotalRate( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() - << " from BHP constraint to total volumetric rate constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, + GEOS_FMT( "Control switch for well {} from BHP constraint to total volumetric rate constraint", subRegion.getName()) ); } } else { wellControls.switchToBHPControl( wellControls.getTargetBHP( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() - << " from rate constraint to BHP constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, + GEOS_FMT( "Control switch for well {} from rate constraint to BHP constraint", subRegion.getName() ) ); } } } ); - } ); + } + ); } void CompositionalMultiphaseWell::shutDownWell( real64 const time_n, @@ -1749,7 +1750,7 @@ void CompositionalMultiphaseWell::shutDownWell( real64 const time_n, rankOffset, localMatrix, rhsValue, - pres[ei], // freeze the current pressure value + pres[ei], // freeze the current pressure value pres[ei] ); localRhs[localRow] = rhsValue; @@ -1760,7 +1761,7 @@ void CompositionalMultiphaseWell::shutDownWell( real64 const time_n, rankOffset, localMatrix, rhsValue, - compDens[ei][ic], // freeze the current component density values + compDens[ei][ic], // freeze the current component density values compDens[ei][ic] ); localRhs[localRow + ic + 1] = rhsValue; } @@ -1770,7 +1771,7 @@ void CompositionalMultiphaseWell::shutDownWell( real64 const time_n, rankOffset, localMatrix, rhsValue, - connRate[ei], // freeze the current pressure value + connRate[ei], // freeze the current pressure value connRate[ei] ); localRhs[localRow + numComp + 1] = rhsValue; @@ -1951,4 +1952,4 @@ void CompositionalMultiphaseWell::printRates( real64 const & time_n, } REGISTER_CATALOG_ENTRY( SolverBase, CompositionalMultiphaseWell, string const &, Group * const ) -} // namespace geos +} // namespace geos diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp index 81924241f7a..78a700dcd91 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/SinglePhaseWell.cpp @@ -522,14 +522,12 @@ void SinglePhaseWell::assemblePressureRelations( real64 const & time_n, if( wellControls.getControl() == WellControls::Control::BHP ) { wellControls.switchToTotalRateControl( wellControls.getTargetTotalRate( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() - << " from BHP constraint to rate constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, GEOS_FMT( "Control switch for well {} from BHP constraint to rate constraint", subRegion.getName()) ); } else { wellControls.switchToBHPControl( wellControls.getTargetBHP( timeAtEndOfStep ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "Control switch for well " << subRegion.getName() - << " from rate constraint to BHP constraint" ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, GEOS_FMT( "Control switch for well {} from rate constraint to BHP constraint", subRegion.getName()) ); } } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp index 42182377bfd..5030a951dd1 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellControls.cpp @@ -342,8 +342,8 @@ void WellControls::postInputInitialization() else if( m_targetBHP <= 0.0 && m_targetBHPTableName.empty() ) { m_targetBHP = isProducer() ? WellConstants::defaultProducerBHP : WellConstants::defaultInjectorBHP; - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, "WellControls " << getDataContext() << ": Setting " << viewKeyStruct::targetBHPString() << " to default value " - << m_targetBHP << "." ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::WellControl, + GEOS_FMT( "WellControls {}: Setting {} to default value {}", getDataContext(), viewKeyStruct::targetBHPString(), m_targetBHP )); } // 6.2) Check incoherent information diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp index e600b55eb35..2b114b13f70 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/WellSolverBase.cpp @@ -27,6 +27,7 @@ #include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp" #include "physicsSolvers/fluidFlow/wells/WellControls.hpp" #include "physicsSolvers/fluidFlow/wells/WellSolverBaseFields.hpp" +#include "physicsSolvers/fluidFlow/wells/LogLevelsInfo.hpp" #include "fileIO/Outputs/OutputBase.hpp" namespace geos @@ -49,6 +50,9 @@ WellSolverBase::WellSolverBase( string const & name, setApplyDefaultValue( 0 ). setInputFlag( dataRepository::InputFlags::OPTIONAL ). setDescription( "Write rates into a CSV file" ); + + addLogLevel< logInfo::WellControl >(); + addLogLevel< logInfo::Crossflow >(); } Group * WellSolverBase::createChild( string const & childKey, string const & childName ) diff --git a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp index bbbf109e1f6..ea28f7b8b30 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp +++ b/src/coreComponents/physicsSolvers/multiphysics/CoupledSolver.hpp @@ -56,6 +56,8 @@ class CoupledSolver : public SolverBase this->getWrapper< string >( SolverBase::viewKeyStruct::discretizationString() ). setInputFlag( dataRepository::InputFlags::FALSE ); + + addLogLevel< logInfo::Coupling >(); } /// deleted copy constructor diff --git a/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp deleted file mode 100644 index db77eda1e5c..00000000000 --- a/src/coreComponents/physicsSolvers/solidMechanics/LogLevelsInfo.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * ------------------------------------------------------------------------------------------------------------ - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC - * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University - * Copyright (c) 2018-2020 TotalEnergies - * Copyright (c) 2019- GEOSX Contributors - * All rights reserved - * - * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. - * ------------------------------------------------------------------------------------------------------------ - */ - -/** - * @file LogLevelsInfo.hpp - * This file contains log level informations for coupled multiphysics solvers - */ - -#ifndef GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP -#define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP - -#include "common/DataTypes.hpp" - -namespace geos -{ - -namespace logInfo -{ - -/** - * @name Wells LogLevels info structures. They must comply with the `is_log_level_info` trait. - */ -///@{ - -/// @cond DO_NOT_DOCUMENT - -struct SolidMechanicsInitialization -{ - static constexpr int getMinLogLevel() { return 2; } - static constexpr std::string_view getDescription() { return "SolidMechanics Initialization information"; } -}; - -/// @endcond -///@} - -} - -} - -#endif // GEOS_PHYSICSSOLVERS_MULTIPHYSICS_LOGLEVELSINFO_HPP diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp index 83cb923879e..065d260aab7 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp @@ -22,7 +22,6 @@ #include "physicsSolvers/PhysicsSolverManager.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" #include "physicsSolvers/LogLevelsInfo.hpp" -#include "physicsSolvers/solidMechanics/LogLevelsInfo.hpp" #include "mesh/DomainPartition.hpp" namespace geos @@ -54,7 +53,7 @@ SolidMechanicsStateReset::SolidMechanicsStateReset( const string & name, setInputFlag( InputFlags::OPTIONAL ). setDescription( "Flag to enable/disable inelastic behavior" ); - addLogLevel< logInfo::SolidMechanicsInitialization >(); + addLogLevel< logInfo::Initialization >(); } @@ -88,8 +87,9 @@ bool SolidMechanicsStateReset::execute( real64 const time_n, // Option 1: zero out velocity, incremental displacement, and displacement if( m_resetDisplacements ) { - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is resetting total displacement and velocity to zero", - getName(), time_n, m_solidSolverName ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, + GEOS_FMT( "Task `{}`: at time {}s, physics solver `{}` is resetting total displacement and velocity to zero", + getName(), time_n, m_solidSolverName ) ); NodeManager & nodeManager = mesh.getNodeManager(); @@ -110,10 +110,10 @@ bool SolidMechanicsStateReset::execute( real64 const time_n, string const & solidMaterialName = subRegion.getReference< string >( SolidMechanicsLagrangianFEM::viewKeyStruct::solidMaterialNamesString() ); Group & constitutiveModels = subRegion.getGroup( ElementSubRegionBase::groupKeyStruct::constitutiveModelsString() ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::SolidMechanicsInitialization, GEOS_FMT( "Task `{}`: at time {}s, solid model `{}` is setting inelastic behavior to `{}` on subRegion `{}`. ", - getName(), time_n, solidMaterialName, - m_disableInelasticity ? "OFF" : "ON", - subRegion.getName() ) ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::Initialization, GEOS_FMT( "Task `{}`: at time {}s, solid model `{}` is setting inelastic behavior to `{}` on subRegion `{}`. ", + getName(), time_n, solidMaterialName, + m_disableInelasticity ? "OFF" : "ON", + subRegion.getName() ) ); SolidBase & constitutiveRelation = constitutiveModels.getGroup< SolidBase >( solidMaterialName ); constitutiveRelation.disableInelasticity( m_disableInelasticity ); diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp index 0a698349589..a3be90fff02 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/LogLevelsInfo.hpp @@ -41,18 +41,18 @@ struct SurfaceGenerator static constexpr std::string_view getDescription() { return "Fracture generation information"; } }; -struct RuptureRate -{ - static constexpr int getMinLogLevel() { return 3; } - static constexpr std::string_view getDescription() { return "Rupture rate information"; } -}; - struct Mapping { static constexpr int getMinLogLevel() { return 2; } static constexpr std::string_view getDescription() { return "Mapping information"; } }; +struct RuptureRate +{ + static constexpr int getMinLogLevel() { return 3; } + static constexpr std::string_view getDescription() { return "Rupture rate information"; } +}; + /// @endcond ///@} diff --git a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp index 9016add5be8..c4e8897106f 100644 --- a/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp +++ b/src/coreComponents/physicsSolvers/surfaceGeneration/SurfaceGenerator.cpp @@ -222,6 +222,8 @@ SurfaceGenerator::SurfaceGenerator( const string & name, this->getWrapper< string >( viewKeyStruct::discretizationString() ). setInputFlag( InputFlags::FALSE ); + addLogLevel< logInfo::SurfaceGenerator >(); + addLogLevel< logInfo::Mapping >(); addLogLevel< logInfo::RuptureRate >(); } @@ -748,7 +750,7 @@ int SurfaceGenerator::separationDriver( DomainPartition & domain, real64 ruptureRate = calculateRuptureRate( elementManager.getRegion< SurfaceElementRegion >( this->m_fractureRegionName ) ); - GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::RuptureRate, "rupture rate is " << ruptureRate ); + GEOS_LOG_LEVEL_INFO_RANK_0( logInfo::RuptureRate, GEOS_FMT( "Rupture rate = {}", ruptureRate ) ); if( ruptureRate > 0 ) m_nextDt = ruptureRate < 1e99 ? m_cflFactor / ruptureRate : 1e99; From 385c67a3eb7cf7c7548da9e4029aa7bde0c34455 Mon Sep 17 00:00:00 2001 From: Pavel Tomin Date: Wed, 2 Oct 2024 12:32:56 -0500 Subject: [PATCH 09/10] Update CMakeLists.txt --- .../physicsSolvers/solidMechanics/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt b/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt index 83bd80ae358..a2691036eda 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/solidMechanics/CMakeLists.txt @@ -1,7 +1,6 @@ # Specify solver headers set( physicsSolvers_headers ${physicsSolvers_headers} - solidMechanics/LogLevelsInfo.hpp solidMechanics/SolidMechanicsFields.hpp solidMechanics/SolidMechanicsLagrangianFEM.hpp solidMechanics/SolidMechanicsLagrangianFEM.hpp @@ -34,4 +33,4 @@ set( physicsSolvers_sources solidMechanics/SolidMechanicsStatistics.cpp PARENT_SCOPE ) -#include( solidMechanics/kernels/SolidMechanicsKernels.cmake) \ No newline at end of file +#include( solidMechanics/kernels/SolidMechanicsKernels.cmake) From c93c7bfeb94a0f1979212674cbe1326e9a8af5b9 Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 3 Oct 2024 11:17:24 +0200 Subject: [PATCH 10/10] remove unecessary addLogLevel --- .../SolidMechanicsStateReset.cpp | 3 - src/coreComponents/schema/schema.xsd | 123 ++++++++++++++++-- 2 files changed, 112 insertions(+), 14 deletions(-) diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp index 065d260aab7..f1260c4ac7f 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp @@ -52,9 +52,6 @@ SolidMechanicsStateReset::SolidMechanicsStateReset( const string & name, setApplyDefaultValue( false ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Flag to enable/disable inelastic behavior" ); - - addLogLevel< logInfo::Initialization >(); - } SolidMechanicsStateReset::~SolidMechanicsStateReset() diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index e5f84d17d1b..72b920989f6 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -2239,6 +2239,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -2288,6 +2290,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -2369,6 +2373,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -2440,6 +2446,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -2505,6 +2513,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -2602,6 +2612,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -2673,6 +2685,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information - Crossflow information 2 - The summary of declared fields and coupling--> @@ -2707,6 +2722,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -2757,6 +2775,10 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Well control information + - Crossflow information 2 - The summary of declared fields and coupling--> @@ -2889,6 +2911,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -2960,6 +2984,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3021,6 +3047,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3056,6 +3084,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -3095,6 +3126,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information - Fracture generation information 2 - The summary of declared fields and coupling--> @@ -3153,6 +3187,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3195,6 +3231,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -3235,6 +3274,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information - Crossflow information 2 - The summary of declared fields and coupling--> @@ -3279,6 +3321,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3322,6 +3366,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -3365,6 +3412,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3422,6 +3471,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3477,6 +3528,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3518,6 +3571,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3565,6 +3620,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3606,6 +3663,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -3650,10 +3710,11 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - - The summary of declared fields and coupling -3 - - Dof information--> + - The summary of declared fields and coupling--> @@ -3692,6 +3753,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -3729,6 +3793,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -3769,6 +3836,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -3812,6 +3882,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -3851,6 +3923,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -3884,6 +3959,9 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Coupling information 2 - The summary of declared fields and coupling--> @@ -3927,6 +4005,10 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Well control information + - Crossflow information 2 - The summary of declared fields and coupling--> @@ -3962,8 +4044,11 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - - The summary of declared fields and coupling--> + - The summary of declared fields and coupling + - Configuration information--> @@ -4019,8 +4104,11 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - - The summary of declared fields and coupling--> + - The summary of declared fields and coupling + - Configuration information--> @@ -4073,8 +4161,11 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - - The summary of declared fields and coupling--> + - The summary of declared fields and coupling + - Configuration information--> @@ -4131,6 +4222,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -4187,6 +4280,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -4257,6 +4352,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported 2 - The summary of declared fields and coupling--> @@ -4322,8 +4419,12 @@ Level 0 outputs no specific information for this solver. Higher levels require m - Linear solver information - Nonlinear solver information - Solver timers information + - Initialization information + - Print statistics when supported + - Fracture generation information 2 - The summary of declared fields and coupling + - Mapping information 3 - Rupture rate information--> @@ -4389,7 +4490,10 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -4545,10 +4649,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - +