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

Thyra Base interface for time steppers. More...

#include <Tempus_Integrator.hpp>

Inheritance diagram for Tempus::Stepper< Scalar >:
Tempus::StepperExplicit< Scalar > Tempus::StepperImplicit< Scalar > Tempus::StepperOperatorSplit< Scalar > Tempus::StepperStaggeredForwardSensitivity< Scalar > Tempus::StepperExplicitRK< Scalar > Tempus::StepperForwardEuler< Scalar > Tempus::StepperLeapfrog< Scalar > Tempus::StepperNewmarkExplicitAForm< Scalar > Tempus::StepperBackwardEuler< Scalar > Tempus::StepperBDF2< Scalar > Tempus::StepperDIRK< Scalar > Tempus::StepperHHTAlpha< Scalar > Tempus::StepperIMEX_RK< Scalar > Tempus::StepperIMEX_RK_Partition< Scalar > Tempus::StepperNewmarkImplicitAForm< Scalar > Tempus::StepperNewmarkImplicitDForm< Scalar > Tempus::StepperTrapezoidal< Scalar >

Public Member Functions

virtual void modelWarning () const
 
Basic stepper methods
virtual void setModel (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)=0
 
virtual void setNonConstModel (const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &appModel)=0
 
virtual Teuchos::RCP< const
Thyra::ModelEvaluator< Scalar > > 
getModel ()=0
 
virtual void setSolver (std::string solverName)=0
 Set solver via ParameterList solver name. More...
 
virtual void setSolver (Teuchos::RCP< Teuchos::ParameterList > solverPL=Teuchos::null)=0
 Set solver via solver ParameterList. More...
 
virtual void setSolver (Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver)=0
 Set solver. More...
 
virtual Teuchos::RCP
< Thyra::NonlinearSolverBase
< Scalar > > 
getSolver () const =0
 Get solver. More...
 
virtual void setObserver (Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)=0
 Set Observer. More...
 
virtual void initialize ()=0
 Initialize during construction and after changing input parameters. More...
 
virtual void setInitialConditions (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)=0
 Set initial conditions, make them consistent, and set stepper memory. More...
 
virtual void takeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)=0
 Take the specified timestep, dt, and return true if successful. More...
 
virtual void setInitialGuess (Teuchos::RCP< const Thyra::VectorBase< Scalar > > initial_guess=Teuchos::null)=0
 Pass initial guess to Newton solver (for implicit schemes) More...
 
virtual std::string getStepperType () const =0
 
virtual Teuchos::RCP
< Tempus::StepperState< Scalar > > 
getDefaultStepperState ()=0
 
virtual Scalar getOrder () const =0
 
virtual Scalar getOrderMin () const =0
 
virtual Scalar getOrderMax () const =0
 
virtual Scalar getInitTimeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) const =0
 
virtual Teuchos::RCP
< Teuchos::ParameterList > 
getDefaultParameters () const =0
 
virtual bool isExplicit () const =0
 
virtual bool isImplicit () const =0
 
virtual bool isExplicitImplicit () const =0
 
virtual bool isOneStepMethod () const =0
 
virtual bool isMultiStepMethod () const =0
 
virtual OrderODE getOrderODE () const =0
 
virtual void setUseFSAL (bool a)=0
 
virtual bool getUseFSAL () const =0
 
virtual void setICConsistency (std::string s)=0
 
virtual std::string getICConsistency () const =0
 
virtual void setICConsistencyCheck (bool c)=0
 
virtual bool getICConsistencyCheck () const =0
 
void getValidParametersBasic (Teuchos::RCP< Teuchos::ParameterList > pl) const
 
Functions for Steppers with subSteppers (e.g., OperatorSplit)
virtual void createSubSteppers (std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > >)
 
Helper functions
void validExplicitODE (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model) const
 Validate that the model supports explicit ODE evaluation, f(x,t) [=xdot]. More...
 
void validSecondOrderExplicitODE (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model) const
 Validate that the model supports explicit second order ODE evaluation, f(x,xdot,t) [=xdotdot]. More...
 
void validImplicitODE_DAE (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model) const
 Validate ME supports implicit ODE/DAE evaluation, f(xdot,x,t) [= 0]. More...
 
void validSecondOrderODE_DAE (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model) const
 Validate ME supports 2nd order implicit ODE/DAE evaluation, f(xdotdot,xdot,x,t) [= 0]. More...
 
Teuchos::RCP
< Teuchos::ParameterList > 
defaultSolverParameters () const
 

Detailed Description

template<typename Scalar>
class Tempus::Stepper< Scalar >

Thyra Base interface for time steppers.

Design Considerations

  • Time steppers are designed to take a single time step.
    • a single implicit solve for a time step
    • a single solve for a IMEX time step
  • Multiple time steps should be managed by Integrators.
  • Steppers can be built from other Sub-Steppers.
    • An operator-split Stepper is possible with interoperable Steppers.
  • For explicit steppers, only one ModelEvaluator and one solution vector are required.
  • For implicit steppers, only one ModelEvaluator, one solution vector, and one solver are required.
  • Steppers will PASS/FAIL the time step based on Solver, error and order requirements, and not adjust the time step size.
  • Steppers can provide a suggested time step size for the next time step.
  • For more complex steppers, multiple ModelEvaluators, solution vectors, and solvers are possible when a common single time-integration method is desired for all solutions. Examples:
    • Solution A with ModelEvaluator A and Solution B with ModelEvaluator B using the same solver
    • Solution A with ModelEvaluator A using Solver A and Solution B with ModelEvaluator B using Solver B
    • Solution A with ModelEvaluator A using Solver A and Solutions A and B with ModelEvaluator C using Solver B
  • Steppers may maintain their own time history of the solution, e.g., BDF steppers.

CS Design Considerations

  • All input parameters (i.e., ParameterList) can be set by public methods.
  • The Stepper ParameterList must be consistent.
    • The "set" methods which update parameters in the ParameterList must update the Stepper ParameterList.

Definition at line 24 of file Tempus_Integrator.hpp.

Member Function Documentation

template<typename Scalar>
virtual void Tempus::Stepper< Scalar >::createSubSteppers ( std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > >  )
inlinevirtual

Reimplemented in Tempus::StepperOperatorSplit< Scalar >.

Definition at line 150 of file Tempus_Stepper_decl.hpp.

template<class Scalar >
Teuchos::RCP< Teuchos::ParameterList > Tempus::Stepper< Scalar >::defaultSolverParameters ( ) const

Definition at line 243 of file Tempus_Stepper_impl.hpp.

template<typename Scalar>
virtual std::string Tempus::Stepper< Scalar >::getICConsistency ( ) const
pure virtual
template<typename Scalar>
virtual bool Tempus::Stepper< Scalar >::getICConsistencyCheck ( ) const
pure virtual
template<typename Scalar>
virtual Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> > Tempus::Stepper< Scalar >::getSolver ( ) const
pure virtual
template<class Scalar >
void Tempus::Stepper< Scalar >::getValidParametersBasic ( Teuchos::RCP< Teuchos::ParameterList >  pl) const

Definition at line 17 of file Tempus_Stepper_impl.hpp.

template<class Scalar >
void Tempus::Stepper< Scalar >::modelWarning ( ) const
virtual

Definition at line 77 of file Tempus_Stepper_impl.hpp.

template<typename Scalar>
virtual void Tempus::Stepper< Scalar >::setICConsistency ( std::string  s)
pure virtual
template<typename Scalar>
virtual void Tempus::Stepper< Scalar >::setICConsistencyCheck ( bool  c)
pure virtual
template<typename Scalar>
virtual void Tempus::Stepper< Scalar >::setInitialGuess ( Teuchos::RCP< const Thyra::VectorBase< Scalar > >  initial_guess = Teuchos::null)
pure virtual
template<typename Scalar>
virtual void Tempus::Stepper< Scalar >::setNonConstModel ( const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &  appModel)
pure virtual
template<typename Scalar>
virtual void Tempus::Stepper< Scalar >::setSolver ( std::string  solverName)
pure virtual
template<typename Scalar>
virtual void Tempus::Stepper< Scalar >::setSolver ( Teuchos::RCP< Teuchos::ParameterList >  solverPL = Teuchos::null)
pure virtual
template<typename Scalar>
virtual void Tempus::Stepper< Scalar >::setSolver ( Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > >  solver)
pure virtual
template<typename Scalar>
virtual void Tempus::Stepper< Scalar >::setUseFSAL ( bool  a)
pure virtual
template<class Scalar >
void Tempus::Stepper< Scalar >::validExplicitODE ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  model) const

Validate that the model supports explicit ODE evaluation, f(x,t) [=xdot].

Currently the convention to evaluate f(x,t) is to set xdot=null! There is no InArgs support to test if xdot is null, so we set xdot=null and hopefully the ModelEvaluator can handle it.

Definition at line 90 of file Tempus_Stepper_impl.hpp.

template<class Scalar >
void Tempus::Stepper< Scalar >::validImplicitODE_DAE ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  model) const

Validate ME supports implicit ODE/DAE evaluation, f(xdot,x,t) [= 0].

Definition at line 148 of file Tempus_Stepper_impl.hpp.

template<class Scalar >
void Tempus::Stepper< Scalar >::validSecondOrderExplicitODE ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  model) const

Validate that the model supports explicit second order ODE evaluation, f(x,xdot,t) [=xdotdot].

Currently the convention to evaluate f(x,xdot,t) is to set xdotdot=null! There is no InArgs support to test if xdotdot is null, so we set xdotdot=null and hopefully the ModelEvaluator can handle it.

Definition at line 117 of file Tempus_Stepper_impl.hpp.

template<class Scalar >
void Tempus::Stepper< Scalar >::validSecondOrderODE_DAE ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  model) const

Validate ME supports 2nd order implicit ODE/DAE evaluation, f(xdotdot,xdot,x,t) [= 0].

Definition at line 193 of file Tempus_Stepper_impl.hpp.


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