Tempus
Version of the Day
Time Integration
|
TimeEventRangeIndex specifies a start, stop and stride index. More...
#include <Tempus_TimeEventRangeIndex_decl.hpp>
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) |
TimeEventRangeIndex specifies a start, stop and stride index.
Definition at line 28 of file Tempus_TimeEventRangeIndex_decl.hpp.
Tempus::TimeEventRangeIndex< Scalar >::TimeEventRangeIndex | ( | ) |
Default constructor.
Definition at line 16 of file Tempus_TimeEventRangeIndex_impl.hpp.
Tempus::TimeEventRangeIndex< Scalar >::TimeEventRangeIndex | ( | int | start, |
int | stop, | ||
int | stride, | ||
std::string | name = "" |
||
) |
Construct with full argument list of data members.
Definition at line 28 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 37 of file Tempus_TimeEventRangeIndex_decl.hpp.
|
virtual |
Test if index is a time event.
Return true if an event is the input index.
index | [in] The input index. |
Reimplemented from Tempus::TimeEventBase< Scalar >.
Definition at line 90 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
virtual |
How many indices until the next event.
index | [in] The input index. |
Reimplemented from Tempus::TimeEventBase< Scalar >.
Definition at line 100 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
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.
index | [in] Input index. |
Reimplemented from Tempus::TimeEventBase< Scalar >.
Definition at line 106 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
virtual |
Test if an event occurs within the index range.
Find if an event is within the input range, inclusively ( index1 <= event <= index2 ).
index1 | [in] Input index of one end of the range. |
index2 | [in] Input index of the other end of the range. |
Reimplemented from Tempus::TimeEventBase< Scalar >.
Definition at line 124 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
virtual |
Describe member data.
Reimplemented from Tempus::TimeEventBase< Scalar >.
Definition at line 152 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
inlinevirtual |
Set the range of event indices.
This will completely replace the range
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 96 of file Tempus_TimeEventRangeIndex_decl.hpp.
|
inlinevirtual |
Return the start of the index range.
Definition at line 104 of file Tempus_TimeEventRangeIndex_decl.hpp.
|
virtual |
Set the start of the index range.
Definition at line 47 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
inlinevirtual |
Return the stop of the index range.
Definition at line 109 of file Tempus_TimeEventRangeIndex_decl.hpp.
|
virtual |
Set the stop of the index range.
Definition at line 57 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
inlinevirtual |
Return the stride of the index range.
Definition at line 114 of file Tempus_TimeEventRangeIndex_decl.hpp.
|
virtual |
Set the stride of the index range.
Definition at line 68 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
inlinevirtual |
Return the number of events.
Definition at line 119 of file Tempus_TimeEventRangeIndex_decl.hpp.
|
virtual |
Set the number of events from start_, stop_ and stride_.
Definition at line 81 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
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(...).
Reimplemented from Tempus::TimeEventBase< Scalar >.
Definition at line 171 of file Tempus_TimeEventRangeIndex_impl.hpp.
|
protected |
Start of index range.
Definition at line 136 of file Tempus_TimeEventRangeIndex_decl.hpp.
|
protected |
Stop of index range.
Definition at line 137 of file Tempus_TimeEventRangeIndex_decl.hpp.
|
protected |
Stride of index range.
Definition at line 138 of file Tempus_TimeEventRangeIndex_decl.hpp.
|
protected |
Number of events in index range.
Definition at line 139 of file Tempus_TimeEventRangeIndex_decl.hpp.