mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 09:16:27 -06:00
changed: move the NewtonMaxIterations parameter to Opm::Parameters
This commit is contained in:
parent
7a4a91c3bf
commit
e28284b68a
@ -189,11 +189,6 @@ struct LinearSolverAbsTolerance<TypeTag, TTag::CO2PTBaseProblem> {
|
||||
static constexpr type value = 0.;
|
||||
};
|
||||
|
||||
template <class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, TTag::CO2PTBaseProblem> {
|
||||
static constexpr int value = 30;
|
||||
};
|
||||
|
||||
// output
|
||||
template <class TypeTag>
|
||||
struct VtkWriteFilterVelocities<TypeTag, TTag::CO2PTBaseProblem> {
|
||||
@ -301,6 +296,10 @@ struct NewtonTargetIterations<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
||||
static constexpr type value = 6;
|
||||
};
|
||||
|
||||
template <class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
||||
{ static constexpr int value = 30; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
@ -107,10 +107,6 @@ struct EnableGravity<TypeTag, TTag::RichardsLensProblem> { static constexpr bool
|
||||
template<class TypeTag>
|
||||
struct NumericDifferenceMethod<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 0; };
|
||||
|
||||
// Set the maximum number of newton iterations of a time step
|
||||
template<class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 28; };
|
||||
|
||||
// The default for the end time of the simulation
|
||||
template<class TypeTag>
|
||||
struct EndTime<TypeTag, TTag::RichardsLensProblem>
|
||||
@ -145,6 +141,11 @@ template<class TypeTag>
|
||||
struct NewtonTargetIterations<TypeTag, Properties::TTag::RichardsLensProblem>
|
||||
{ static constexpr int value = 18; };
|
||||
|
||||
// Set the maximum number of newton iterations of a time step
|
||||
template<class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, Properties::TTag::RichardsLensProblem>
|
||||
{ static constexpr int value = 28; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
@ -76,10 +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>; };
|
||||
// set the abortion tolerace to some very large value. if not
|
||||
// overwritten at run-time this basically disables abortions
|
||||
template<class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, TTag::NewtonMethod> { static constexpr int value = 20; };
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
@ -100,6 +96,8 @@ struct NewtonTolerance<TypeTag, Properties::TTag::NewtonMethod>
|
||||
static constexpr type value = 1e-8;
|
||||
};
|
||||
|
||||
// set the abortion tolerance to some very large value. if not
|
||||
// overwritten at run-time this basically disables abortions
|
||||
template<class TypeTag>
|
||||
struct NewtonMaxError<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{
|
||||
@ -111,6 +109,10 @@ template<class TypeTag>
|
||||
struct NewtonTargetIterations<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{ static constexpr int value = 10; };
|
||||
|
||||
template<class TypeTag>
|
||||
struct NewtonMaxIterations<TypeTag, Properties::TTag::NewtonMethod>
|
||||
{ static constexpr int value = 20; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
@ -172,7 +174,7 @@ public:
|
||||
"method to a VTK file");
|
||||
Parameters::registerParam<TypeTag, Parameters::NewtonTargetIterations>
|
||||
("The 'optimum' number of Newton iterations per time step");
|
||||
Parameters::registerParam<TypeTag, Properties::NewtonMaxIterations>
|
||||
Parameters::registerParam<TypeTag, Parameters::NewtonMaxIterations>
|
||||
("The maximum number of Newton iterations per time step");
|
||||
Parameters::registerParam<TypeTag, Parameters::NewtonTolerance>
|
||||
("The maximum raw error tolerated by the Newton"
|
||||
@ -869,7 +871,7 @@ protected:
|
||||
{ return Parameters::get<TypeTag, Parameters::NewtonTargetIterations>(); }
|
||||
// maximum number of iterations we do before giving up
|
||||
int maxIterations_() const
|
||||
{ return Parameters::get<TypeTag, Properties::NewtonMaxIterations>(); }
|
||||
{ return Parameters::get<TypeTag, Parameters::NewtonMaxIterations>(); }
|
||||
|
||||
static bool enableConstraints_()
|
||||
{ return getPropValue<TypeTag, Properties::EnableConstraints>(); }
|
||||
|
@ -61,6 +61,10 @@ struct NewtonMaxError { using type = Properties::UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NewtonTargetIterations { using type = Properties::UndefinedProperty; };
|
||||
|
||||
//! Number of maximum iterations for the Newton method.
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NewtonMaxIterations { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // end namespace Opm::Parameters
|
||||
|
||||
#endif
|
||||
|
@ -44,10 +44,6 @@ struct NewtonConvergenceWriter { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct ConvergenceWriter { using type = UndefinedProperty; };
|
||||
|
||||
//! Number of maximum iterations for the Newton method.
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct NewtonMaxIterations { using type = UndefinedProperty; };
|
||||
|
||||
} // end namespace Opm::Properties
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user