9 #ifndef Tempus_TimeEventBase_decl_hpp 10 #define Tempus_TimeEventBase_decl_hpp 13 #include "Teuchos_Time.hpp" 14 #include "Teuchos_VerboseObject.hpp" 33 template<
class Scalar>
40 :
name_(
"TimeEventBase"),
41 defaultTime_ (-std::numeric_limits<Scalar>::max()*1.0e-16),
52 virtual bool isTime(Scalar time)
const 89 Teuchos::RCP<Teuchos::FancyOStream> out =
90 Teuchos::VerboseObjectBase::getDefaultOStream();
91 *out <<
"TimeEventBase name = " <<
getName() << std::endl;
118 #endif // Tempus_TimeEventBase_decl_hpp virtual Scalar getDefaultTime() const
virtual int indexOfNextEvent(int index) const
Index of the next event. Negative indicating the last event is in the past.
virtual std::string getName() const
virtual Scalar getDefaultTol() const
virtual void setName(std::string name)
virtual bool isIndex(int index) const
Test if index is a time event.
virtual Scalar timeOfNextEvent(Scalar time) const
Time of the next event. Negative indicating the last event is in the past.
virtual Scalar timeToNextEvent(Scalar time) const
How much time until the next event. Negative indicating the last event is in the past.
const Scalar defaultTime_
virtual Scalar getAbsTol() const
virtual bool eventInRange(Scalar time1, Scalar time2) const
Test if an event occurs within the time range.
virtual int indexToNextEvent(int index) const
How many indices until the next event. Negative indicating the last event is in the past...
virtual int getDefaultIndex() const
virtual void describe() const
Describe member data.
virtual bool eventInRangeIndex(int index1, int index2) const
Test if an event occurs within the time range.
virtual bool isTime(Scalar time) const
Test if time is near a TimeEvent (within tolerance).
This class defines time events which can be used to "trigger" an action. Time events are points in ti...
virtual ~TimeEventBase()
Destructor.
TimeEventBase()
Constructor.