diff --git a/opm/simulators/flow/NonlinearSolverEbos.hpp b/opm/simulators/flow/NonlinearSolverEbos.hpp index f320cdbdd..c37245b1f 100644 --- a/opm/simulators/flow/NonlinearSolverEbos.hpp +++ b/opm/simulators/flow/NonlinearSolverEbos.hpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -44,10 +45,10 @@ template struct NewtonMaxRelax { using type = UndefinedProperty; }; -template -struct FlowNewtonMaxIterations { - using type = UndefinedProperty; -}; + +// we are reusing NewtonMaxIterations from opm-models +// See opm/models/nonlinear/newtonmethodproperties.hh + template struct NewtonMinIterations{ using type = UndefinedProperty; @@ -63,7 +64,7 @@ struct NewtonMaxRelax { static constexpr type value = 0.5; }; template -struct FlowNewtonMaxIterations { +struct NewtonMaxIterations { static constexpr int value = 20; }; template @@ -112,7 +113,7 @@ class WellState; // overload with given parameters relaxMax_ = EWOMS_GET_PARAM(TypeTag, Scalar, NewtonMaxRelax); - maxIter_ = EWOMS_GET_PARAM(TypeTag, int, FlowNewtonMaxIterations); + maxIter_ = EWOMS_GET_PARAM(TypeTag, int, NewtonMaxIterations); minIter_ = EWOMS_GET_PARAM(TypeTag, int, NewtonMinIterations); const auto& relaxationTypeString = EWOMS_GET_PARAM(TypeTag, std::string, NewtonRelaxationType); @@ -128,7 +129,7 @@ class WellState; static void registerParameters() { EWOMS_REGISTER_PARAM(TypeTag, Scalar, NewtonMaxRelax, "The maximum relaxation factor of a Newton iteration used by flow"); - EWOMS_REGISTER_PARAM(TypeTag, int, FlowNewtonMaxIterations, "The maximum number of Newton iterations per time step used by flow"); + EWOMS_REGISTER_PARAM(TypeTag, int, NewtonMaxIterations, "The maximum number of Newton iterations per time step used by flow"); EWOMS_REGISTER_PARAM(TypeTag, int, NewtonMinIterations, "The minimum number of Newton iterations per time step used by flow"); EWOMS_REGISTER_PARAM(TypeTag, std::string, NewtonRelaxationType, "The type of relaxation used by flow's Newton method"); }