mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 09:16:27 -06:00
changed: move the MaxTimeStepSize parameter to Opm::Parameters
This commit is contained in:
parent
d1f3411a66
commit
eaa75856c6
@ -80,14 +80,6 @@ struct FluidSystem<TypeTag, TTag::CuvetteBaseProblem>
|
||||
template<class TypeTag>
|
||||
struct EnableGravity<TypeTag, TTag::CuvetteBaseProblem> { static constexpr bool value = true; };
|
||||
|
||||
// Set the maximum time step
|
||||
template<class TypeTag>
|
||||
struct MaxTimeStepSize<TypeTag, TTag::CuvetteBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 600.;
|
||||
};
|
||||
|
||||
// Set the material Law
|
||||
template<class TypeTag>
|
||||
struct MaterialLaw<TypeTag, TTag::CuvetteBaseProblem>
|
||||
@ -146,6 +138,18 @@ struct GridFile<TypeTag, TTag::CuvetteBaseProblem> { static constexpr auto value
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm::Parameters {
|
||||
|
||||
// Set the maximum time step
|
||||
template<class TypeTag>
|
||||
struct MaxTimeStepSize<TypeTag, Properties::TTag::CuvetteBaseProblem>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = 600.;
|
||||
};
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
/*!
|
||||
* \ingroup TestProblems
|
||||
|
@ -221,14 +221,6 @@ struct UseLinearizationLock<TypeTag, TTag::FvBaseDiscretization> { static conste
|
||||
template<class TypeTag>
|
||||
struct Linearizer<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseLinearizer<TypeTag>; };
|
||||
|
||||
//! use an unlimited time step size by default
|
||||
template<class TypeTag>
|
||||
struct MaxTimeStepSize<TypeTag, TTag::FvBaseDiscretization>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = std::numeric_limits<type>::infinity();
|
||||
};
|
||||
|
||||
//! By default, accept any time step larger than zero
|
||||
template<class TypeTag>
|
||||
struct MinTimeStepSize<TypeTag, TTag::FvBaseDiscretization>
|
||||
@ -345,6 +337,14 @@ template<class TypeTag>
|
||||
struct EnableAsyncVtkOutput<TypeTag, Properties::TTag::FvBaseDiscretization>
|
||||
{ static constexpr bool value = true; };
|
||||
|
||||
//! use an unlimited time step size by default
|
||||
template<class TypeTag>
|
||||
struct MaxTimeStepSize<TypeTag, Properties::TTag::FvBaseDiscretization>
|
||||
{
|
||||
using type = GetPropType<TypeTag, Properties::Scalar>;
|
||||
static constexpr type value = std::numeric_limits<type>::infinity();
|
||||
};
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
namespace Opm {
|
||||
|
@ -73,6 +73,14 @@ struct EnableVtkOutput { using type = Properties::UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableAsyncVtkOutput { using type = Properties::UndefinedProperty; };
|
||||
|
||||
/*!
|
||||
* \brief Specify the maximum size of a time integration [s].
|
||||
*
|
||||
* The default is to not limit the step size.
|
||||
*/
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaxTimeStepSize { using type = Properties::UndefinedProperty; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
#endif
|
||||
|
@ -169,7 +169,7 @@ public:
|
||||
static void registerParameters()
|
||||
{
|
||||
Model::registerParameters();
|
||||
Parameters::registerParam<TypeTag, Properties::MaxTimeStepSize>
|
||||
Parameters::registerParam<TypeTag, Parameters::MaxTimeStepSize>
|
||||
("The maximum size to which all time steps are limited to [s]");
|
||||
Parameters::registerParam<TypeTag, Properties::MinTimeStepSize>
|
||||
("The minimum size to which all time steps are limited to [s]");
|
||||
@ -593,7 +593,7 @@ public:
|
||||
if (nextTimeStepSize_ > 0.0)
|
||||
return nextTimeStepSize_;
|
||||
|
||||
Scalar dtNext = std::min(Parameters::get<TypeTag, Properties::MaxTimeStepSize>(),
|
||||
Scalar dtNext = std::min(Parameters::get<TypeTag, Parameters::MaxTimeStepSize>(),
|
||||
newtonMethod().suggestTimeStepSize(simulator().timeStepSize()));
|
||||
|
||||
if (dtNext < simulator().maxTimeStepSize()
|
||||
|
@ -215,14 +215,6 @@ struct VtkOutputFormat { using type = UndefinedProperty; };
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EnableConstraints { using type = UndefinedProperty; };
|
||||
|
||||
/*!
|
||||
* \brief Specify the maximum size of a time integration [s].
|
||||
*
|
||||
* The default is to not limit the step size.
|
||||
*/
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct MaxTimeStepSize { using type = UndefinedProperty; };
|
||||
|
||||
/*!
|
||||
* \brief Specify the minimal size of a time integration [s].
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user