16 #ifndef GEOS_PHYSICSSOLVERS_NONLINEARSOLVERPARAMETERS_HPP_
17 #define GEOS_PHYSICSSOLVERS_NONLINEARSOLVERPARAMETERS_HPP_
44 Group *
const parent );
101 static string catalogName() {
return "NonlinearSolverParameters"; }
109 static constexpr
char const * lineSearchActionString() {
return "lineSearchAction"; }
110 static constexpr
char const * lineSearchMaxCutsString() {
return "lineSearchMaxCuts"; }
111 static constexpr
char const * lineSearchCutFactorString() {
return "lineSearchCutFactor"; }
112 static constexpr
char const * lineSearchInterpolationTypeString() {
return "lineSearchInterpolationType"; }
113 static constexpr
char const * lineSearchStartingIterationString() {
return "lineSearchStartingIteration"; }
114 static constexpr
char const * lineSearchResidualFactorString() {
return "lineSearchResidualFactor"; }
116 static constexpr
char const * normTypeString() {
return "normType"; }
117 static constexpr
char const * minNormalizerString() {
return "minNormalizer"; }
118 static constexpr
char const * newtonTolString() {
return "newtonTol"; }
119 static constexpr
char const * newtonMaxIterString() {
return "newtonMaxIter"; }
120 static constexpr
char const * newtonMinIterString() {
return "newtonMinIter"; }
121 static constexpr
char const * newtonNumIterationsString() {
return "newtonNumberOfIterations"; }
122 static constexpr
char const * newtonSplitOperMaxIterString() {
return "newtonSplitOperMaxIter"; }
124 static constexpr
char const * allowNonConvergedString() {
return "allowNonConverged"; }
125 static constexpr
char const * timeStepDecreaseIterLimString() {
return "timeStepDecreaseIterLimit"; }
126 static constexpr
char const * timeStepIncreaseIterLimString() {
return "timeStepIncreaseIterLimit"; }
127 static constexpr
char const * timeStepDecreaseFactorString() {
return "timeStepDecreaseFactor"; }
128 static constexpr
char const * timeStepIncreaseFactorString() {
return "timeStepIncreaseFactor"; }
129 static constexpr
char const * minTimeStepIncreaseIntervalString() {
return "minTimeStepIncreaseInterval"; }
131 static constexpr
char const * maxSubStepsString() {
return "maxSubSteps"; }
132 static constexpr
char const * maxTimeStepCutsString() {
return "maxTimeStepCuts"; }
133 static constexpr
char const * timeStepCutFactorString() {
return "timeStepCutFactor"; }
134 static constexpr
char const * maxAllowedResidualNormString() {
return "maxAllowedResidualNorm"; }
136 static constexpr
char const * maxNumConfigurationAttemptsString() {
return "maxNumConfigurationAttempts"; }
137 static constexpr
char const * configurationToleranceString() {
return "configurationTolerance"; }
139 static constexpr
char const * couplingTypeString() {
return "couplingType"; }
140 static constexpr
char const * sequentialConvergenceCriterionString() {
return "sequentialConvergenceCriterion"; }
141 static constexpr
char const * subcyclingOptionString() {
return "subcycling"; }
142 static constexpr
char const * nonlinearAccelerationTypeString() {
return "nonlinearAccelerationType"; }
373 "NumberOfNonlinearIterations",
374 "SolutionIncrements" );
NormType
Type of norm used to check convergence TODO: find a way to put this inside the class.
LineSearchInterpolationType m_lineSearchInterpType
Flag to pick the type of line search.
integer m_numConfigurationAttempts
Number of times that the configuration had to be changed.
SequentialConvergenceCriterion sequentialConvergenceCriterion() const
Getter for the sequential convergence criterion.
integer m_allowNonConverged
Flag to allow for a non-converged nonlinear solution and continue with the problem.
real64 timeStepDecreaseFactor() const
Getter for the factor used to decrease the time step size.
CouplingType
Coupling type.
@ FullyImplicit
Fully-implicit coupling.
@ Sequential
Sequential coupling.
real64 m_newtonTol
The tolerance for the nonlinear convergence check.
NonlinearAccelerationType
Nonlinear acceleration type.
@ Aitken
Aitken acceleration.
integer timeStepIncreaseIterLimit() const
Calculates the lower limit for the number of iterations to force an increase to the next time step.
real64 m_minNormalizer
Value used to make sure that residual normalizers are not too small when computing residual norm.
real64 timeStepIncreaseFactor() const
Getter for the factor used to increase the time step size.
real64 m_lineSearchResidualFactor
Factor to determine residual increase.
real64 m_timeStepDecreaseIterLimit
Fraction of the max Newton iterations above which the solver asks for the time-step to be decreased f...
NonlinearAccelerationType m_nonlinearAccelerationType
Type of nonlinear acceleration for sequential solver.
LineSearchAction
Indicates the handling of line search in a Newton loop.
@ None
Do not use line search.
@ Require
Use line search. If smaller residual than starting residual is not achieved, cut time step.
@ Attempt
Use line search. Allow exit from line search without achieving smaller residual than starting residua...
NonlinearSolverParameters & operator=(const NonlinearSolverParameters ¶ms)
Copy Constructor.
double m_configurationTolerance
Configuration tolerance.
real64 m_timeStepIncreaseIterLimit
Fraction of the max Newton iterations below which the solver asks for the time-step to be increased f...
physicsSolverBaseKernels::NormType m_normType
Norm used to check the nonlinear loop convergence.
static string catalogName()
The name of this object in the catalog.
real64 m_timeStepIncreaseFactor
Factor used to increase the time step size.
integer m_maxIterNewton
The maximum number of nonlinear iterations that are allowed.
virtual void postInputInitialization() override
real64 m_timeStepCutFactor
Factor by which the time step will be cut if a timestep cut is required.
NonlinearSolverParameters()=delete
Default constructor.
integer m_numNewtonIterations
The number of nonlinear iterations that have been exectued.
integer m_numTimeStepAttempts
Number of times that the time-step had to be cut.
integer m_maxTimeStepCuts
Max number of time step cuts.
integer timeStepDecreaseIterLimit() const
Calculates the upper limit for the number of iterations to allow a decrease to the next time step.
NonlinearSolverParameters(NonlinearSolverParameters &&)=default
Default Move Constructor.
real64 m_maxAllowedResidualNorm
The maximum value of residual norm that we allow (otherwise, we cut the time step)
CouplingType couplingType() const
Getter for the coupling type.
CouplingType m_couplingType
Type of coupling.
NonlinearSolverParameters(string const &name, Group *const parent)
Constructor.
LineSearchAction m_lineSearchAction
Flag to apply a line search.
integer m_lineSearchStartingIteration
Iteration when line search starts.
real64 m_lineSearchCutFactor
The reduction factor for each line search cut.
integer m_minIterNewton
The minimum number of nonlinear iterations that may be applied.
physicsSolverBaseKernels::NormType normType() const
Getter for the norm type used to check convergence in the flow/well solvers.
integer minTimeStepIncreaseInterval() const
Getter for the minimum interval for increasing the time-step.
integer m_maxNumConfigurationAttempts
Max number of times that the configuration can be changed.
integer m_minTimeStepIncreaseInterval
Minimum interval, since the last time-step cut, for increasing the time-step.
LineSearchInterpolationType
Indicates the handling of line each interpolation strategy.
@ Linear
linear decrease of line search scaling factor.
@ Parabolic
use parabolic interpolation to define line search scaling factor.
real64 m_timeStepDecreaseFactor
Factor used to decrease the time step size.
integer m_maxSubSteps
Maximum number of time sub-steps allowed for the solver.
SequentialConvergenceCriterion m_sequentialConvergenceCriterion
Criterion used to check outer-loop convergence in sequential schemes.
SequentialConvergenceCriterion
Sequential convergence criterion.
@ ResidualNorm
convergence achieved when the residual drops below a given norm
@ NumberOfNonlinearIterations
convergence achieved when the subproblems convergence is achieved in less than minNewtonIteration
@ SolutionIncrements
convergence achieved when the solution increments are small enough
integer m_subcyclingOption
Flag to specify whether subcycling is allowed or not in sequential schemes.
virtual ~NonlinearSolverParameters()=default
Default destructor.
integer m_lineSearchMaxCuts
The maximum number of line search cuts to attempt.
integer getLogLevel() const
void setLogLevel(integer const logLevel)
Set verbosity level.
ENUM_STRINGS(LinearSolverParameters::SolverType, "direct", "cg", "gmres", "fgmres", "bicgstab", "preconditioner")
Declare strings associated with enumeration values.
double real64
64-bit floating point type.
std::int32_t integer
Signed integer type.