Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus::TimeStepControlStrategyBasicVS< Scalar > Class Template Reference

StepControlStrategy class for TimeStepControl. More...

#include <Tempus_TimeStepControlStrategyBasicVS.hpp>

Inheritance diagram for Tempus::TimeStepControlStrategyBasicVS< Scalar >:
Tempus::TimeStepControlStrategy< Scalar >

Public Member Functions

 TimeStepControlStrategyBasicVS (Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
 Constructor. More...
 
virtual ~TimeStepControlStrategyBasicVS ()
 Destructor. More...
 
virtual void getNextTimeStep (const TimeStepControl< Scalar > tsc, Teuchos::RCP< SolutionHistory< Scalar > > solutionHistory, Status &) override
 Determine the time step size. More...
 
virtual Scalar getAmplFactor () const
 
virtual Scalar getReductFactor () const
 
virtual Scalar getMinEta () const
 
virtual Scalar getMaxEta () const
 
Scalar computeEta (const TimeStepControl< Scalar > tsc, const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
 
Overridden from Teuchos::ParameterListAcceptor
void setParameterList (const Teuchos::RCP< Teuchos::ParameterList > &pList) override
 
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidParameters () const override
 
Teuchos::RCP
< Teuchos::ParameterList > 
getNonconstParameterList () override
 
Teuchos::RCP
< Teuchos::ParameterList > 
unsetParameterList () override
 
- Public Member Functions inherited from Tempus::TimeStepControlStrategy< Scalar >
 TimeStepControlStrategy ()
 Constructor. More...
 
virtual ~TimeStepControlStrategy ()
 Destructor. More...
 
void setParameterList (const Teuchos::RCP< Teuchos::ParameterList > &)
 
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidParameters () const
 
Teuchos::RCP
< Teuchos::ParameterList > 
getNonconstParameterList ()
 
Teuchos::RCP
< Teuchos::ParameterList > 
unsetParameterList ()
 

Private Attributes

Teuchos::RCP
< Teuchos::ParameterList > 
tscsPL_
 

Detailed Description

template<class Scalar>
class Tempus::TimeStepControlStrategyBasicVS< Scalar >

StepControlStrategy class for TimeStepControl.

This TimeStepControlStrategy primarily tries to maintain a certain level of change in the solution ill-respective of the error involved, e.g., the solution should change by 1% every time step. The relative solution change is measured by

\[ \eta_{n-1} = \frac{|| x_{n-1} - x_{n-2} ||}{ || x_{n-2} || + \epsilon } \]

where $\epsilon$ is a small constant to ensure that $\eta_n$ remains finite. The user can select the desired relative change in the solution by choosing a range for $\eta_n$

\[ \eta_{min} < \eta_n < \eta_{max} \]

If the solution change is outside this range, an amplification ( $\rho$) or reduction factor ( $\sigma$) is applied to the timestep to bring the solution change back into the desired range. This can be written as

\[ \Delta t_n = \left\{ \begin{array}{rll} \sigma \Delta t_{n-1} & \mbox{if $\eta_{n-1} > \eta_{max}$} & \mbox{where $0 < \sigma < 1$} \\ \rho \Delta t_{n-1} & \mbox{else if $\eta_{n-1} < \eta_{min}$} & \mbox{where $\rho > 1$} \\ \Delta t_{n-1} & \mbox{else if $\eta_{min}<\eta_{n-1}<\eta_{max}$} \\ \end{array} \right. \]

In the full implementation, several other mechanisms can amplify or reduce the timestep.

  • Stepper fails
  • Maximum Absolute error, $e_{abs}^{max}$
  • Maximum Relative error, $e_{rel}^{max}$
  • Order, $p$

    \[ \Delta t_n = \left\{ \begin{array}{rll} \sigma \Delta t_{n-1} & \mbox{if Stepper fails} & \mbox{where $0 < \sigma < 1$} \\ \rho \Delta t_{n-1} & \mbox{else if $\eta_{n-1} < \eta_{min}$} & \mbox{where $\rho > 1$} \\ \sigma \Delta t_{n-1} & \mbox{else if $\eta_{n-1} > \eta_{max}$} & \mbox{where $0 < \sigma < 1$} \\ \sigma \Delta t_{n-1} & \mbox{else if $e_{abs} > e_{abs}^{max}$} & \mbox{where $0 < \sigma < 1$} \\ \sigma \Delta t_{n-1} & \mbox{else if $e_{rel} > e_{rel}^{max}$} & \mbox{where $0 < \sigma < 1$} \\ \rho \Delta t_{n-1} & \mbox{else if $p < p_{min}$} & \mbox{where $\rho > 1$} \\ \sigma \Delta t_{n-1} & \mbox{else if $p > p_{max}$} & \mbox{where $0 < \sigma < 1$} \\ \Delta t_{n-1} & \mbox{else} & \\ \end{array} \right. \]

Note

  • Only one amplification or reduction is applied each timestep.
  • The priority is specified by the order of list.
  • The timestep, $\Delta t_n$, is still constrained to the maximum and minimum timestep size. $\Delta t_{min} < \Delta t_n < \Delta t_{max}$
  • If $ \eta_{min} < \eta_n < \eta_{max}$, the timestep is unchanged, i.e., constant timestep size.
  • To have constant timesteps, set $\eta_{min}=0$ and $\eta_{max}=10^{16}$. These are the defaults.
  • From (Denner, 2014), amplification factor, $\rho$, is required to be less than 1.91 for stability ( $\rho < 1.91$).
  • Denner (2014) suggests that $\eta_{min} = 0.1*\eta_{max}$ and the numerical tests confirm this for their problems.

References

Section 2.2.1 / Algorithm 2.4 of A. Denner, "Experiments on Temporal Variable Step BDF2 Algorithms", Masters Thesis, U Wisconsin-Madison, 2014.

Definition at line 105 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

Constructor & Destructor Documentation

template<class Scalar >
Tempus::TimeStepControlStrategyBasicVS< Scalar >::TimeStepControlStrategyBasicVS ( Teuchos::RCP< Teuchos::ParameterList >  pList = Teuchos::null)
inline

Constructor.

Definition at line 111 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
virtual Tempus::TimeStepControlStrategyBasicVS< Scalar >::~TimeStepControlStrategyBasicVS ( )
inlinevirtual

Destructor.

Definition at line 117 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

Member Function Documentation

template<class Scalar >
Scalar Tempus::TimeStepControlStrategyBasicVS< Scalar >::computeEta ( const TimeStepControl< Scalar >  tsc,
const Teuchos::RCP< SolutionHistory< Scalar > > &  solutionHistory 
)
inline

Definition at line 288 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeStepControlStrategyBasicVS< Scalar >::getAmplFactor ( ) const
inlinevirtual

Definition at line 279 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeStepControlStrategyBasicVS< Scalar >::getMaxEta ( ) const
inlinevirtual

Definition at line 285 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeStepControlStrategyBasicVS< Scalar >::getMinEta ( ) const
inlinevirtual

Definition at line 283 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
virtual void Tempus::TimeStepControlStrategyBasicVS< Scalar >::getNextTimeStep ( const TimeStepControl< Scalar >  tsc,
Teuchos::RCP< SolutionHistory< Scalar > >  solutionHistory,
Status  
)
inlineoverridevirtual

Determine the time step size.

Reimplemented from Tempus::TimeStepControlStrategy< Scalar >.

Definition at line 120 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
Teuchos::RCP<Teuchos::ParameterList> Tempus::TimeStepControlStrategyBasicVS< Scalar >::getNonconstParameterList ( )
inlineoverride

Definition at line 268 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeStepControlStrategyBasicVS< Scalar >::getReductFactor ( ) const
inlinevirtual

Definition at line 281 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
Teuchos::RCP<const Teuchos::ParameterList> Tempus::TimeStepControlStrategyBasicVS< Scalar >::getValidParameters ( ) const
inlineoverride

Definition at line 253 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
void Tempus::TimeStepControlStrategyBasicVS< Scalar >::setParameterList ( const Teuchos::RCP< Teuchos::ParameterList > &  pList)
inlineoverride

Definition at line 223 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

template<class Scalar >
Teuchos::RCP<Teuchos::ParameterList> Tempus::TimeStepControlStrategyBasicVS< Scalar >::unsetParameterList ( )
inlineoverride

Definition at line 272 of file Tempus_TimeStepControlStrategyBasicVS.hpp.

Member Data Documentation

template<class Scalar >
Teuchos::RCP<Teuchos::ParameterList> Tempus::TimeStepControlStrategyBasicVS< Scalar >::tscsPL_
private

Definition at line 335 of file Tempus_TimeStepControlStrategyBasicVS.hpp.


The documentation for this class was generated from the following file: