Tempus
Version of the Day
Time Integration
|
TimeEventListIndex specifies a list of index events. More...
#include <Tempus_TimeEventListIndex_decl.hpp>
Public Member Functions | |
TimeEventListIndex () | |
Default constructor. More... | |
TimeEventListIndex (std::vector< int > indexList, std::string name="TimeEventListIndex") | |
Construct with full argument list of data members. More... | |
virtual | ~TimeEventListIndex () |
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 | |
std::vector< int > | indexList_ |
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 std::vector< int > | getIndexList () const |
Return a vector of event indices. More... | |
virtual void | setIndexList (std::vector< int > indexList, bool sort=true) |
Set the vector of event indices. More... | |
virtual void | addIndex (int index) |
Add the index to event vector. More... | |
virtual void | clearIndexList () |
Clear the vector of all events. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Tempus::TimeEventBase< Scalar > | |
virtual void | setType (std::string s) |
TimeEventListIndex specifies a list of index events.
Definition at line 28 of file Tempus_TimeEventListIndex_decl.hpp.
Tempus::TimeEventListIndex< Scalar >::TimeEventListIndex | ( | ) |
Default constructor.
Definition at line 16 of file Tempus_TimeEventListIndex_impl.hpp.
Tempus::TimeEventListIndex< Scalar >::TimeEventListIndex | ( | std::vector< int > | indexList, |
std::string | name = "TimeEventListIndex< Scalar >" |
||
) |
Construct with full argument list of data members.
Definition at line 23 of file Tempus_TimeEventListIndex_impl.hpp.
|
inlinevirtual |
Destructor.
Definition at line 38 of file Tempus_TimeEventListIndex_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 70 of file Tempus_TimeEventListIndex_impl.hpp.
|
virtual |
How many indices until the next event.
index | [in] The input index. |
Reimplemented from Tempus::TimeEventBase< Scalar >.
Definition at line 77 of file Tempus_TimeEventListIndex_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 83 of file Tempus_TimeEventListIndex_impl.hpp.
|
virtual |
Test if an event occurs within the index range.
Find if an event is within the input range, ( 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 100 of file Tempus_TimeEventListIndex_impl.hpp.
|
virtual |
Describe member data.
Reimplemented from Tempus::TimeEventBase< Scalar >.
Definition at line 125 of file Tempus_TimeEventListIndex_impl.hpp.
|
inlinevirtual |
Return a vector of event indices.
Definition at line 90 of file Tempus_TimeEventListIndex_decl.hpp.
|
virtual |
Set the vector of event indices.
This will completely replace the vector of event indices.
indexList | [in] Vector of event indices. |
sort | [in] Sort vector into ascending order, if true. |
Definition at line 41 of file Tempus_TimeEventListIndex_impl.hpp.
|
virtual |
Add the index to event vector.
The input index will be inserted into the vector of events in ascending order. If the index is already present, it is not added to keep the vector unique.
index | [in] Index to insert to vector of events. |
Definition at line 53 of file Tempus_TimeEventListIndex_impl.hpp.
|
inlinevirtual |
Clear the vector of all events.
Definition at line 112 of file Tempus_TimeEventListIndex_decl.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 createTimeEventListIndex(...).
Reimplemented from Tempus::TimeEventBase< Scalar >.
Definition at line 149 of file Tempus_TimeEventListIndex_impl.hpp.
|
protected |
Definition at line 126 of file Tempus_TimeEventListIndex_decl.hpp.