mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move NewtonMaxIterations to TypeTag-free parameter system
This commit is contained in:
@@ -79,14 +79,6 @@ struct NewtonConvergenceWriter<TypeTag, TTag::NewtonMethod> { using type = NullC
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
template<class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{ static constexpr int value = 20; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
* \ingroup Newton
|
||||
@@ -146,7 +138,7 @@ public:
|
||||
"method to a VTK file");
|
||||
Parameters::Register<Parameters::NewtonTargetIterations>
|
||||
("The 'optimum' number of Newton iterations per time step");
|
||||
Parameters::registerParam<TypeTag, Parameters::NewtonMaxIterations>
|
||||
Parameters::Register<Parameters::NewtonMaxIterations>
|
||||
("The maximum number of Newton iterations per time step");
|
||||
Parameters::Register<Parameters::NewtonTolerance<Scalar>>
|
||||
("The maximum raw error tolerated by the Newton"
|
||||
@@ -845,7 +837,7 @@ protected:
|
||||
{ return Parameters::Get<Parameters::NewtonTargetIterations>(); }
|
||||
// maximum number of iterations we do before giving up
|
||||
int maxIterations_() const
|
||||
{ return Parameters::get<TypeTag, Parameters::NewtonMaxIterations>(); }
|
||||
{ return Parameters::Get<Parameters::NewtonMaxIterations>(); }
|
||||
|
||||
static bool enableConstraints_()
|
||||
{ return getPropValue<TypeTag, Properties::EnableConstraints>(); }
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#ifndef EWOMS_NEWTON_METHOD_PARAMETERS_HH
|
||||
#define EWOMS_NEWTON_METHOD_PARAMETERS_HH
|
||||
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
//! The maximum error which may occur in a simulation before the
|
||||
@@ -32,6 +30,9 @@ namespace Opm::Parameters {
|
||||
template<class Scalar>
|
||||
struct NewtonMaxError { static constexpr Scalar value = 1e100; };
|
||||
|
||||
//! Number of maximum iterations for the Newton method.
|
||||
struct NewtonMaxIterations { static constexpr int value = 20; };
|
||||
|
||||
/*!
|
||||
* \brief The number of iterations at which the Newton method
|
||||
* should aim at.
|
||||
@@ -58,10 +59,6 @@ struct NewtonVerbose { static constexpr bool value = true; };
|
||||
//! gets written out to disk for every Newton iteration
|
||||
struct NewtonWriteConvergence { static constexpr bool value = false; };
|
||||
|
||||
//! Number of maximum iterations for the Newton method.
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NewtonMaxIterations { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // end namespace Opm::Parameters
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user