mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: move the NewtonTolerance parameter to Opm::Parameters
This commit is contained in:
@@ -76,12 +76,6 @@ template<class TypeTag>
|
||||
struct NewtonMethod<TypeTag, TTag::NewtonMethod> { using type = ::Opm::NewtonMethod<TypeTag>; };
|
||||
template<class TypeTag>
|
||||
struct NewtonConvergenceWriter<TypeTag, TTag::NewtonMethod> { using type = NullConvergenceWriter<TypeTag>; };
|
||||
template<class TypeTag>
|
||||
struct NewtonTolerance<TypeTag, TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 1e-8;
|
||||
};
|
||||
// set the abortion tolerace to some very large value. if not
|
||||
// overwritten at run-time this basically disables abortions
|
||||
template<class TypeTag>
|
||||
@@ -107,6 +101,13 @@ template<class TypeTag>
|
||||
struct NewtonWriteConvergence<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{ static constexpr bool value = false; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct NewtonTolerance<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 1e-8;
|
||||
};
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
@@ -148,7 +149,7 @@ public:
|
||||
{
|
||||
lastError_ = 1e100;
|
||||
error_ = 1e100;
|
||||
tolerance_ = Parameters::get<TypeTag, Properties::NewtonTolerance>();
|
||||
tolerance_ = Parameters::get<TypeTag, Parameters::NewtonTolerance>();
|
||||
|
||||
numIterations_ = 0;
|
||||
}
|
||||
@@ -170,7 +171,7 @@ public:
|
||||
("The 'optimum' number of Newton iterations per time step");
|
||||
Parameters::registerParam<TypeTag, Properties::NewtonMaxIterations>
|
||||
("The maximum number of Newton iterations per time step");
|
||||
Parameters::registerParam<TypeTag, Properties::NewtonTolerance>
|
||||
Parameters::registerParam<TypeTag, Parameters::NewtonTolerance>
|
||||
("The maximum raw error tolerated by the Newton"
|
||||
"method for considering a solution to be converged");
|
||||
Parameters::registerParam<TypeTag, Properties::NewtonMaxError>
|
||||
|
||||
@@ -36,6 +36,15 @@ struct NewtonVerbose { using type = Properties::UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NewtonWriteConvergence { using type = Properties::UndefinedProperty; };
|
||||
|
||||
/*!
|
||||
* \brief The value for the error below which convergence is declared
|
||||
*
|
||||
* This value can (and for the porous media models will) be changed to account for grid
|
||||
* scaling and other effects.
|
||||
*/
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NewtonTolerance { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // end namespace Opm::Parameters
|
||||
|
||||
#endif
|
||||
|
||||
@@ -44,15 +44,6 @@ struct NewtonConvergenceWriter { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct ConvergenceWriter { using type = UndefinedProperty; };
|
||||
|
||||
/*!
|
||||
* \brief The value for the error below which convergence is declared
|
||||
*
|
||||
* This value can (and for the porous media models will) be changed to account for grid
|
||||
* scaling and other effects.
|
||||
*/
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NewtonTolerance { using type = UndefinedProperty; };
|
||||
|
||||
//! The maximum error which may occur in a simulation before the
|
||||
//! Newton method for the time step is aborted
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
||||
Reference in New Issue
Block a user