Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus::TimeEventBase< Scalar > Class Template Reference

This class defines time events which can be used to "trigger" an action. Time events are points in time and/or timestep index where an an action should occur, such as, solution output (mesh and solution) diagnostic output, restart, screen dump, in-situ visualization, user-specified, or any other action. More...

#include <Tempus_TimeEventBase.hpp>

Inheritance diagram for Tempus::TimeEventBase< Scalar >:
Tempus::TimeEventComposite< Scalar > Tempus::TimeEventList< Scalar > Tempus::TimeEventListIndex< Scalar > Tempus::TimeEventRange< Scalar > Tempus::TimeEventRangeIndex< Scalar >

Public Member Functions

 TimeEventBase ()
 Constructor. More...
 
virtual ~TimeEventBase ()
 Destructor. More...
 
Basic methods
virtual bool isTime (Scalar time) const
 Test if time is near a TimeEvent (within tolerance). More...
 
virtual Scalar getAbsTol () const
 
virtual Scalar timeToNextEvent (Scalar time) const
 How much time until the next event. Negative indicating the last event is in the past. More...
 
virtual Scalar timeOfNextEvent (Scalar time) const
 Time of the next event. Negative indicating the last event is in the past. More...
 
virtual bool eventInRange (Scalar time1, Scalar time2) const
 Test if an event occurs within the time range. More...
 
virtual bool isIndex (int index) const
 Test if index is a time event. More...
 
virtual int indexToNextEvent (int index) const
 How many indices until the next event. Negative indicating the last event is in the past. More...
 
virtual int indexOfNextEvent (int index) const
 Index of the next event. Negative indicating the last event is in the past. More...
 
virtual bool eventInRangeIndex (int index1, int index2) const
 Test if an event occurs within the time range. More...
 
virtual void describe () const
 Describe member data. More...
 
Accessor methods
virtual std::string getName () const
 
virtual void setName (std::string name)
 
virtual Scalar getDefaultTime () const
 
virtual Scalar getDefaultTol () const
 
virtual int getDefaultIndex () const
 

Private Attributes

std::string name_
 
const Scalar defaultTime_
 
const Scalar defaultTol_
 
const int defaultIndex_
 

Detailed Description

template<class Scalar>
class Tempus::TimeEventBase< Scalar >

This class defines time events which can be used to "trigger" an action. Time events are points in time and/or timestep index where an an action should occur, such as, solution output (mesh and solution) diagnostic output, restart, screen dump, in-situ visualization, user-specified, or any other action.

This class will store a collection time events, so that an object may quiry it and take appropriate action. Time events (time and timestep index) can be specified via

  • start, stop and stride
  • list of events

Definition at line 34 of file Tempus_TimeEventBase.hpp.

Constructor & Destructor Documentation

template<class Scalar >
Tempus::TimeEventBase< Scalar >::TimeEventBase ( )
inline

Constructor.

Definition at line 39 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual Tempus::TimeEventBase< Scalar >::~TimeEventBase ( )
inlinevirtual

Destructor.

Definition at line 47 of file Tempus_TimeEventBase.hpp.

Member Function Documentation

template<class Scalar >
virtual void Tempus::TimeEventBase< Scalar >::describe ( ) const
inlinevirtual
template<class Scalar >
virtual bool Tempus::TimeEventBase< Scalar >::eventInRange ( Scalar  time1,
Scalar  time2 
) const
inlinevirtual

Test if an event occurs within the time range.

Reimplemented in Tempus::TimeEventComposite< Scalar >, Tempus::TimeEventRange< Scalar >, and Tempus::TimeEventList< Scalar >.

Definition at line 67 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual bool Tempus::TimeEventBase< Scalar >::eventInRangeIndex ( int  index1,
int  index2 
) const
inlinevirtual

Test if an event occurs within the time range.

Reimplemented in Tempus::TimeEventComposite< Scalar >, Tempus::TimeEventListIndex< Scalar >, and Tempus::TimeEventRangeIndex< Scalar >.

Definition at line 83 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventBase< Scalar >::getAbsTol ( ) const
inlinevirtual
template<class Scalar >
virtual int Tempus::TimeEventBase< Scalar >::getDefaultIndex ( ) const
inlinevirtual

Definition at line 102 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventBase< Scalar >::getDefaultTime ( ) const
inlinevirtual

Definition at line 100 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventBase< Scalar >::getDefaultTol ( ) const
inlinevirtual

Definition at line 101 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual std::string Tempus::TimeEventBase< Scalar >::getName ( ) const
inlinevirtual

Definition at line 97 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual int Tempus::TimeEventBase< Scalar >::indexOfNextEvent ( int  index) const
inlinevirtual

Index of the next event. Negative indicating the last event is in the past.

Reimplemented in Tempus::TimeEventComposite< Scalar >, Tempus::TimeEventListIndex< Scalar >, and Tempus::TimeEventRangeIndex< Scalar >.

Definition at line 79 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual int Tempus::TimeEventBase< Scalar >::indexToNextEvent ( int  index) const
inlinevirtual

How many indices until the next event. Negative indicating the last event is in the past.

Reimplemented in Tempus::TimeEventComposite< Scalar >, Tempus::TimeEventListIndex< Scalar >, and Tempus::TimeEventRangeIndex< Scalar >.

Definition at line 75 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual bool Tempus::TimeEventBase< Scalar >::isIndex ( int  index) const
inlinevirtual
template<class Scalar >
virtual bool Tempus::TimeEventBase< Scalar >::isTime ( Scalar  time) const
inlinevirtual

Test if time is near a TimeEvent (within tolerance).

Reimplemented in Tempus::TimeEventRange< Scalar >, Tempus::TimeEventList< Scalar >, and Tempus::TimeEventComposite< Scalar >.

Definition at line 52 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual void Tempus::TimeEventBase< Scalar >::setName ( std::string  name)
inlinevirtual

Definition at line 98 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventBase< Scalar >::timeOfNextEvent ( Scalar  time) const
inlinevirtual

Time of the next event. Negative indicating the last event is in the past.

Reimplemented in Tempus::TimeEventComposite< Scalar >, Tempus::TimeEventRange< Scalar >, and Tempus::TimeEventList< Scalar >.

Definition at line 63 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventBase< Scalar >::timeToNextEvent ( Scalar  time) const
inlinevirtual

How much time until the next event. Negative indicating the last event is in the past.

Reimplemented in Tempus::TimeEventComposite< Scalar >, Tempus::TimeEventRange< Scalar >, and Tempus::TimeEventList< Scalar >.

Definition at line 59 of file Tempus_TimeEventBase.hpp.

Member Data Documentation

template<class Scalar >
const int Tempus::TimeEventBase< Scalar >::defaultIndex_
private

Definition at line 111 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
const Scalar Tempus::TimeEventBase< Scalar >::defaultTime_
private

Definition at line 109 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
const Scalar Tempus::TimeEventBase< Scalar >::defaultTol_
private

Definition at line 110 of file Tempus_TimeEventBase.hpp.

template<class Scalar >
std::string Tempus::TimeEventBase< Scalar >::name_
private

Definition at line 108 of file Tempus_TimeEventBase.hpp.


The documentation for this class was generated from the following file: