changed: move the MinTimeStepSize parameter to Opm::Parameters

This commit is contained in:
Arne Morten Kvarving 2024-06-28 12:16:28 +02:00
parent eaa75856c6
commit b7cf4b8132
4 changed files with 18 additions and 18 deletions

View File

@ -221,14 +221,6 @@ struct UseLinearizationLock<TypeTag, TTag::FvBaseDiscretization> { static conste
template<class TypeTag>
struct Linearizer<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseLinearizer<TypeTag>; };
//! By default, accept any time step larger than zero
template<class TypeTag>
struct MinTimeStepSize<TypeTag, TTag::FvBaseDiscretization>
{
using type = GetPropType<TypeTag, Scalar>;
static constexpr type value = 0.0;
};
//! Set the format of the VTK output to ASCII by default
template<class TypeTag>
struct VtkOutputFormat<TypeTag, TTag::FvBaseDiscretization> { static constexpr int value = Dune::VTK::ascii; };
@ -345,6 +337,14 @@ struct MaxTimeStepSize<TypeTag, Properties::TTag::FvBaseDiscretization>
static constexpr type value = std::numeric_limits<type>::infinity();
};
//! By default, accept any time step larger than zero
template<class TypeTag>
struct MinTimeStepSize<TypeTag, Properties::TTag::FvBaseDiscretization>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 0.0;
};
} // namespace Opm::Parameters
namespace Opm {

View File

@ -81,6 +81,14 @@ struct EnableAsyncVtkOutput { using type = Properties::UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct MaxTimeStepSize { using type = Properties::UndefinedProperty; };
/*!
* \brief Specify the minimal size of a time integration [s].
*
* The default is to not limit the step size.
*/
template<class TypeTag, class MyTypeTag>
struct MinTimeStepSize { using type = Properties::UndefinedProperty; };
} // namespace Opm::Parameters
#endif

View File

@ -171,7 +171,7 @@ public:
Model::registerParameters();
Parameters::registerParam<TypeTag, Parameters::MaxTimeStepSize>
("The maximum size to which all time steps are limited to [s]");
Parameters::registerParam<TypeTag, Properties::MinTimeStepSize>
Parameters::registerParam<TypeTag, Parameters::MinTimeStepSize>
("The minimum size to which all time steps are limited to [s]");
Parameters::registerParam<TypeTag, Properties::MaxTimeStepDivisions>
("The maximum number of divisions by two of the timestep size "
@ -560,7 +560,7 @@ public:
* \brief Returns the minimum allowable size of a time step.
*/
Scalar minTimeStepSize() const
{ return Parameters::get<TypeTag, Properties::MinTimeStepSize>(); }
{ return Parameters::get<TypeTag, Parameters::MinTimeStepSize>(); }
/*!
* \brief Returns the maximum number of subsequent failures for the time integration

View File

@ -215,14 +215,6 @@ struct VtkOutputFormat { using type = UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct EnableConstraints { using type = UndefinedProperty; };
/*!
* \brief Specify the minimal size of a time integration [s].
*
* The default is to not limit the step size.
*/
template<class TypeTag, class MyTypeTag>
struct MinTimeStepSize { using type = UndefinedProperty; };
/*!
* \brief The maximum allowed number of timestep divisions for the
* Newton solver.