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...
 
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
 
virtual int getOutputIndexInterval ()
 
virtual double getOutputTimeInterval ()
 
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)
 
virtual void setOutputIndexInterval (int OutputIndexInterval)
 
virtual void setOutputTimeInterval (double OutputTimeInterval)
 
virtual void setPrintDtChanges (bool printDtChanges)
 
virtual bool getPrintDtChanges () const
 

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...
 
int outputIndexInterval_
 
double outputTimeInterval_
 
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_
 
bool printDtChanges_
 

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<typename Scalar>
virtual Tempus::TimeStepControl< Scalar >::~TimeStepControl ( )
inlinevirtual

Destructor.

Definition at line 54 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 292 of file Tempus_TimeStepControl_impl.hpp.

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

Definition at line 284 of file Tempus_TimeStepControl_impl.hpp.

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

Definition at line 103 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 93 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 101 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 111 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 91 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 97 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 105 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 125 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 123 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 113 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 107 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 99 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 109 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 95 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 43 of file Tempus_TimeStepControl_impl.hpp.

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

Definition at line 597 of file Tempus_TimeStepControl_impl.hpp.

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

Definition at line 128 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 117 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 132 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 119 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 134 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 121 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 202 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 115 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 131 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 533 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 250 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 56 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 152 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 142 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 150 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 160 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 140 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 146 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 154 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 190 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 188 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 162 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 156 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 148 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 158 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 144 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 257 of file Tempus_TimeStepControl_impl.hpp.

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

Definition at line 166 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setOutputIndexInterval ( int  OutputIndexInterval)
inlinevirtual

Definition at line 194 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 168 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setOutputTimeInterval ( double  OutputTimeInterval)
inlinevirtual

Definition at line 197 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 176 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 304 of file Tempus_TimeStepControl_impl.hpp.

template<typename Scalar>
virtual void Tempus::TimeStepControl< Scalar >::setPrintDtChanges ( bool  printDtChanges)
inlinevirtual

Definition at line 200 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 164 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 462 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 241 of file Tempus_TimeStepControl_impl.hpp.

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

Definition at line 605 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 215 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 214 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
int Tempus::TimeStepControl< Scalar >::outputIndexInterval_
protected

Definition at line 211 of file Tempus_TimeStepControl_decl.hpp.

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

Vector of output indices.

Definition at line 209 of file Tempus_TimeStepControl_decl.hpp.

template<typename Scalar>
double Tempus::TimeStepControl< Scalar >::outputTimeInterval_
protected

Definition at line 212 of file Tempus_TimeStepControl_decl.hpp.

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

Vector of output times.

Definition at line 210 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 219 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 217 of file Tempus_TimeStepControl_decl.hpp.

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

Definition at line 207 of file Tempus_TimeStepControl_decl.hpp.


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