10 #ifndef Tempus_TimeStepControl_decl_hpp
11 #define Tempus_TimeStepControl_decl_hpp
17 #include "Teuchos_VerboseObject.hpp"
18 #include "Teuchos_Describable.hpp"
20 #include "Tempus_config.hpp"
21 #include "Tempus_SolutionHistory.hpp"
49 template <
class Scalar>
59 Scalar initTime, Scalar finalTime, Scalar minTimeStep,
60 Scalar initTimeStep, Scalar maxTimeStep,
int initIndex,
int finalIndex,
61 Scalar maxAbsError, Scalar maxRelError,
int maxFailures,
63 bool outputExactly, std::vector<int> outputIndices,
64 std::vector<Scalar> outputTimes,
int outputIndexInterval,
65 Scalar outputTimeInterval,
67 Teuchos::RCP<TimeStepControlStrategy<Scalar>> stepControlStrategy);
209 virtual void printDtChanges(
int istep, Scalar dt_old, Scalar dt_new,
210 std::string reason)
const;
242 template <
class Scalar>
245 bool runInitialize =
true);
248 template <
class Scalar>
253 tsc->getValidParameters());
258 #endif // Tempus_TimeStepControl_decl_hpp
virtual void checkInitialized()
virtual void setInitTime(Scalar t)
virtual void setMaxFailures(int i)
virtual void setFinalTime(Scalar t)
virtual void setTimeEvents(Teuchos::RCP< TimeEventComposite< Scalar >> teb=Teuchos::null)
virtual int getInitIndex() const
Teuchos::RCP< TimeStepControl< Scalar > > createTimeStepControl(Teuchos::RCP< Teuchos::ParameterList > const &pList, bool runInitialize=true)
Nonmember constructor from ParameterList.
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
Scalar maxAbsError_
Maximum Absolute Error.
std::string description() const
virtual Teuchos::RCP< TimeStepControlStrategy< Scalar > > getTimeStepControlStrategy() const
virtual void setPrintDtChanges(bool b)
Scalar dtAfterTimeEvent_
dt to reinstate after TimeEvent step.
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
Teuchos::RCP< TimeEventComposite< Scalar > > timeEvent_
Scalar maxRelError_
Maximum Relative Error.
virtual bool isInitialized()
Teuchos::RCP< Teuchos::ParameterList > getTimeStepControlPL()
Nonmember function to return ParameterList with default values.
virtual void setOutputTimes(std::vector< Scalar > outputTimes)
virtual void setOutputIndexInterval(int i)
virtual void setTimeStepControlStrategy(Teuchos::RCP< TimeStepControlStrategy< Scalar >> tscs=Teuchos::null)
virtual void setMaxAbsError(Scalar e)
virtual std::string getStepType() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< TimeStepControlStrategy< Scalar > > stepControlStrategy_
virtual void setMaxRelError(Scalar e)
Status
Status for the Integrator, the Stepper and the SolutionState.
Scalar initTime_
Initial Time.
bool teAdjustedDt_
Flag indicating that dt was adjusted for time event.
This composite TimeEvent loops over added TimeEvents.
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)
virtual void setOutputTimeInterval(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 void setOutputExactly(bool b)
virtual Scalar getMinTimeStep() const
virtual void setNextTimeStep(const Teuchos::RCP< SolutionHistory< Scalar >> &solutionHistory, Status &integratorStatus)
Determine the time step size.
virtual void setFinalIndex(int i)
virtual int getNumTimeSteps() const
int maxFailures_
Maximum Number of Stepper Failures.
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)
virtual int getOutputIndexInterval() const
virtual Scalar getOutputTimeInterval() const
virtual void setMaxTimeStep(Scalar t)
virtual bool getOutputExactly() const
Return if the output needs to exactly happen on output time.
Scalar finalTime_
Final Time.
virtual void setInitTimeStep(Scalar t)
int maxConsecFailures_
Maximum Number of Consecutive Stepper Failures.
TimeStepControlStrategy class for TimeStepControl.
virtual Scalar getInitTime() const
virtual void initialize() const
virtual void setOutputIndices(std::vector< int > v)
virtual std::vector< Scalar > getOutputTimes() const
virtual int getMaxFailures() const
virtual Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Return ParameterList with current values.
virtual void setMaxConsecFailures(int i)
virtual std::vector< int > getOutputIndices() const
virtual Teuchos::RCP< TimeEventComposite< Scalar > > getTimeEvents() const