diff --git a/dumux/common/basicproperties.hh b/dumux/common/basicproperties.hh index 9d34445ddf509628aae398709bc2f94d581930bc..e6247e59115b81fca21d96feb5301f3409a4f439 100644 --- a/dumux/common/basicproperties.hh +++ b/dumux/common/basicproperties.hh @@ -74,6 +74,13 @@ NEW_PROP_TAG(ModelParameterGroup); //! Property which provides a GridCreator (manages grids) NEW_PROP_TAG(GridCreator); +/*! + * \brief Specify the maximum size of a time integration [s]. + * + * The default is to not limit the step size. + */ +NEW_PROP_TAG(TimeManagerMaxTimeStepSize); + //! Property to define the output level NEW_PROP_TAG(VtkOutputLevel); @@ -86,6 +93,9 @@ NEW_PROP_TAG(VtkOutputLevel); //! Set the default type of scalar values to double SET_TYPE_PROP(NumericModel, Scalar, double); +//! use an unlimited time step size by default +SET_SCALAR_PROP(NumericModel, TimeManagerMaxTimeStepSize, std::numeric_limits<typename GET_PROP_TYPE(TypeTag,Scalar)>::max()); + //! Set the ParameterTree property SET_PROP(NumericModel, ParameterTree) { diff --git a/dumux/common/timemanager.hh b/dumux/common/timemanager.hh index 191da8a7095b879ffbeb51e626241a8332e2a391..972bfa5854c34d918269a8c3653a508fa258947f 100644 --- a/dumux/common/timemanager.hh +++ b/dumux/common/timemanager.hh @@ -244,7 +244,8 @@ public: return 0.0; return - std::min(episodeMaxTimeStepSize(), + std::min(std::min(episodeMaxTimeStepSize(), + GET_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, MaxTimeStepSize)), std::max<Scalar>(0.0, endTime() - time())); }; diff --git a/dumux/implicit/common/implicitproblem.hh b/dumux/implicit/common/implicitproblem.hh index 97979e658c53a20248539dcc1f8207aac67c5c7f..0f0af3616de0d18bf10746f818f85918c2ff1037 100644 --- a/dumux/implicit/common/implicitproblem.hh +++ b/dumux/implicit/common/implicitproblem.hh @@ -563,8 +563,7 @@ public: */ Scalar nextTimeStepSize(const Scalar dt) { - return std::min(GET_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, MaxTimeStepSize), - newtonCtl_.suggestTimeStepSize(dt)); + return newtonCtl_.suggestTimeStepSize(dt); }; /*! diff --git a/dumux/implicit/common/implicitproperties.hh b/dumux/implicit/common/implicitproperties.hh index 308fb942a491d4911909a4d1b1fff612fdf2a19e..5b9574598a6df1911d4f115d1b645b4f2c9e4f92 100644 --- a/dumux/implicit/common/implicitproperties.hh +++ b/dumux/implicit/common/implicitproperties.hh @@ -95,12 +95,6 @@ NEW_PROP_TAG(ImplicitEnableJacobianRecycling); //! elements where at least one vertex is above the specified //! tolerance NEW_PROP_TAG(ImplicitEnablePartialReassemble); -/*! - * \brief Specify the maximum size of a time integration [s]. - * - * The default is to not limit the step size. - */ -NEW_PROP_TAG(TimeManagerMaxTimeStepSize); /*! * \brief Specify which kind of method should be used to numerically diff --git a/dumux/implicit/common/implicitpropertydefaults.hh b/dumux/implicit/common/implicitpropertydefaults.hh index ea67ef01429c988b4061445875cbf039da414617..1b5a3cf5c3fb2aa5fc3395bb522c6e1697a396bd 100644 --- a/dumux/implicit/common/implicitpropertydefaults.hh +++ b/dumux/implicit/common/implicitpropertydefaults.hh @@ -108,9 +108,6 @@ SET_TYPE_PROP(ImplicitBase, BoundaryTypes, Dumux::BoundaryTypes<GET_PROP_VALUE(TypeTag, NumEq)>); -//! use an unlimited time step size by default -SET_SCALAR_PROP(ImplicitBase, TimeManagerMaxTimeStepSize, 1e100); - //! use forward differences to calculate the jacobian by default SET_INT_PROP(ImplicitBase, ImplicitNumericDifferenceMethod, +1);