Loading...
Searching...
No Matches
Opm::Action::Actions Class Reference

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.

## Detailed Description

Container of action keywords.

Mainly provides a list of action keywords, i.e., ACTIONX and/or PYACTION, whose conditions are ready for evaluation.

## Constructor & Destructor Documentation

## Actions() [1/2]

Opm::Action::Actions::Actions | ( |  | ) |

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.

## Actions() [2/2]

Opm::Action::Actions::Actions | ( | const std::vector< ActionX > & | action,
|  | const std::vector< PyAction > & | pyactions )

Constructor.

Forms collection from sequences of individual action objects.

Parameters

  [in] | action | Sequence of action objects formed from ACTIONX keywords.
  [in] | pyactions | Sequence of action objects formed from PYACTION keywords.

## Member Function Documentation

## add() [1/2]

void Opm::Action::Actions::add | ( | const ActionX & | action | ) |

Include ActionX object in current collection.

Any existing ActionX object with the same name will be replaced.

Parameters

  [in] | action | Action object to include in the current collection.

## add() [2/2]

void Opm::Action::Actions::add | ( | const PyAction & | pyaction | ) |

Include PyAction object in current collection.

Any existing PyAction object with the same name will be replaced.

Parameters

  [in] | pyaction | Action object to include in the current collection.

## empty()

bool Opm::Action::Actions::empty | ( |  | ) | const

Whether or not this collection is empty.

True if this collection has neither ActionX nor PyAction objects.

## has()

bool Opm::Action::Actions::has | ( | const std::string & | name | ) | const

ActionX object existence predicate.

Parameters

  [in] | name | Action name.

Returns
  Whether or not `name` is among this collection's ActionX objects.

## max_input_lines()

int Opm::Action::Actions::max_input_lines | ( |  | ) | const

Maximum number of records in any one ACTIONX block.

Needed for restart file output purposes.

## operator==()

bool Opm::Action::Actions::operator== | ( | const Actions & | data | ) | const

Equality predicate.

Parameters

  [in] | data | Object against which will be tested for equality.

Returns
  Whether or not
  is the same as `data`.

## operator[]() [1/2]

const ActionX & Opm::Action::Actions::operator[] | ( | const std::string & | name | ) | const

Look up ActionX object by name.

Throws an exception of type

if no ActionX object with the particular name exists in the current collection.

Parameters

  [in] | name | ActionX object name.

Returns
  ActionX object whose

## operator[]() [2/2]

const ActionX & Opm::Action::Actions::operator[] | ( | std::size_t | index | ) | const

Look up ActionX object by linear index.

Parameters

  [in] | index | Object index. Must be in the range 0..ecl_size()-1.

Returns
  Associated ActionX object.

## pending()

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.

Parameters

  [in] | state | Current run's action state, especially run counts and trigger times.
  [in] | sim_time | Current simulation time.

Returns
  Those ActionX objects that are ready to run at this time.

## pending_python()

std::vector< const PyAction * > Opm::Action::Actions::pending_python | ( | const State & | state | ) | const

Retrieve PyAction objects that are ready to run.

Parameters

  [in] | state | Current run's action state, especially run counts.

Returns
  Those PyAction objects that are ready to run.

## ready()

bool Opm::Action::Actions::ready | ( | const State & | state,
|  | std::time_t | sim_time ) const

Runnability predicate.

Parameters

  [in] | state | Current run's action state, especially run counts and trigger times.
  [in] | sim_time | Current simulation time.

Returns
  Whether or not any ActionX objects in the current collection are ready to run at time `sim_time`.

## serializeOp()

template<class Serializer>

void Opm::Action::Actions::serializeOp | ( | Serializer & | serializer | ) |

inline

Convert between byte array and object representation.

Template Parameters

  Serializer | Byte array conversion protocol.

Parameters

  [in,out] | serializer | Byte array conversion object.

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

- opm/input/eclipse/Schedule/Action/Actions.hpp
- opm/input/eclipse/Schedule/Action/Actions.cpp