Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
Tempus::TimeEventRangeIndex< Scalar > Class Template Reference

TimeEventRangeIndex specifies a start, stop and stride index. More...

#include <Tempus_TimeEventRangeIndex_decl.hpp>

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

Public Member Functions

 TimeEventRangeIndex ()
 Default constructor. More...
 
 TimeEventRangeIndex (int start, int stop, int stride, std::string name="")
 Construct with full argument list of data members. More...
 
virtual ~TimeEventRangeIndex ()
 Destructor. More...
 
Teuchos::RCP< const
Teuchos::ParameterList
getValidParameters () const
 Return a valid ParameterList with current settings. More...
 
- Public Member Functions inherited from Tempus::TimeEventBase< Scalar >
 TimeEventBase ()
 Constructor. More...
 
virtual ~TimeEventBase ()
 Destructor. More...
 
virtual bool isTime (Scalar time) const
 Test if time is near an event (within tolerance). More...
 
virtual Scalar timeToNextEvent (Scalar time) const
 How much time until the next event. More...
 
virtual Scalar timeOfNextEvent (Scalar time) const
 Return the time of the next event following the input time. More...
 
virtual bool eventInRange (Scalar time1, Scalar time2) const
 Test if an event occurs within the time range. More...
 
virtual Scalar getAbsTol () const
 Return the absolute tolerance. More...
 
virtual bool getLandOnExactly () const
 Return if the time events need to be landed on exactly. More...
 
virtual std::string getName () const
 Return the name of the TimeEvent. More...
 
virtual void setName (std::string name)
 Set the name of the TimeEvent. More...
 
virtual std::string getType () const
 Return the type of TimeEvent. More...
 
virtual Scalar getDefaultTime () const
 Return the default time used for TimeEvents. More...
 
virtual Scalar getDefaultTol () const
 Return the default tolerance used by TimeEvents. More...
 
virtual int getDefaultIndex () const
 Return the default index used by TimeEvents. More...
 

Protected Attributes

int start_
 Start of index range. More...
 
int stop_
 Stop of index range. More...
 
int stride_
 Stride of index range. More...
 
unsigned numEvents_
 Number of events in index range. More...
 

Basic methods

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. More...
 
virtual int indexOfNextEvent (int index) const
 Return the index of the next event following the input index. More...
 
virtual bool eventInRangeIndex (int index1, int index2) const
 Test if an event occurs within the index range. More...
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 Describe member data. More...
 

Accessor methods

virtual void setIndexRange (int start, int stop, int stride)
 Set the range of event indices. More...
 
virtual int getIndexStart () const
 Return the start of the index range. More...
 
virtual void setIndexStart (int start)
 Set the start of the index range. More...
 
virtual int getIndexStop () const
 Return the stop of the index range. More...
 
virtual void setIndexStop (int stop)
 Set the stop of the index range. More...
 
virtual int getIndexStride () const
 Return the stride of the index range. More...
 
virtual void setIndexStride (int stride)
 Set the stride of the index range. More...
 
virtual int getNumEvents () const
 Return the number of events. More...
 
virtual void setNumEvents ()
 Set the number of events from start_, stop_ and stride_. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Tempus::TimeEventBase< Scalar >
virtual void setType (std::string s)
 

Detailed Description

template<class Scalar>
class Tempus::TimeEventRangeIndex< Scalar >

TimeEventRangeIndex specifies a start, stop and stride index.

Definition at line 27 of file Tempus_TimeEventRangeIndex_decl.hpp.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 15 of file Tempus_TimeEventRangeIndex_impl.hpp.

template<class Scalar >
Tempus::TimeEventRangeIndex< Scalar >::TimeEventRangeIndex ( int  start,
int  stop,
int  stride,
std::string  name = "" 
)

Construct with full argument list of data members.

Definition at line 27 of file Tempus_TimeEventRangeIndex_impl.hpp.

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

Destructor.

Definition at line 36 of file Tempus_TimeEventRangeIndex_decl.hpp.

Member Function Documentation

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

Test if index is a time event.

Return true if an event is the input index.

Parameters
index[in] The input index.
Returns
True if index is an event.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 89 of file Tempus_TimeEventRangeIndex_impl.hpp.

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

How many indices until the next event.

Parameters
index[in] The input index.
Returns
The number of steps (indices) to the next event.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 99 of file Tempus_TimeEventRangeIndex_impl.hpp.

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

Return the index of the next event following the input index.

Returns the index of the next event that follows the input index. If the input index is before all events, the index of the first event is returned. If the input index is after all events, the default index (an index in the distant future) is returned. If the input index is an event index, the index of the next event is returned.

Parameters
index[in] Input index.
Returns
Index of the next event.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 105 of file Tempus_TimeEventRangeIndex_impl.hpp.

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

Test if an event occurs within the index range.

Find if an event is within the input range, inclusively ( index1 <= event <= index2 ).

Parameters
index1[in] Input index of one end of the range.
index2[in] Input index of the other end of the range.
Returns
True if an index event is within the range.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 123 of file Tempus_TimeEventRangeIndex_impl.hpp.

template<class Scalar >
void Tempus::TimeEventRangeIndex< Scalar >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel 
) const
virtual

Describe member data.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 151 of file Tempus_TimeEventRangeIndex_impl.hpp.

template<class Scalar >
virtual void Tempus::TimeEventRangeIndex< Scalar >::setIndexRange ( int  start,
int  stop,
int  stride 
)
inlinevirtual

Set the range of event indices.

This will completely replace the range

Parameters
start[in] The start of the index range.
stop[in] The stop of the index range.
stride[in] The stride of the index range.

Definition at line 95 of file Tempus_TimeEventRangeIndex_decl.hpp.

template<class Scalar >
virtual int Tempus::TimeEventRangeIndex< Scalar >::getIndexStart ( ) const
inlinevirtual

Return the start of the index range.

Definition at line 103 of file Tempus_TimeEventRangeIndex_decl.hpp.

template<class Scalar >
void Tempus::TimeEventRangeIndex< Scalar >::setIndexStart ( int  start)
virtual

Set the start of the index range.

Definition at line 46 of file Tempus_TimeEventRangeIndex_impl.hpp.

template<class Scalar >
virtual int Tempus::TimeEventRangeIndex< Scalar >::getIndexStop ( ) const
inlinevirtual

Return the stop of the index range.

Definition at line 108 of file Tempus_TimeEventRangeIndex_decl.hpp.

template<class Scalar >
void Tempus::TimeEventRangeIndex< Scalar >::setIndexStop ( int  stop)
virtual

Set the stop of the index range.

Definition at line 56 of file Tempus_TimeEventRangeIndex_impl.hpp.

template<class Scalar >
virtual int Tempus::TimeEventRangeIndex< Scalar >::getIndexStride ( ) const
inlinevirtual

Return the stride of the index range.

Definition at line 113 of file Tempus_TimeEventRangeIndex_decl.hpp.

template<class Scalar >
void Tempus::TimeEventRangeIndex< Scalar >::setIndexStride ( int  stride)
virtual

Set the stride of the index range.

Definition at line 67 of file Tempus_TimeEventRangeIndex_impl.hpp.

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

Return the number of events.

Definition at line 118 of file Tempus_TimeEventRangeIndex_decl.hpp.

template<class Scalar >
void Tempus::TimeEventRangeIndex< Scalar >::setNumEvents ( )
virtual

Set the number of events from start_, stop_ and stride_.

Definition at line 80 of file Tempus_TimeEventRangeIndex_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Teuchos::ParameterList > Tempus::TimeEventRangeIndex< Scalar >::getValidParameters ( ) const
virtual

Return a valid ParameterList with current settings.

The returned ParameterList will contain the current parameters and can be used to reconstruct the exact same object using createTimeEventRangeIndex(...).

Returns
Teuchos::ParameterList of TimeEventRangeIndex.

Reimplemented from Tempus::TimeEventBase< Scalar >.

Definition at line 170 of file Tempus_TimeEventRangeIndex_impl.hpp.

Member Data Documentation

template<class Scalar >
int Tempus::TimeEventRangeIndex< Scalar >::start_
protected

Start of index range.

Definition at line 135 of file Tempus_TimeEventRangeIndex_decl.hpp.

template<class Scalar >
int Tempus::TimeEventRangeIndex< Scalar >::stop_
protected

Stop of index range.

Definition at line 136 of file Tempus_TimeEventRangeIndex_decl.hpp.

template<class Scalar >
int Tempus::TimeEventRangeIndex< Scalar >::stride_
protected

Stride of index range.

Definition at line 137 of file Tempus_TimeEventRangeIndex_decl.hpp.

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

Number of events in index range.

Definition at line 138 of file Tempus_TimeEventRangeIndex_decl.hpp.


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