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 void describe() const
Describe member data.
virtual void setName(std::string name)
virtual int indexOfNextEvent(int index) const
Index 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 Scalar timeToNextEvent(Scalar time) const
How much time until the next event. Negative indicating the last event is in the past.
virtual bool isTime(Scalar time) const
Test if time is near a TimeEvent (within tolerance).
virtual int getDefaultIndex() const
const Scalar defaultTime_
virtual Scalar getDefaultTol() const
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.
This class defines time events which can be used to "trigger" an action. Time events are points in ti...
virtual bool eventInRangeIndex(int index1, int index2) const
Test if an event occurs within the time range.
virtual std::string getName() const
virtual Scalar getAbsTol() const
virtual ~TimeEventBase()
Destructor.
virtual int indexToNextEvent(int index) const
How many indices until the next event. Negative indicating the last event is in the past...
TimeEventBase()
Constructor.