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

TimeEventList specifies a list of time events. More...

#include <Tempus_TimeEventList_decl.hpp>

Inheritance diagram for Tempus::TimeEventList< Scalar >:
Tempus::TimeEventBase< Scalar >

Public Member Functions

 TimeEventList ()
 Default constructor. More...
 
 TimeEventList (std::string name, std::vector< Scalar > timeList, Scalar relTol, bool landOnExactly)
 Construct with full argument list of data members. More...
 
virtual ~TimeEventList ()
 Destructor. More...
 
Basic methods
virtual bool isTime (Scalar time) const
 Test if time is near a TimeEvent (within tolerance). More...
 
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 void describe () const
 Describe member data. More...
 
Accessor methods
virtual std::vector< Scalar > getTimeList () const
 
virtual void setTimeList (std::vector< Scalar > timeList)
 
virtual void addTime (Scalar time)
 
virtual void clearTimeList ()
 
virtual Scalar getRelTol () const
 
virtual void setRelTol (Scalar relTol)
 
virtual Scalar getAbsTol () const
 
virtual bool getLandOnExactly () const
 
virtual void setLandOnExactly (bool LOE)
 
- Public Member Functions inherited from Tempus::TimeEventBase< Scalar >
 TimeEventBase ()
 Constructor. More...
 
virtual ~TimeEventBase ()
 Destructor. 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 std::string getName () const
 
virtual void setName (std::string name)
 
virtual Scalar getDefaultTime () const
 
virtual Scalar getDefaultTol () const
 
virtual int getDefaultIndex () const
 

Protected Member Functions

virtual void setTimeScale ()
 

Protected Attributes

std::vector< Scalar > timeList_
 Sorted and unique list of time events. More...
 
Scalar timeScale_
 A reference time scale, max(abs(start_,stop_)). More...
 
Scalar relTol_
 Relative time tolerance for matching time events. More...
 
Scalar absTol_
 Absolute time tolerance, relTol_*timeScale_. More...
 
bool landOnExactly_
 Should these time events be landed on exactly, i.e, adjust the timestep to hit time event, versus stepping over and keeping the time step unchanged. More...
 

Detailed Description

template<class Scalar>
class Tempus::TimeEventList< Scalar >

TimeEventList specifies a list of time events.

Definition at line 29 of file Tempus_TimeEventList_decl.hpp.

Constructor & Destructor Documentation

template<class Scalar >
Tempus::TimeEventList< Scalar >::TimeEventList ( )

Default constructor.

Definition at line 16 of file Tempus_TimeEventList_impl.hpp.

template<class Scalar >
Tempus::TimeEventList< Scalar >::TimeEventList ( std::string  name,
std::vector< Scalar >  timeList,
Scalar  relTol,
bool  landOnExactly 
)

Construct with full argument list of data members.

Definition at line 26 of file Tempus_TimeEventList_impl.hpp.

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

Destructor.

Definition at line 41 of file Tempus_TimeEventList_decl.hpp.

Member Function Documentation

template<class Scalar >
void Tempus::TimeEventList< Scalar >::addTime ( Scalar  time)
virtual

Definition at line 68 of file Tempus_TimeEventList_impl.hpp.

template<class Scalar >
virtual void Tempus::TimeEventList< Scalar >::clearTimeList ( )
inlinevirtual

Definition at line 66 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
void Tempus::TimeEventList< Scalar >::describe ( ) const
virtual

Describe member data.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 175 of file Tempus_TimeEventList_impl.hpp.

template<class Scalar >
bool Tempus::TimeEventList< Scalar >::eventInRange ( Scalar  time1,
Scalar  time2 
) const
virtual

Test if an event occurs within the time range.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 147 of file Tempus_TimeEventList_impl.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventList< Scalar >::getAbsTol ( ) const
inlinevirtual

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 71 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
virtual bool Tempus::TimeEventList< Scalar >::getLandOnExactly ( ) const
inlinevirtual

Definition at line 73 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventList< Scalar >::getRelTol ( ) const
inlinevirtual

Definition at line 68 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
virtual std::vector<Scalar> Tempus::TimeEventList< Scalar >::getTimeList ( ) const
inlinevirtual

Definition at line 63 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
bool Tempus::TimeEventList< Scalar >::isTime ( Scalar  time) const
virtual

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 109 of file Tempus_TimeEventList_impl.hpp.

template<class Scalar >
virtual void Tempus::TimeEventList< Scalar >::setLandOnExactly ( bool  LOE)
inlinevirtual

Definition at line 74 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
void Tempus::TimeEventList< Scalar >::setRelTol ( Scalar  relTol)
virtual

Definition at line 101 of file Tempus_TimeEventList_impl.hpp.

template<class Scalar >
void Tempus::TimeEventList< Scalar >::setTimeList ( std::vector< Scalar >  timeList)
virtual

Definition at line 60 of file Tempus_TimeEventList_impl.hpp.

template<class Scalar >
void Tempus::TimeEventList< Scalar >::setTimeScale ( )
protectedvirtual

Definition at line 39 of file Tempus_TimeEventList_impl.hpp.

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

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 123 of file Tempus_TimeEventList_impl.hpp.

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

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 116 of file Tempus_TimeEventList_impl.hpp.

Member Data Documentation

template<class Scalar >
Scalar Tempus::TimeEventList< Scalar >::absTol_
protected

Absolute time tolerance, relTol_*timeScale_.

Definition at line 86 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
bool Tempus::TimeEventList< Scalar >::landOnExactly_
protected

Should these time events be landed on exactly, i.e, adjust the timestep to hit time event, versus stepping over and keeping the time step unchanged.

Definition at line 87 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
Scalar Tempus::TimeEventList< Scalar >::relTol_
protected

Relative time tolerance for matching time events.

Definition at line 85 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
std::vector<Scalar> Tempus::TimeEventList< Scalar >::timeList_
protected

Sorted and unique list of time events.

Definition at line 82 of file Tempus_TimeEventList_decl.hpp.

template<class Scalar >
Scalar Tempus::TimeEventList< Scalar >::timeScale_
protected

A reference time scale, max(abs(start_,stop_)).

Definition at line 84 of file Tempus_TimeEventList_decl.hpp.


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