Skip to content
Snippets Groups Projects
Commit f0e07930 authored by Benjamin Faigle's avatar Benjamin Faigle
Browse files

Make TimeManagerMaxTimeStepSize a general feature by:

-moving the property to NumericalModel
-removing it from implicit properties and ~defaults
-moving query from implicitproblem.hh to the same method in timeManager.hh
reviewed by Klaus

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10110 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 1aa27d4e
No related branches found
No related tags found
No related merge requests found
...@@ -74,6 +74,13 @@ NEW_PROP_TAG(ModelParameterGroup); ...@@ -74,6 +74,13 @@ NEW_PROP_TAG(ModelParameterGroup);
//! Property which provides a GridCreator (manages grids) //! Property which provides a GridCreator (manages grids)
NEW_PROP_TAG(GridCreator); 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 //! Property to define the output level
NEW_PROP_TAG(VtkOutputLevel); NEW_PROP_TAG(VtkOutputLevel);
...@@ -86,6 +93,9 @@ NEW_PROP_TAG(VtkOutputLevel); ...@@ -86,6 +93,9 @@ NEW_PROP_TAG(VtkOutputLevel);
//! Set the default type of scalar values to double //! Set the default type of scalar values to double
SET_TYPE_PROP(NumericModel, Scalar, 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 the ParameterTree property
SET_PROP(NumericModel, ParameterTree) SET_PROP(NumericModel, ParameterTree)
{ {
......
...@@ -244,7 +244,8 @@ public: ...@@ -244,7 +244,8 @@ public:
return 0.0; return 0.0;
return return
std::min(episodeMaxTimeStepSize(), std::min(std::min(episodeMaxTimeStepSize(),
GET_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, MaxTimeStepSize)),
std::max<Scalar>(0.0, endTime() - time())); std::max<Scalar>(0.0, endTime() - time()));
}; };
......
...@@ -563,8 +563,7 @@ public: ...@@ -563,8 +563,7 @@ public:
*/ */
Scalar nextTimeStepSize(const Scalar dt) Scalar nextTimeStepSize(const Scalar dt)
{ {
return std::min(GET_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, MaxTimeStepSize), return newtonCtl_.suggestTimeStepSize(dt);
newtonCtl_.suggestTimeStepSize(dt));
}; };
/*! /*!
......
...@@ -95,12 +95,6 @@ NEW_PROP_TAG(ImplicitEnableJacobianRecycling); ...@@ -95,12 +95,6 @@ NEW_PROP_TAG(ImplicitEnableJacobianRecycling);
//! elements where at least one vertex is above the specified //! elements where at least one vertex is above the specified
//! tolerance //! tolerance
NEW_PROP_TAG(ImplicitEnablePartialReassemble); 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 * \brief Specify which kind of method should be used to numerically
......
...@@ -108,9 +108,6 @@ SET_TYPE_PROP(ImplicitBase, ...@@ -108,9 +108,6 @@ SET_TYPE_PROP(ImplicitBase,
BoundaryTypes, BoundaryTypes,
Dumux::BoundaryTypes<GET_PROP_VALUE(TypeTag, NumEq)>); 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 //! use forward differences to calculate the jacobian by default
SET_INT_PROP(ImplicitBase, ImplicitNumericDifferenceMethod, +1); SET_INT_PROP(ImplicitBase, ImplicitNumericDifferenceMethod, +1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment