9 #ifndef Tempus_TimeStepControl_decl_hpp
10 #define Tempus_TimeStepControl_decl_hpp
16 #include "Teuchos_VerboseObject.hpp"
17 #include "Teuchos_Describable.hpp"
19 #include "Tempus_config.hpp"
20 #include "Tempus_SolutionHistory.hpp"
48 template<
class Scalar>
70 int maxConsecFailures,
74 std::vector<int> outputIndices,
75 std::vector<Scalar> outputTimes,
76 int outputIndexInterval,
77 Scalar outputTimeInterval,
78 Teuchos::RCP<TimeStepControlStrategy<Scalar>> stepControlStrategy);
83 #ifndef TEMPUS_HIDE_DEPRECATED_CODE
95 const Teuchos::RCP<SolutionHistory<Scalar> > & solutionHistory,
96 Status & integratorStatus);
166 virtual void printDtChanges(
int istep, Scalar dt_old, Scalar dt_new,
167 std::string reason)
const;
206 template<
class Scalar>
209 bool runInitialize =
true);
212 template<
class Scalar>
222 #endif // Tempus_TimeStepControl_decl_hpp
virtual void checkInitialized()
virtual void setOutputExactly(bool b)
virtual void setInitTime(Scalar t)
virtual void setMaxFailures(int i)
virtual void setFinalTime(Scalar t)
Scalar outputTimeInterval_
virtual int getInitIndex() const
Teuchos::RCP< TimeStepControl< Scalar > > createTimeStepControl(Teuchos::RCP< Teuchos::ParameterList > const &pList, bool runInitialize=true)
Nonmember constructor from ParameterList.
virtual int getOutputIndexInterval() const
int numTimeSteps_
Number of time steps for Constant time step.
Scalar maxTimeStep_
Maximum Time Step.
bool isInitialized_
Bool if TimeStepControl is initialized.
virtual void setNumTimeSteps(int numTimeSteps)
virtual Scalar getMaxRelError() const
virtual ~TimeStepControl()
Destructor.
int initIndex_
Initial Time Index.
virtual Scalar getFinalTime() const
virtual void setOutputIndices(std::vector< int > v)
Scalar maxAbsError_
Maximum Absolute Error.
std::string description() const
virtual Teuchos::RCP< TimeStepControlStrategy< Scalar > > getTimeStepControlStrategy() const
virtual void setPrintDtChanges(bool b)
bool outputExactly_
Output Exactly On Output Times.
virtual int getMaxConsecFailures() const
virtual Scalar getInitTimeStep() const
virtual void printDtChanges(int istep, Scalar dt_old, Scalar dt_new, std::string reason) const
virtual bool getPrintDtChanges() const
virtual void setOutputIndexInterval(int i)
virtual Scalar getOutputTimeInterval() const
Scalar maxRelError_
Maximum Relative Error.
virtual void setOutputTimes(std::vector< Scalar > v)
virtual bool isInitialized()
Teuchos::RCP< Teuchos::ParameterList > getTimeStepControlPL()
Nonmember function to return ParameterList with default values.
virtual std::vector< Scalar > getOutputTimes() const
virtual void setMaxAbsError(Scalar e)
virtual bool getOutputExactly() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< TimeStepControlStrategy< Scalar > > stepControlStrategy_
virtual void setMaxRelError(Scalar e)
virtual void setTimeStepControlStrategy(Teuchos::RCP< TimeStepControlStrategy< Scalar > > tscs=Teuchos::null)
Status
Status for the Integrator, the Stepper and the SolutionState.
Scalar initTime_
Initial Time.
virtual bool indexInRange(const int iStep) const
Check if time step index is within minimum and maximum index.
virtual Scalar getMaxAbsError() const
TimeStepControl manages the time step size. There several mechanisms that effect the time step size a...
virtual int getFinalIndex() const
Scalar initTimeStep_
Initial Time Step.
TimeStepControl()
Default Constructor.
Scalar minTimeStep_
Minimum Time Step.
virtual void setMinTimeStep(Scalar t)
bool printDtChanges_
Print timestep size when it changes.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
int finalIndex_
Final Time Index.
virtual Scalar getMaxTimeStep() const
virtual Scalar getMinTimeStep() const
virtual void setFinalIndex(int i)
virtual int getNumTimeSteps() const
virtual void setOutputTimeInterval(Scalar t)
virtual void setNextTimeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory, Status &integratorStatus)
Determine the time step size.
int maxFailures_
Maximum Number of Stepper Failures.
virtual void getNextTimeStep(const Teuchos::RCP< SolutionHistory< Scalar > > &sh, Status &integratorStatus)
Deprecated get the time step size.
Scalar dtAfterOutput_
dt to reinstate after output step.
virtual bool timeInRange(const Scalar time) const
Check if time is within minimum and maximum time.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
virtual void setInitIndex(int i)
std::vector< Scalar > outputTimes_
Vector of output times.
virtual void setMaxTimeStep(Scalar t)
virtual std::vector< int > getOutputIndices() const
Scalar finalTime_
Final Time.
virtual void setInitTimeStep(Scalar t)
int maxConsecFailures_
Maximum Number of Consecutive Stepper Failures.
std::vector< int > outputIndices_
Vector of output indices.
TimeStepControlStrategy class for TimeStepControl.
virtual Scalar getInitTime() const
virtual void initialize() const
virtual int getMaxFailures() const
virtual Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Return ParameterList with current values.
virtual void setMaxConsecFailures(int i)
bool outputAdjustedDt_
Flag indicating that dt was adjusted for output.
virtual std::string getStepType() const