My Project
|
Container of action keywords. More...
#include <Actions.hpp>
Public Member Functions | |
Actions ()=default | |
Default constructor. | |
Actions (const std::vector< ActionX > &action, const std::vector< PyAction > &pyactions) | |
Constructor. | |
void | add (const ActionX &action) |
Include ActionX object in current collection. | |
void | add (const PyAction &pyaction) |
Include PyAction object in current collection. | |
std::size_t | ecl_size () const |
Number of ActionX objects in this collection. | |
std::size_t | py_size () const |
Number of PyAction objects in this collection. | |
int | max_input_lines () const |
Maximum number of records in any one ACTIONX block. | |
bool | empty () const |
Whether or not this collection is empty. | |
bool | ready (const State &state, std::time_t sim_time) const |
Runnability predicate. | |
const ActionX & | operator[] (const std::string &name) const |
Look up ActionX object by name. | |
const ActionX & | operator[] (std::size_t index) const |
Look up ActionX object by linear index. | |
std::vector< const ActionX * > | pending (const State &state, std::time_t sim_time) const |
Retrieve ActionX objects that are ready to run. | |
std::vector< const PyAction * > | pending_python (const State &state) const |
Retrieve PyAction objects that are ready to run. | |
bool | has (const std::string &name) const |
ActionX object existence predicate. | |
auto | begin () const |
Beginning of this collection's ActionX objects. | |
auto | end () const |
End of this collection's ActionX objects. | |
bool | operator== (const Actions &data) const |
Equality predicate. | |
template<class Serializer > | |
void | serializeOp (Serializer &serializer) |
Convert between byte array and object representation. | |
Static Public Member Functions | |
static Actions | serializationTestObject () |
Create a serialisation test object. | |
Container of action keywords.
Mainly provides a list of action keywords, i.e., ACTIONX and/or PYACTION, whose conditions are ready for evaluation.
|
default |
Default constructor.
Resulting object is primarily useful as a target of a deserialisation operation, although may be subsequently populated through the add() member functions.
Opm::Action::Actions::Actions | ( | const std::vector< ActionX > & | action, |
const std::vector< PyAction > & | pyactions | ||
) |
Constructor.
Forms collection from sequences of individual action objects.
[in] | action | Sequence of action objects formed from ACTIONX keywords. |
[in] | pyactions | Sequence of action objects formed from PYACTION keywords. |
void Opm::Action::Actions::add | ( | const ActionX & | action | ) |
void Opm::Action::Actions::add | ( | const PyAction & | pyaction | ) |
bool Opm::Action::Actions::empty | ( | ) | const |
bool Opm::Action::Actions::has | ( | const std::string & | name | ) | const |
int Opm::Action::Actions::max_input_lines | ( | ) | const |
Maximum number of records in any one ACTIONX block.
Needed for restart file output purposes.
bool Opm::Action::Actions::operator== | ( | const Actions & | data | ) | const |
Equality predicate.
[in] | data | Object against which *this
|
data
. const ActionX & Opm::Action::Actions::operator[] | ( | const std::string & | name | ) | const |
const ActionX & Opm::Action::Actions::operator[] | ( | std::size_t | index | ) | const |
Look up ActionX object by linear index.
[in] | index | Object index. Must be in the range 0..ecl_size()-1. |
std::vector< const ActionX * > Opm::Action::Actions::pending | ( | const State & | state, |
std::time_t | sim_time | ||
) | const |
Retrieve ActionX objects that are ready to run.
List comprised of those ActionX objects from the internal collection whose run counts have not exceeded their associate maximum limit, and for which the minimum wait time since last execution has passed.
[in] | state | Current run's action state, especially run counts and trigger times. |
[in] | sim_time | Current simulation time. |
bool Opm::Action::Actions::ready | ( | const State & | state, |
std::time_t | sim_time | ||
) | const |
Runnability predicate.
[in] | state | Current run's action state, especially run counts and trigger times. |
[in] | sim_time | Current simulation time. |
sim_time
.
|
inline |
Convert between byte array and object representation.
Serializer | Byte array conversion protocol. |
[in,out] | serializer | Byte array conversion object. |