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 void describe() const
Describe member data.
unsigned numEvents_
Number of events in time range.
virtual void setRelTol(Scalar relTol)
Scalar stride_
Stride of time range.
virtual void setNumEvents(int numEvents)
Scalar absTol_
Absolute time tolerance, relTol_*timeScale_.
virtual void setLandOnExactly(bool LOE)
virtual bool getLandOnExactly() const
virtual void setTimeRange(Scalar start, Scalar stop, int numEvents)
Scalar timeScale_
A reference time scale, max(abs(start_,stop_)).
Scalar start_
Start of time range.
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.
virtual Scalar timeToNextEvent(Scalar time) const
How much time until the next event. Negative indicating the last event is in the past.
virtual int getNumEvents() const
bool landOnExactly_
Should these time events be landed on exactly, i.e, adjust the timestep to hit time event...
virtual Scalar getTimeStride() 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 Scalar getTimeStop() const
virtual Scalar getTimeStart() const
virtual void setTimeStart(Scalar start)
Scalar stop_
Stop of time range.
virtual ~TimeEventRange()
Destructor.
virtual void setTimeStride(Scalar stride)
virtual bool isTime(Scalar time) const
Test if time is near a TimeEvent (within tolerance).
TimeEventRange()
Default constructor.
virtual Scalar timeOfNextEvent(Scalar time) const
Time of the next event. Negative indicating the last event is in the past.
virtual Scalar getRelTol() const
virtual Scalar getAbsTol() const