mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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.;
|
static constexpr type value = 0.;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class TypeTag>
|
|
||||||
struct NewtonMaxIterations<TypeTag, TTag::CO2PTBaseProblem> {
|
|
||||||
static constexpr int value = 30;
|
|
||||||
};
|
|
||||||
|
|
||||||
// output
|
// output
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
struct VtkWriteFilterVelocities<TypeTag, TTag::CO2PTBaseProblem> {
|
struct VtkWriteFilterVelocities<TypeTag, TTag::CO2PTBaseProblem> {
|
||||||
@ -301,6 +296,10 @@ struct NewtonTargetIterations<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
|||||||
static constexpr type value = 6;
|
static constexpr type value = 6;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <class TypeTag>
|
||||||
|
struct NewtonMaxIterations<TypeTag, Properties::TTag::CO2PTBaseProblem>
|
||||||
|
{ static constexpr int value = 30; };
|
||||||
|
|
||||||
} // namespace Opm::Parameters
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
@ -107,10 +107,6 @@ struct EnableGravity<TypeTag, TTag::RichardsLensProblem> { static constexpr bool
|
|||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NumericDifferenceMethod<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 0; };
|
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
|
// The default for the end time of the simulation
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct EndTime<TypeTag, TTag::RichardsLensProblem>
|
struct EndTime<TypeTag, TTag::RichardsLensProblem>
|
||||||
@ -145,6 +141,11 @@ template<class TypeTag>
|
|||||||
struct NewtonTargetIterations<TypeTag, Properties::TTag::RichardsLensProblem>
|
struct NewtonTargetIterations<TypeTag, Properties::TTag::RichardsLensProblem>
|
||||||
{ static constexpr int value = 18; };
|
{ 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::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
@ -76,10 +76,6 @@ template<class TypeTag>
|
|||||||
struct NewtonMethod<TypeTag, TTag::NewtonMethod> { using type = ::Opm::NewtonMethod<TypeTag>; };
|
struct NewtonMethod<TypeTag, TTag::NewtonMethod> { using type = ::Opm::NewtonMethod<TypeTag>; };
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NewtonConvergenceWriter<TypeTag, TTag::NewtonMethod> { using type = NullConvergenceWriter<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
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
@ -100,6 +96,8 @@ struct NewtonTolerance<TypeTag, Properties::TTag::NewtonMethod>
|
|||||||
static constexpr type value = 1e-8;
|
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>
|
template<class TypeTag>
|
||||||
struct NewtonMaxError<TypeTag, Properties::TTag::NewtonMethod>
|
struct NewtonMaxError<TypeTag, Properties::TTag::NewtonMethod>
|
||||||
{
|
{
|
||||||
@ -111,6 +109,10 @@ template<class TypeTag>
|
|||||||
struct NewtonTargetIterations<TypeTag, Properties::TTag::NewtonMethod>
|
struct NewtonTargetIterations<TypeTag, Properties::TTag::NewtonMethod>
|
||||||
{ static constexpr int value = 10; };
|
{ static constexpr int value = 10; };
|
||||||
|
|
||||||
|
template<class TypeTag>
|
||||||
|
struct NewtonMaxIterations<TypeTag, Properties::TTag::NewtonMethod>
|
||||||
|
{ static constexpr int value = 20; };
|
||||||
|
|
||||||
} // namespace Opm::Parameters
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
@ -172,7 +174,7 @@ public:
|
|||||||
"method to a VTK file");
|
"method to a VTK file");
|
||||||
Parameters::registerParam<TypeTag, Parameters::NewtonTargetIterations>
|
Parameters::registerParam<TypeTag, Parameters::NewtonTargetIterations>
|
||||||
("The 'optimum' number of Newton iterations per time step");
|
("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");
|
("The maximum number of Newton iterations per time step");
|
||||||
Parameters::registerParam<TypeTag, Parameters::NewtonTolerance>
|
Parameters::registerParam<TypeTag, Parameters::NewtonTolerance>
|
||||||
("The maximum raw error tolerated by the Newton"
|
("The maximum raw error tolerated by the Newton"
|
||||||
@ -869,7 +871,7 @@ protected:
|
|||||||
{ return Parameters::get<TypeTag, Parameters::NewtonTargetIterations>(); }
|
{ return Parameters::get<TypeTag, Parameters::NewtonTargetIterations>(); }
|
||||||
// maximum number of iterations we do before giving up
|
// maximum number of iterations we do before giving up
|
||||||
int maxIterations_() const
|
int maxIterations_() const
|
||||||
{ return Parameters::get<TypeTag, Properties::NewtonMaxIterations>(); }
|
{ return Parameters::get<TypeTag, Parameters::NewtonMaxIterations>(); }
|
||||||
|
|
||||||
static bool enableConstraints_()
|
static bool enableConstraints_()
|
||||||
{ return getPropValue<TypeTag, Properties::EnableConstraints>(); }
|
{ return getPropValue<TypeTag, Properties::EnableConstraints>(); }
|
||||||
|
@ -61,6 +61,10 @@ struct NewtonMaxError { using type = Properties::UndefinedProperty; };
|
|||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct NewtonTargetIterations { using type = Properties::UndefinedProperty; };
|
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
|
} // end namespace Opm::Parameters
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,10 +44,6 @@ struct NewtonConvergenceWriter { using type = UndefinedProperty; };
|
|||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct ConvergenceWriter { using type = UndefinedProperty; };
|
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
|
} // end namespace Opm::Properties
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user