9 #ifndef Tempus_TimeEventRange_decl_hpp 10 #define Tempus_TimeEventRange_decl_hpp 15 #include "Teuchos_Time.hpp" 28 template<
class Scalar>
37 TimeEventRange(std::string name, Scalar start, Scalar stop, Scalar stride,
38 Scalar relTol,
bool landOnExactly);
41 TimeEventRange(std::string name, Scalar start, Scalar stop,
int numEvents,
42 Scalar relTol,
bool landOnExactly);
50 virtual bool isTime(Scalar time)
const;
59 virtual bool eventInRange(Scalar time1, Scalar time2)
const;
64 virtual void setTimeRange(Scalar start, Scalar stop, Scalar stride)
66 virtual void setTimeRange(Scalar start, Scalar stop,
int numEvents)
113 #endif // Tempus_TimeEventRange_decl_hpp Scalar relTol_
Relative time tolerance for matching time events.
virtual int getNumEvents() const
unsigned numEvents_
Number of events in time range.
virtual void setRelTol(Scalar relTol)
Scalar stride_
Stride of time range.
virtual bool isTime(Scalar time) const
Test if time is near a TimeEvent (within tolerance).
virtual Scalar getAbsTol() const
virtual void setNumEvents(int numEvents)
virtual void describe() const
Describe member data.
Scalar absTol_
Absolute time tolerance, relTol_*timeScale_.
virtual void setLandOnExactly(bool LOE)
virtual void setTimeRange(Scalar start, Scalar stop, int numEvents)
virtual Scalar timeOfNextEvent(Scalar time) const
Time of the next event. Negative indicating the last event is in the past.
Scalar timeScale_
A reference time scale, max(abs(start_,stop_)).
Scalar start_
Start of time range.
virtual Scalar getTimeStop() const
virtual Scalar getTimeStride() const
virtual bool eventInRange(Scalar time1, Scalar time2) const
Test if an event occurs within the time range.
TimeEventRange specifies a start, stop and stride time.
bool landOnExactly_
Should these time events be landed on exactly, i.e, adjust the timestep to hit time event...
virtual Scalar getTimeStart() const
virtual void setTimeStop(Scalar stop)
virtual void setTimeScale()
virtual void setTimeRange(Scalar start, Scalar stop, Scalar stride)
This class defines time events which can be used to "trigger" an action. Time events are points in ti...
virtual bool getLandOnExactly() const
virtual Scalar getRelTol() const
virtual void setTimeStart(Scalar start)
Scalar stop_
Stop of time range.
virtual ~TimeEventRange()
Destructor.
virtual void setTimeStride(Scalar stride)
TimeEventRange()
Default constructor.
virtual Scalar timeToNextEvent(Scalar time) const
How much time until the next event. Negative indicating the last event is in the past.