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

TimeEventRange specifies a start, stop and stride time. More...

#include <Tempus_TimeEventRange_decl.hpp>

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

Public Member Functions

 TimeEventRange ()
 Default constructor. More...
 
 TimeEventRange (std::string name, Scalar start, Scalar stop, Scalar stride, Scalar relTol, bool landOnExactly)
 Construct with full argument list of data members. More...
 
 TimeEventRange (std::string name, Scalar start, Scalar stop, int numEvents, Scalar relTol, bool landOnExactly)
 Construct with full argument list of data members. More...
 
virtual ~TimeEventRange ()
 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...
 
Accessor methods
virtual void setTimeRange (Scalar start, Scalar stop, Scalar stride)
 
virtual void setTimeRange (Scalar start, Scalar stop, int numEvents)
 
virtual Scalar getTimeStart () const
 
virtual void setTimeStart (Scalar start)
 
virtual Scalar getTimeStop () const
 
virtual void setTimeStop (Scalar stop)
 
virtual Scalar getTimeStride () const
 
virtual void setTimeStride (Scalar stride)
 
virtual int getNumEvents () const
 
virtual void setNumEvents (int numEvents)
 
virtual Scalar getRelTol () const
 
virtual void setRelTol (Scalar relTol)
 
virtual Scalar getAbsTol () const
 
virtual bool getLandOnExactly () const
 
virtual void setLandOnExactly (bool LOE)
 
virtual void describe () const
 Describe member data. More...
 
- 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

Scalar start_
 Start of time range. More...
 
Scalar stop_
 Stop of time range. More...
 
Scalar stride_
 Stride of time range. More...
 
unsigned numEvents_
 Number of events in time range. 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::TimeEventRange< Scalar >

TimeEventRange specifies a start, stop and stride time.

Definition at line 29 of file Tempus_TimeEventRange_decl.hpp.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 16 of file Tempus_TimeEventRange_impl.hpp.

template<class Scalar >
Tempus::TimeEventRange< Scalar >::TimeEventRange ( std::string  name,
Scalar  start,
Scalar  stop,
Scalar  stride,
Scalar  relTol,
bool  landOnExactly 
)

Construct with full argument list of data members.

Definition at line 32 of file Tempus_TimeEventRange_impl.hpp.

template<class Scalar >
Tempus::TimeEventRange< Scalar >::TimeEventRange ( std::string  name,
Scalar  start,
Scalar  stop,
int  numEvents,
Scalar  relTol,
bool  landOnExactly 
)

Construct with full argument list of data members.

Definition at line 50 of file Tempus_TimeEventRange_impl.hpp.

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

Destructor.

Definition at line 45 of file Tempus_TimeEventRange_decl.hpp.

Member Function Documentation

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

Describe member data.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 204 of file Tempus_TimeEventRange_impl.hpp.

template<class Scalar >
bool Tempus::TimeEventRange< 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 179 of file Tempus_TimeEventRange_impl.hpp.

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 84 of file Tempus_TimeEventRange_decl.hpp.

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

Definition at line 86 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
virtual int Tempus::TimeEventRange< Scalar >::getNumEvents ( ) const
inlinevirtual

Definition at line 78 of file Tempus_TimeEventRange_decl.hpp.

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

Definition at line 81 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventRange< Scalar >::getTimeStart ( ) const
inlinevirtual

Definition at line 69 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventRange< Scalar >::getTimeStop ( ) const
inlinevirtual

Definition at line 72 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
virtual Scalar Tempus::TimeEventRange< Scalar >::getTimeStride ( ) const
inlinevirtual

Definition at line 75 of file Tempus_TimeEventRange_decl.hpp.

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

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 143 of file Tempus_TimeEventRange_impl.hpp.

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

Definition at line 87 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
void Tempus::TimeEventRange< Scalar >::setNumEvents ( int  numEvents)
virtual

Definition at line 122 of file Tempus_TimeEventRange_impl.hpp.

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

Definition at line 135 of file Tempus_TimeEventRange_impl.hpp.

template<class Scalar >
virtual void Tempus::TimeEventRange< Scalar >::setTimeRange ( Scalar  start,
Scalar  stop,
Scalar  stride 
)
inlinevirtual

Definition at line 64 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
virtual void Tempus::TimeEventRange< Scalar >::setTimeRange ( Scalar  start,
Scalar  stop,
int  numEvents 
)
inlinevirtual

Definition at line 66 of file Tempus_TimeEventRange_decl.hpp.

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

Definition at line 90 of file Tempus_TimeEventRange_impl.hpp.

template<class Scalar >
void Tempus::TimeEventRange< Scalar >::setTimeStart ( Scalar  start)
virtual

Definition at line 70 of file Tempus_TimeEventRange_impl.hpp.

template<class Scalar >
void Tempus::TimeEventRange< Scalar >::setTimeStop ( Scalar  stop)
virtual

Definition at line 80 of file Tempus_TimeEventRange_impl.hpp.

template<class Scalar >
void Tempus::TimeEventRange< Scalar >::setTimeStride ( Scalar  stride)
virtual

Definition at line 104 of file Tempus_TimeEventRange_impl.hpp.

template<class Scalar >
Scalar Tempus::TimeEventRange< 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 157 of file Tempus_TimeEventRange_impl.hpp.

template<class Scalar >
Scalar Tempus::TimeEventRange< 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 150 of file Tempus_TimeEventRange_impl.hpp.

Member Data Documentation

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

Absolute time tolerance, relTol_*timeScale_.

Definition at line 105 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
bool Tempus::TimeEventRange< 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 106 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
unsigned Tempus::TimeEventRange< Scalar >::numEvents_
protected

Number of events in time range.

Definition at line 101 of file Tempus_TimeEventRange_decl.hpp.

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

Relative time tolerance for matching time events.

Definition at line 104 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
Scalar Tempus::TimeEventRange< Scalar >::start_
protected

Start of time range.

Definition at line 98 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
Scalar Tempus::TimeEventRange< Scalar >::stop_
protected

Stop of time range.

Definition at line 99 of file Tempus_TimeEventRange_decl.hpp.

template<class Scalar >
Scalar Tempus::TimeEventRange< Scalar >::stride_
protected

Stride of time range.

Definition at line 100 of file Tempus_TimeEventRange_decl.hpp.

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

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

Definition at line 103 of file Tempus_TimeEventRange_decl.hpp.


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