Tempus
Version of the Day
Time Integration
|
TimeStepControl manages the time step size. There several mechanisms that effect the time step size and handled with this class: More...
#include <Tempus_Integrator.hpp>
Public Member Functions | |
TimeStepControl () | |
Default Constructor. More... | |
TimeStepControl (Scalar initTime, Scalar finalTime, Scalar minTimeStep, Scalar initTimeStep, Scalar maxTimeStep, int initIndex, int finalIndex, Scalar maxAbsError, Scalar maxRelError, int maxFailures, int maxConsecFailures, int numTimeSteps, bool printDtChanges, bool outputExactly, std::vector< int > outputIndices, std::vector< Scalar > outputTimes, int outputIndexInterval, Scalar outputTimeInterval, Teuchos::RCP< TimeStepControlStrategy< Scalar >> stepControlStrategy) | |
Constructor. More... | |
virtual | ~TimeStepControl () |
Destructor. More... | |
virtual void | getNextTimeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &sh, Status &integratorStatus) |
Deprecated get the time step size. More... | |
virtual void | setNextTimeStep (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 Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () const |
Return ParameterList with current values. More... | |
virtual void | printDtChanges (int istep, Scalar dt_old, Scalar dt_new, std::string reason) const |
virtual void | initialize () const |
virtual bool | isInitialized () |
virtual void | checkInitialized () |
Public Member Functions inherited from Teuchos::Describable | |
void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
virtual | ~Describable () |
LabeledObject () | |
virtual | ~LabeledObject () |
virtual void | setObjectLabel (const std::string &objectLabel) |
virtual std::string | getObjectLabel () const |
DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
Public Member Functions inherited from Teuchos::VerboseObject< Tempus::TimeStepControl< Scalar > > | |
VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) | |
virtual const VerboseObject & | setVerbLevel (const EVerbosityLevel verbLevel) const |
virtual const VerboseObject & | setOverridingVerbLevel (const EVerbosityLevel verbLevel) const |
virtual EVerbosityLevel | getVerbLevel () const |
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT RCP< const ParameterList > | getValidVerboseObjectSublist () |
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void | setupVerboseObjectSublist (ParameterList *paramList) |
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT void | readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel) |
void | readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject) |
Public Member Functions inherited from Teuchos::VerboseObjectBase | |
virtual | ~VerboseObjectBase () |
VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) | |
virtual const VerboseObjectBase & | setOStream (const RCP< FancyOStream > &oStream) const |
virtual const VerboseObjectBase & | setOverridingOStream (const RCP< FancyOStream > &oStream) const |
virtual VerboseObjectBase & | setLinePrefix (const std::string &linePrefix) |
virtual RCP< FancyOStream > | getOStream () const |
virtual RCP< FancyOStream > | getOverridingOStream () const |
virtual std::string | getLinePrefix () const |
virtual OSTab | getOSTab (const int tabs=1, const std::string &linePrefix="") const |
Protected Attributes | |
bool | isInitialized_ |
Bool if TimeStepControl is initialized. More... | |
Scalar | initTime_ |
Initial Time. More... | |
Scalar | finalTime_ |
Final Time. More... | |
Scalar | minTimeStep_ |
Minimum Time Step. More... | |
Scalar | initTimeStep_ |
Initial Time Step. More... | |
Scalar | maxTimeStep_ |
Maximum Time Step. More... | |
int | initIndex_ |
Initial Time Index. More... | |
int | finalIndex_ |
Final Time Index. More... | |
Scalar | maxAbsError_ |
Maximum Absolute Error. More... | |
Scalar | maxRelError_ |
Maximum Relative Error. More... | |
int | maxFailures_ |
Maximum Number of Stepper Failures. More... | |
int | maxConsecFailures_ |
Maximum Number of Consecutive Stepper Failures. More... | |
int | numTimeSteps_ |
Number of time steps for Constant time step. More... | |
bool | printDtChanges_ |
Print timestep size when it changes. More... | |
bool | outputExactly_ |
Output Exactly On Output Times. More... | |
std::vector< int > | outputIndices_ |
Vector of output indices. More... | |
std::vector< Scalar > | outputTimes_ |
Vector of output times. More... | |
int | outputIndexInterval_ |
Scalar | outputTimeInterval_ |
bool | outputAdjustedDt_ |
Flag indicating that dt was adjusted for output. More... | |
Scalar | dtAfterOutput_ |
dt to reinstate after output step. More... | |
Teuchos::RCP < TimeStepControlStrategy < Scalar > > | stepControlStrategy_ |
Overridden from Teuchos::Describable | |
std::string | description () const |
void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const |
Get accessors | |
virtual std::string | getStepType () const |
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 bool | getOutputExactly () const |
virtual std::vector< int > | getOutputIndices () const |
virtual std::vector< Scalar > | getOutputTimes () const |
virtual int | getMaxFailures () const |
virtual int | getMaxConsecFailures () const |
virtual bool | getPrintDtChanges () const |
virtual int | getNumTimeSteps () const |
virtual Teuchos::RCP < TimeStepControlStrategy < Scalar > > | getTimeStepControlStrategy () const |
virtual int | getOutputIndexInterval () const |
virtual Scalar | getOutputTimeInterval () const |
Set accessors | |
virtual void | setInitTime (Scalar t) |
virtual void | setFinalTime (Scalar t) |
virtual void | setMinTimeStep (Scalar t) |
virtual void | setInitTimeStep (Scalar t) |
virtual void | setMaxTimeStep (Scalar t) |
virtual void | setInitIndex (int i) |
virtual void | setFinalIndex (int i) |
virtual void | setMaxAbsError (Scalar e) |
virtual void | setMaxRelError (Scalar e) |
virtual void | setMaxFailures (int i) |
virtual void | setMaxConsecFailures (int i) |
virtual void | setPrintDtChanges (bool b) |
virtual void | setNumTimeSteps (int numTimeSteps) |
virtual void | setOutputExactly (bool b) |
virtual void | setOutputIndices (std::vector< int > v) |
virtual void | setOutputTimes (std::vector< Scalar > v) |
virtual void | setOutputIndexInterval (int i) |
virtual void | setOutputTimeInterval (Scalar t) |
virtual void | setTimeStepControlStrategy (Teuchos::RCP< TimeStepControlStrategy< Scalar > > tscs=Teuchos::null) |
Additional Inherited Members | |
Static Public Member Functions inherited from Teuchos::VerboseObject< Tempus::TimeStepControl< Scalar > > | |
static void | setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel) |
static EVerbosityLevel | getDefaultVerbLevel () |
Static Public Member Functions inherited from Teuchos::VerboseObjectBase | |
static void | setDefaultOStream (const RCP< FancyOStream > &defaultOStream) |
static RCP< FancyOStream > | getDefaultOStream () |
Static Public Attributes inherited from Teuchos::Describable | |
static const EVerbosityLevel | verbLevel_default |
Protected Member Functions inherited from Teuchos::VerboseObject< Tempus::TimeStepControl< Scalar > > | |
void | initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) |
Protected Member Functions inherited from Teuchos::VerboseObjectBase | |
void | initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) |
virtual void | informUpdatedVerbosityState () const |
TimeStepControl manages the time step size. There several mechanisms that effect the time step size and handled with this class:
Using TimeStepControlStrategy allows applications to define their very own strategy used to determine the next time step size (setNextTimeStep()
). Applications can define multiple strategies and add it to a vector of strategies TimeStepControlStrategyComposite using setTimeStepControlStrategy(). TimeStepControlStrategyComposite iterates over the list of strategies to determine the "optimal" next time step size.
Definition at line 26 of file Tempus_Integrator.hpp.
Tempus::TimeStepControl< Scalar >::TimeStepControl | ( | ) |
Default Constructor.
Definition at line 23 of file Tempus_TimeStepControl_impl.hpp.
Tempus::TimeStepControl< Scalar >::TimeStepControl | ( | Scalar | initTime, |
Scalar | finalTime, | ||
Scalar | minTimeStep, | ||
Scalar | initTimeStep, | ||
Scalar | maxTimeStep, | ||
int | initIndex, | ||
int | finalIndex, | ||
Scalar | maxAbsError, | ||
Scalar | maxRelError, | ||
int | maxFailures, | ||
int | maxConsecFailures, | ||
int | numTimeSteps, | ||
bool | printDtChanges, | ||
bool | outputExactly, | ||
std::vector< int > | outputIndices, | ||
std::vector< Scalar > | outputTimes, | ||
int | outputIndexInterval, | ||
Scalar | outputTimeInterval, | ||
Teuchos::RCP< TimeStepControlStrategy< Scalar >> | stepControlStrategy | ||
) |
Constructor.
Definition at line 52 of file Tempus_TimeStepControl_impl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 81 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Deprecated get the time step size.
Definition at line 85 of file Tempus_TimeStepControl_decl.hpp.
|
virtual |
Determine the time step size.
Definition at line 200 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Check if time is within minimum and maximum time.
Test if time is within range: include initTime and exclude finalTime.
Definition at line 392 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Check if time step index is within minimum and maximum index.
Test if index is within range: include initIndex and exclude finalIndex.
Definition at line 412 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Return ParameterList with current values.
Definition at line 527 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Reimplemented from Teuchos::Describable.
Definition at line 451 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Reimplemented from Teuchos::Describable.
Definition at line 459 of file Tempus_TimeStepControl_impl.hpp.
|
inlinevirtual |
Definition at line 116 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 117 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 118 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 119 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 120 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 121 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 122 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 123 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 124 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 125 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 126 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 127 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 128 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 129 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 130 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 131 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 132 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 135 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 136 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 137 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 142 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 143 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 144 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 145 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 146 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 147 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 148 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 149 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 150 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 151 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 152 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 153 of file Tempus_TimeStepControl_decl.hpp.
|
virtual |
Definition at line 419 of file Tempus_TimeStepControl_impl.hpp.
|
inlinevirtual |
Definition at line 156 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 157 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 158 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 159 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 160 of file Tempus_TimeStepControl_decl.hpp.
|
virtual |
Definition at line 510 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 170 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 101 of file Tempus_TimeStepControl_impl.hpp.
|
inlinevirtual |
Definition at line 170 of file Tempus_TimeStepControl_decl.hpp.
|
virtual |
Definition at line 189 of file Tempus_TimeStepControl_impl.hpp.
|
mutableprotected |
Bool if TimeStepControl is initialized.
Definition at line 175 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Initial Time.
Definition at line 176 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Final Time.
Definition at line 177 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Minimum Time Step.
Definition at line 178 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Initial Time Step.
Definition at line 179 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Time Step.
Definition at line 180 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Initial Time Index.
Definition at line 181 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Final Time Index.
Definition at line 182 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Absolute Error.
Definition at line 183 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Relative Error.
Definition at line 184 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Number of Stepper Failures.
Definition at line 185 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Number of Consecutive Stepper Failures.
Definition at line 186 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Number of time steps for Constant time step.
Definition at line 187 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Print timestep size when it changes.
Definition at line 188 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Output Exactly On Output Times.
Definition at line 190 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Vector of output indices.
Definition at line 191 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Vector of output times.
Definition at line 192 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Definition at line 193 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Definition at line 194 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Flag indicating that dt was adjusted for output.
Definition at line 196 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
dt to reinstate after output step.
Definition at line 197 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Definition at line 199 of file Tempus_TimeStepControl_decl.hpp.