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

TimeStepControl manages the time step size. There several mechanicisms that effect the time step size and handled with this class: More...

#include <Tempus_Integrator.hpp>

Inheritance diagram for Tempus::TimeStepControl< Scalar >:

Public Member Functions

 TimeStepControl (Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
 Constructor. More...
 
 TimeStepControl (const TimeStepControl< Scalar > &tsc)
 This is a copy constructor. More...
 
virtual ~TimeStepControl ()
 Destructor. More...
 
virtual void initialize (Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
 
virtual void getNextTimeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory, Status &integratorStatus)
 Determine the time step size. More...
 
virtual bool timeInRange (const Scalar time) const
 Check if time is within minimum and maximum time. More...
 
virtual bool indexInRange (const int iStep) const
 Check if time step index is within minimum and maximum index. More...
 
virtual void setTimeStepControlStrategy (Teuchos::RCP< TimeStepControlStrategy< Scalar > > tscs=Teuchos::null)
 Set the TimeStepControlStrategy. More...
 
Overridden from Teuchos::ParameterListAccepto{}
void setParameterList (const Teuchos::RCP< Teuchos::ParameterList > &pl)
 
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidParameters () const
 
Teuchos::RCP
< Teuchos::ParameterList > 
getNonconstParameterList ()
 
Teuchos::RCP
< Teuchos::ParameterList > 
unsetParameterList ()
 
Overridden from Teuchos::Describable
std::string description () const
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 
Get ParameterList values
virtual Scalar getInitTime () const
 
virtual Scalar getFinalTime () const
 
virtual Scalar getMinTimeStep () const
 
virtual Scalar getInitTimeStep () const
 
virtual Scalar getMaxTimeStep () const
 
virtual int getInitIndex () const
 
virtual int getFinalIndex () const
 
virtual Scalar getMaxAbsError () const
 
virtual Scalar getMaxRelError () const
 
virtual int getMinOrder () const
 
virtual int getInitOrder () const
 
virtual int getMaxOrder () const
 
virtual std::string getStepType () const
 
virtual bool getOutputExactly () const
 
virtual std::vector< int > getOutputIndices () const
 
virtual std::vector< Scalar > getOutputTimes () const
 
virtual int getMaxFailures () const
 
virtual int getMaxConsecFailures () const
 
virtual int getNumTimeSteps () const
 
virtual Teuchos::RCP
< TimeStepControlStrategyComposite
< Scalar > > 
getTimeStepControlStrategy () const
 
Set ParameterList values
virtual void setInitTime (Scalar InitTime)
 
virtual void setFinalTime (Scalar FinalTime)
 
virtual void setMinTimeStep (Scalar MinTimeStep)
 
virtual void setInitTimeStep (Scalar InitTimeStep)
 
virtual void setMaxTimeStep (Scalar MaxTimeStep)
 
virtual void setInitIndex (int InitIndex)
 
virtual void setFinalIndex (int FinalIndex)
 
virtual void setMaxAbsError (Scalar MaxAbsError)
 
virtual void setMaxRelError (Scalar MaxRelError)
 
virtual void setMinOrder (int MinOrder)
 
virtual void setInitOrder (int InitOrder)
 
virtual void setMaxOrder (int MaxOrder)
 
virtual void setStepType (std::string StepType)
 
virtual void setOutputExactly (bool OutputExactly)
 
virtual void setOutputIndices (std::vector< int > OutputIndices)
 
virtual void setOutputTimes (std::vector< Scalar > OutputTimes)
 
virtual void setMaxFailures (int MaxFailures)
 
virtual void setMaxConsecFailures (int MaxConsecFailures)
 
virtual void setNumTimeSteps (int numTimeSteps)
 

Protected Attributes

Teuchos::RCP
< Teuchos::ParameterList > 
tscPL_
 
std::vector< int > outputIndices_
 Vector of output indices. More...
 
std::vector< Scalar > outputTimes_
 Vector of output times. More...
 
bool outputAdjustedDt_
 Flag indicating that dt was adjusted for output. More...
 
Scalar dtAfterOutput_
 dt to reinstate after output step. More...
 
Teuchos::RCP
< TimeStepControlStrategyComposite
< Scalar > > 
stepControlStrategy_
 

Detailed Description

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

TimeStepControl manages the time step size. There several mechanicisms that effect the time step size and handled with this class:

  • Maximum and minimum time
  • Maximum and minimum time index
  • Maximum and minimum time step size
  • Maximum and minimum error
  • Maximum and minimum order
  • Startup considerations (e.g., ramping)
  • Solution and/or diagnostic output Additional step control can be added through the step control observer, or inheriting from this class.
  • Stability limits (e.g., CFL number)

Definition at line 26 of file Tempus_Integrator.hpp.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 30 of file Tempus_TimeStepControl_impl.hpp.

template<class Scalar >
Tempus::TimeStepControl< Scalar >::TimeStepControl ( const TimeStepControl< Scalar > &  tsc)

This is a copy constructor.

Definition at line 38 of file Tempus_TimeStepControl_impl.hpp.

template<typename Scalar>
virtual Tempus::TimeStepControl< Scalar >::~TimeStepControl ( )
inlinevirtual

Destructor.

Definition at line 57 of file Tempus_TimeStepControl_decl.hpp.

Member Function Documentation

template<class Scalar >
void Tempus::TimeStepControl< Scalar >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel 
) const

Definition at line 297 of file Tempus_TimeStepControl_impl.hpp.

template<class Scalar >
std::string Tempus::TimeStepControl< Scalar >::description ( ) const

Definition at line 289 of file Tempus_TimeStepControl_impl.hpp.

template<typename Scalar>
virtual int Tempus::TimeStepControl< Scalar >::getFinalIndex ( ) const
inlinevirtual

Definition at line 106 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual Scalar Tempus::TimeStepControl< Scalar >::getFinalTime ( ) const
inlinevirtual

Definition at line 96 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual int Tempus::TimeStepControl< Scalar >::getInitIndex ( ) const
inlinevirtual

Definition at line 104 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual int Tempus::TimeStepControl< Scalar >::getInitOrder ( ) const
inlinevirtual

Definition at line 114 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual Scalar Tempus::TimeStepControl< Scalar >::getInitTime ( ) const
inlinevirtual

Definition at line 94 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual Scalar Tempus::TimeStepControl< Scalar >::getInitTimeStep ( ) const
inlinevirtual

Definition at line 100 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual Scalar Tempus::TimeStepControl< Scalar >::getMaxAbsError ( ) const
inlinevirtual

Definition at line 108 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual int Tempus::TimeStepControl< Scalar >::getMaxConsecFailures ( ) const
inlinevirtual

Definition at line 128 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual int Tempus::TimeStepControl< Scalar >::getMaxFailures ( ) const
inlinevirtual

Definition at line 126 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual int Tempus::TimeStepControl< Scalar >::getMaxOrder ( ) const
inlinevirtual

Definition at line 116 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual Scalar Tempus::TimeStepControl< Scalar >::getMaxRelError ( ) const
inlinevirtual

Definition at line 110 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual Scalar Tempus::TimeStepControl< Scalar >::getMaxTimeStep ( ) const
inlinevirtual

Definition at line 102 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual int Tempus::TimeStepControl< Scalar >::getMinOrder ( ) const
inlinevirtual

Definition at line 112 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual Scalar Tempus::TimeStepControl< Scalar >::getMinTimeStep ( ) const
inlinevirtual

Definition at line 98 of file Tempus_TimeStepControl_decl.hpp.

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

Determine the time step size.

Definition at line 49 of file Tempus_TimeStepControl_impl.hpp.

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

Definition at line 602 of file Tempus_TimeStepControl_impl.hpp.

template<typename Scalar>
virtual int Tempus::TimeStepControl< Scalar >::getNumTimeSteps ( ) const
inlinevirtual

Definition at line 131 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual bool Tempus::TimeStepControl< Scalar >::getOutputExactly ( ) const
inlinevirtual

Definition at line 120 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual std::vector<int> Tempus::TimeStepControl< Scalar >::getOutputIndices ( ) const
inlinevirtual

Definition at line 122 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual std::vector<Scalar> Tempus::TimeStepControl< Scalar >::getOutputTimes ( ) const
inlinevirtual

Definition at line 124 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual std::string Tempus::TimeStepControl< Scalar >::getStepType ( ) const
inlinevirtual

Definition at line 118 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual Teuchos::RCP<TimeStepControlStrategyComposite<Scalar> > Tempus::TimeStepControl< Scalar >::getTimeStepControlStrategy ( ) const
inlinevirtual

Definition at line 134 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 538 of file Tempus_TimeStepControl_impl.hpp.

template<class Scalar >
bool Tempus::TimeStepControl< Scalar >::indexInRange ( const int  iStep) const
virtual

Check if time step index is within minimum and maximum index.

Definition at line 255 of file Tempus_TimeStepControl_impl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::initialize ( Teuchos::RCP< Teuchos::ParameterList >  pList = Teuchos::null)
inlinevirtual

Definition at line 59 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setFinalIndex ( int  FinalIndex)
inlinevirtual

Definition at line 151 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setFinalTime ( Scalar  FinalTime)
inlinevirtual

Definition at line 141 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setInitIndex ( int  InitIndex)
inlinevirtual

Definition at line 149 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setInitOrder ( int  InitOrder)
inlinevirtual

Definition at line 159 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setInitTime ( Scalar  InitTime)
inlinevirtual

Definition at line 139 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setInitTimeStep ( Scalar  InitTimeStep)
inlinevirtual

Definition at line 145 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setMaxAbsError ( Scalar  MaxAbsError)
inlinevirtual

Definition at line 153 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setMaxConsecFailures ( int  MaxConsecFailures)
inlinevirtual

Definition at line 185 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setMaxFailures ( int  MaxFailures)
inlinevirtual

Definition at line 183 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setMaxOrder ( int  MaxOrder)
inlinevirtual

Definition at line 161 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setMaxRelError ( Scalar  MaxRelError)
inlinevirtual

Definition at line 155 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setMaxTimeStep ( Scalar  MaxTimeStep)
inlinevirtual

Definition at line 147 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setMinOrder ( int  MinOrder)
inlinevirtual

Definition at line 157 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setMinTimeStep ( Scalar  MinTimeStep)
inlinevirtual

Definition at line 143 of file Tempus_TimeStepControl_decl.hpp.

template<class Scalar >
void Tempus::TimeStepControl< Scalar >::setNumTimeSteps ( int  numTimeSteps)
virtual

Definition at line 262 of file Tempus_TimeStepControl_impl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setOutputExactly ( bool  OutputExactly)
inlinevirtual

Definition at line 165 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setOutputIndices ( std::vector< int >  OutputIndices)
inlinevirtual

Definition at line 167 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setOutputTimes ( std::vector< Scalar >  OutputTimes)
inlinevirtual

Definition at line 175 of file Tempus_TimeStepControl_decl.hpp.

template<class Scalar >
void Tempus::TimeStepControl< Scalar >::setParameterList ( const Teuchos::RCP< Teuchos::ParameterList > &  pl)

Definition at line 309 of file Tempus_TimeStepControl_impl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setStepType ( std::string  StepType)
inlinevirtual

Definition at line 163 of file Tempus_TimeStepControl_decl.hpp.

template<class Scalar >
void Tempus::TimeStepControl< Scalar >::setTimeStepControlStrategy ( Teuchos::RCP< TimeStepControlStrategy< Scalar > >  tscs = Teuchos::null)
virtual

Set the TimeStepControlStrategy.

Definition at line 467 of file Tempus_TimeStepControl_impl.hpp.

template<class Scalar >
bool Tempus::TimeStepControl< Scalar >::timeInRange ( const Scalar  time) const
virtual

Check if time is within minimum and maximum time.

Test if time is within range: include timeMin and exclude timeMax.

Definition at line 246 of file Tempus_TimeStepControl_impl.hpp.

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

Definition at line 610 of file Tempus_TimeStepControl_impl.hpp.

Member Data Documentation

template<typename Scalar>
Scalar Tempus::TimeStepControl< Scalar >::dtAfterOutput_
protected

dt to reinstate after output step.

Definition at line 199 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
bool Tempus::TimeStepControl< Scalar >::outputAdjustedDt_
protected

Flag indicating that dt was adjusted for output.

Definition at line 198 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
std::vector<int> Tempus::TimeStepControl< Scalar >::outputIndices_
protected

Vector of output indices.

Definition at line 195 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
std::vector<Scalar> Tempus::TimeStepControl< Scalar >::outputTimes_
protected

Vector of output times.

Definition at line 196 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
Teuchos::RCP<TimeStepControlStrategyComposite<Scalar> > Tempus::TimeStepControl< Scalar >::stepControlStrategy_
protected

Definition at line 201 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
Teuchos::RCP<Teuchos::ParameterList> Tempus::TimeStepControl< Scalar >::tscPL_
protected

Definition at line 193 of file Tempus_TimeStepControl_decl.hpp.


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