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