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

This composite TimeEvent loops over added TimeEvents. More...

#include <Tempus_TimeEventComposite.hpp>

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

Public Member Functions

 TimeEventComposite ()
 Constructor. More...
 
virtual ~TimeEventComposite ()
 Destructor. More...
 
void addTimeEvent (Teuchos::RCP< TimeEventBase< Scalar > > timeEvent)
 
void clearTimeEvents ()
 
std::size_t getSize () const
 
virtual void describe () const
 Describe member data. 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 bool isIndex (int index) const
 Test if index is a time event.TimeEventBase. 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...
 
- Public Member Functions inherited from Tempus::TimeEventBase< Scalar >
 TimeEventBase ()
 Constructor. More...
 
virtual ~TimeEventBase ()
 Destructor. More...
 
virtual Scalar getAbsTol () const
 
virtual std::string getName () const
 
virtual void setName (std::string name)
 
virtual Scalar getDefaultTime () const
 
virtual Scalar getDefaultTol () const
 
virtual int getDefaultIndex () const
 

Protected Attributes

std::vector< Teuchos::RCP
< TimeEventBase< Scalar > > > 
timeEvents_
 

Detailed Description

template<class Scalar>
class Tempus::TimeEventComposite< Scalar >

This composite TimeEvent loops over added TimeEvents.

Individual TimeEvents are executed in the order in which they were added.

Definition at line 28 of file Tempus_TimeEventComposite.hpp.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 33 of file Tempus_TimeEventComposite.hpp.

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

Destructor.

Definition at line 39 of file Tempus_TimeEventComposite.hpp.

Member Function Documentation

template<class Scalar >
void Tempus::TimeEventComposite< Scalar >::addTimeEvent ( Teuchos::RCP< TimeEventBase< Scalar > >  timeEvent)
inline

Definition at line 173 of file Tempus_TimeEventComposite.hpp.

template<class Scalar >
void Tempus::TimeEventComposite< Scalar >::clearTimeEvents ( )
inline

Definition at line 179 of file Tempus_TimeEventComposite.hpp.

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

Describe member data.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 186 of file Tempus_TimeEventComposite.hpp.

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

Test if an event occurs within the time range.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 95 of file Tempus_TimeEventComposite.hpp.

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

Test if an event occurs within the time range.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 158 of file Tempus_TimeEventComposite.hpp.

template<class Scalar >
std::size_t Tempus::TimeEventComposite< Scalar >::getSize ( ) const
inline

Definition at line 183 of file Tempus_TimeEventComposite.hpp.

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

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 127 of file Tempus_TimeEventComposite.hpp.

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

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 121 of file Tempus_TimeEventComposite.hpp.

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

Test if index is a time event.TimeEventBase.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 108 of file Tempus_TimeEventComposite.hpp.

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

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 44 of file Tempus_TimeEventComposite.hpp.

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

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 63 of file Tempus_TimeEventComposite.hpp.

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

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

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 57 of file Tempus_TimeEventComposite.hpp.

Member Data Documentation

template<class Scalar >
std::vector<Teuchos::RCP<TimeEventBase<Scalar > > > Tempus::TimeEventComposite< Scalar >::timeEvents_
protected

Definition at line 203 of file Tempus_TimeEventComposite.hpp.


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