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< TimeEventComposite< Scalar >> timeEvent, Teuchos::RCP< TimeStepControlStrategy< Scalar >> stepControlStrategy) | |
Constructor. More... | |
virtual | ~TimeStepControl () |
Destructor. 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... | |
Teuchos::RCP < TimeEventComposite< Scalar > > | timeEvent_ |
bool | teAdjustedDt_ |
Flag indicating that dt was adjusted for time event. More... | |
Scalar | dtAfterTimeEvent_ |
dt to reinstate after TimeEvent 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 |
Return if the output needs to exactly happen on output time. More... | |
virtual std::vector< int > | getOutputIndices () const |
virtual std::vector< Scalar > | getOutputTimes () const |
virtual int | getOutputIndexInterval () const |
virtual Scalar | getOutputTimeInterval () const |
virtual int | getMaxFailures () const |
virtual int | getMaxConsecFailures () const |
virtual bool | getPrintDtChanges () const |
virtual int | getNumTimeSteps () const |
virtual Teuchos::RCP < TimeEventComposite< Scalar > > | getTimeEvents () const |
virtual Teuchos::RCP < TimeStepControlStrategy < Scalar > > | getTimeStepControlStrategy () 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 > outputTimes) |
virtual void | setOutputIndexInterval (int i) |
virtual void | setOutputTimeInterval (Scalar t) |
virtual void | setTimeEvents (Teuchos::RCP< TimeEventComposite< Scalar >> teb=Teuchos::null) |
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 30 of file Tempus_Integrator.hpp.
Tempus::TimeStepControl< Scalar >::TimeStepControl | ( | ) |
Default Constructor.
Definition at line 27 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< TimeEventComposite< Scalar >> | timeEvent, | ||
Teuchos::RCP< TimeStepControlStrategy< Scalar >> | stepControlStrategy | ||
) |
Constructor.
Definition at line 51 of file Tempus_TimeStepControl_impl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 70 of file Tempus_TimeStepControl_decl.hpp.
|
virtual |
Determine the time step size.
Definition at line 209 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 406 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 428 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Return ParameterList with current values.
Definition at line 674 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Reimplemented from Teuchos::Describable.
Definition at line 612 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Reimplemented from Teuchos::Describable.
Definition at line 619 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 435 of file Tempus_TimeStepControl_impl.hpp.
|
inlinevirtual |
Definition at line 96 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 97 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 98 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 99 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 100 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 101 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 102 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 103 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 104 of file Tempus_TimeStepControl_decl.hpp.
|
virtual |
Return if the output needs to exactly happen on output time.
Output TimeEvents, "Output Time Interval" and "Output Time List", will always have the same OutputExactly value, so just find one or the other. Otherwise return the default of true.
Definition at line 444 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 456 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 466 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 476 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 486 of file Tempus_TimeStepControl_impl.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 129 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 147 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 152 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 157 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 162 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 167 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 172 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 177 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 182 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 187 of file Tempus_TimeStepControl_decl.hpp.
|
inlinevirtual |
Definition at line 192 of file Tempus_TimeStepControl_decl.hpp.
|
virtual |
Definition at line 495 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 527 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 542 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 550 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 558 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 566 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 575 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 596 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 179 of file Tempus_TimeStepControl_impl.hpp.
|
virtual |
Definition at line 112 of file Tempus_TimeStepControl_impl.hpp.
|
inlinevirtual |
Definition at line 213 of file Tempus_TimeStepControl_decl.hpp.
|
virtual |
Definition at line 198 of file Tempus_TimeStepControl_impl.hpp.
|
mutableprotected |
Bool if TimeStepControl is initialized.
Definition at line 217 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Initial Time.
Definition at line 218 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Final Time.
Definition at line 219 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Minimum Time Step.
Definition at line 220 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Initial Time Step.
Definition at line 221 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Time Step.
Definition at line 222 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Initial Time Index.
Definition at line 223 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Final Time Index.
Definition at line 224 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Absolute Error.
Definition at line 225 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Relative Error.
Definition at line 226 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Number of Stepper Failures.
Definition at line 227 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Maximum Number of Consecutive Stepper Failures.
Definition at line 228 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Number of time steps for Constant time step.
Definition at line 229 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Print timestep size when it changes.
Definition at line 230 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Definition at line 232 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Flag indicating that dt was adjusted for time event.
Definition at line 234 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
dt to reinstate after TimeEvent step.
Definition at line 235 of file Tempus_TimeStepControl_decl.hpp.
|
protected |
Definition at line 237 of file Tempus_TimeStepControl_decl.hpp.