changed: move the ContinueOnConvergenceError parameter to Opm::Parameters

This commit is contained in:
Arne Morten Kvarving 2024-06-28 12:16:28 +02:00
parent 3f1e2eb73c
commit f77c12bce9
4 changed files with 17 additions and 16 deletions

View File

@ -120,12 +120,6 @@ struct DiscExtensiveQuantities<TypeTag, TTag::FvBaseDiscretization> { using type
template<class TypeTag>
struct GradientCalculator<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseGradientCalculator<TypeTag>; };
//! By default, do not continue with a non-converged solution instead of giving up
//! if we encounter a time step size smaller than the minimum time
//! step size.
template<class TypeTag>
struct ContinueOnConvergenceError<TypeTag, TTag::FvBaseDiscretization> { static constexpr bool value = false; };
/*!
* \brief A vector of quanties, each for one equation.
*/
@ -345,6 +339,13 @@ template<class TypeTag>
struct MaxTimeStepDivisions<TypeTag, Properties::TTag::FvBaseDiscretization>
{ static constexpr unsigned value = 10; };
//! By default, do not continue with a non-converged solution instead of giving up
//! if we encounter a time step size smaller than the minimum time
//! step size.
template<class TypeTag>
struct ContinueOnConvergenceError<TypeTag, Properties::TTag::FvBaseDiscretization>
{ static constexpr bool value = false; };
} // namespace Opm::Parameters
namespace Opm {

View File

@ -96,6 +96,14 @@ struct MinTimeStepSize { using type = Properties::UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct MaxTimeStepDivisions { using type = Properties::UndefinedProperty; };
/*!
* \brief Continue with a non-converged solution instead of giving up
* if we encounter a time step size smaller than the minimum time
* step size.
*/
template<class TypeTag, class MyTypeTag>
struct ContinueOnConvergenceError { using type = Properties::UndefinedProperty; };
} // namespace Opm::Parameters
#endif

View File

@ -178,7 +178,7 @@ public:
"before the simulation bails out");
Parameters::registerParam<TypeTag, Parameters::EnableAsyncVtkOutput>
("Dispatch a separate thread to write the VTK output");
Parameters::registerParam<TypeTag, Properties::ContinueOnConvergenceError>
Parameters::registerParam<TypeTag, Parameters::ContinueOnConvergenceError>
("Continue with a non-converged solution instead of giving up "
"if we encounter a time step size smaller than the minimum time "
"step size.");
@ -575,7 +575,7 @@ public:
* step size.
*/
bool continueOnConvergenceError() const
{ return Parameters::get<TypeTag, Properties::ContinueOnConvergenceError>(); }
{ return Parameters::get<TypeTag, Parameters::ContinueOnConvergenceError>(); }
/*!
* \brief Impose the next time step size to be used externally.

View File

@ -215,14 +215,6 @@ struct VtkOutputFormat { using type = UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct EnableConstraints { using type = UndefinedProperty; };
/*!
* \brief Continue with a non-converged solution instead of giving up
* if we encounter a time step size smaller than the minimum time
* step size.
*/
template<class TypeTag, class MyTypeTag>
struct ContinueOnConvergenceError { using type = UndefinedProperty; };
/*!
* \brief Specify whether all intensive quantities for the grid should be
* cached in the discretization.