32 if (type ==
"Residual")
36 if (type ==
"PerComponentDeltaX")
40 if (type ==
"PerComponentResidual")
45 OGS_FATAL(
"There is no convergence criterion of type `{:s}'.", type);
49 const double denominator)
51 auto const eps = std::numeric_limits<double>::epsilon();
52 return std::abs(numerator) <
53 std::abs(reltol) * (std::abs(denominator) + eps);
T peekConfigParameter(std::string const ¶m) const
bool checkRelativeTolerance(const double reltol, const double numerator, const double denominator)
std::unique_ptr< ConvergenceCriterionResidual > createConvergenceCriterionResidual(const BaseLib::ConfigTree &config)
std::unique_ptr< ConvergenceCriterionPerComponentDeltaX > createConvergenceCriterionPerComponentDeltaX(const BaseLib::ConfigTree &config)
std::unique_ptr< ConvergenceCriterion > createConvergenceCriterion(const BaseLib::ConfigTree &config)
Creates a convergence criterion from the given configuration.
std::unique_ptr< ConvergenceCriterionDeltaX > createConvergenceCriterionDeltaX(const BaseLib::ConfigTree &config)
std::unique_ptr< ConvergenceCriterionPerComponentResidual > createConvergenceCriterionPerComponentResidual(const BaseLib::ConfigTree &config)