9 #ifndef Tempus_TimeEventList_decl_hpp
10 #define Tempus_TimeEventList_decl_hpp
15 #include "Teuchos_Time.hpp"
28 template<
class Scalar>
38 Scalar relTol,
bool landOnExactly);
46 virtual bool isTime(Scalar time)
const;
55 virtual bool eventInRange(Scalar time1, Scalar time2)
const;
64 virtual void setTimeList(std::vector<Scalar> timeList);
65 virtual void addTime(Scalar time);
This class defines time events which can be used to "trigger" an action. Time events are points in ti...
TimeEventList specifies a list of time events.
virtual Scalar timeToNextEvent(Scalar time) const
How much time until the next event. Negative indicating the last event is in the past.
std::vector< Scalar > timeList_
Sorted and unique list of time events.
virtual Scalar timeOfNextEvent(Scalar time) const
Time of the next event. Negative indicating the last event is in the past.
bool landOnExactly_
Should these time events be landed on exactly, i.e, adjust the timestep to hit time event,...
virtual void setTimeList(std::vector< Scalar > timeList)
virtual bool isTime(Scalar time) const
Test if time is near a TimeEvent (within tolerance).
virtual void clearTimeList()
virtual Scalar getRelTol() const
Scalar timeScale_
A reference time scale, max(abs(start_,stop_)).
TimeEventList()
Default constructor.
virtual void setTimeScale()
virtual void addTime(Scalar time)
virtual ~TimeEventList()
Destructor.
virtual std::vector< Scalar > getTimeList() const
virtual bool eventInRange(Scalar time1, Scalar time2) const
Test if an event occurs within the time range.
virtual void setRelTol(Scalar relTol)
virtual void setLandOnExactly(bool LOE)
virtual Scalar getAbsTol() const
virtual bool getLandOnExactly() const
Scalar absTol_
Absolute time tolerance, relTol_*timeScale_.
Scalar relTol_
Relative time tolerance for matching time events.
virtual void describe() const
Describe member data.