My Project
|
Public Member Functions | |
ActionX () | |
Default constructor. | |
ActionX (const std::string &name, std::size_t max_run, double min_wait, std::time_t start_time) | |
Constructor. | |
ActionX (const DeckRecord &record, std::time_t start_time) | |
Constructor. | |
ActionX (const RestartIO::RstAction &rst_action) | |
Constructor. | |
ActionX (const std::string &name, std::size_t max_run, double min_wait, std::time_t start_time, std::vector< Condition > &&conditions, const std::vector< std::string > &tokens) | |
Constructor. | |
void | addKeyword (const DeckKeyword &kw) |
Include SCHEDULE section keyword in block executed when action triggers. | |
bool | ready (const State &state, std::time_t sim_time) const |
Query whether or not the current ActionX object is ready to run. | |
Result | eval (const Context &context) const |
Evaluate the action's conditions at current dynamic state. | |
std::vector< std::string > | wellpi_wells (const WellMatcher &well_matcher, const Result::MatchingEntities &matches) const |
Retrive list of well names used in action block WELPI keywords. | |
void | required_summary (std::unordered_set< std::string > &required_summary) const |
Export all summary vectors needed to evaluate the conditions of the current ActionX object. | |
std::string | name () const |
Retrieve name of action object. | |
std::size_t | max_run () const |
Retrieve maximum number of times this action can run/trigger. | |
double | min_wait () const |
Retrieve minimum wait time, in seconds of simulated time, between action triggers. | |
std::size_t | id () const |
Retrieve distinguishing numeric ID of this action object. | |
void | update_id (std::size_t id) |
Assign distinguishing numeric ID of this action object. | |
std::time_t | start_time () const |
Retrieve point in time at which this action object is created. | |
auto | begin () const |
Start of action block SCHEDULE keyword sequence. | |
auto | end () const |
End of action block SCHEDULE keyword sequence. | |
const std::vector< Condition > & | conditions () const |
Intermediate representation of triggering conditions for restart file output purposes. | |
std::vector< std::string > | keyword_strings () const |
Textual representation of action block SCHEDULE keywords. | |
bool | operator== (const ActionX &data) const |
Equality predicate. | |
template<class Serializer > | |
void | serializeOp (Serializer &serializer) |
Convert between byte array and object representation. | |
Static Public Member Functions | |
static bool | valid_keyword (const std::string &keyword) |
Keyword validity predicate. | |
static ActionX | serializationTestObject () |
Create a serialisation test object. | |
Opm::Action::ActionX::ActionX | ( | ) |
Default constructor.
Creates an invalid object that is only usable as a target for a deserialisation process.
Opm::Action::ActionX::ActionX | ( | const std::string & | name, |
std::size_t | max_run, | ||
double | min_wait, | ||
std::time_t | start_time | ||
) |
Constructor.
Creates an invalid object without any triggering conditions. Mostly usable as an error state.
[in] | name | Name of action object. Typically from first record of ACTIONX keyword. |
[in] | max_run | Maximum number of times this action can run/trigger. A value of zero is treated as an unlimited number of runs. |
[in] | min_wait | Minimum wait time, in seconds, between two successful triggerings of this action object. |
[in] | start_time | Point in time at which this action object is created. Typically the simulated time at the start of the report step at which an ACTIONX keyword is encountered. The first wait time is relative to this start time. |
Opm::Action::ActionX::ActionX | ( | const DeckRecord & | record, |
std::time_t | start_time | ||
) |
Constructor.
Creates an invalid object that is mostly usable as an error state. Delegates to four argument constructor.
[in] | record | First record of an ACTIONX keyword. |
[in] | start_time | Point in time at which this action object is created. Typically the simulated time at the start of the report step at which an ACTIONX keyword is encountered. The first wait time is relative to this start time. |
|
explicit |
Constructor.
Forms the ActionX object based on restart file information.
[in] | rst_action | Restart file representation of an ACTIONX block. |
Opm::Action::ActionX::ActionX | ( | const std::string & | name, |
std::size_t | max_run, | ||
double | min_wait, | ||
std::time_t | start_time, | ||
std::vector< Condition > && | conditions, | ||
const std::vector< std::string > & | tokens | ||
) |
Constructor.
Internalises the triggering condition into an expression tree and records minimum wait time and maximum run counts. Associate SCHEDULE keywords to run when the action triggers must be included through addKeyword() calls.
[in] | name | Name of action object. Typically from first record of ACTIONX keyword. |
[in] | max_run | Maximum number of times this action can run/trigger. A value of zero is treated as an unlimited number of runs. |
[in] | min_wait | Minimum wait time, in seconds, between two successful triggerings of this action object. |
[in] | start_time | Point in time at which this action object is created. Typically the simulated time at the start of the report step at which an ACTIONX keyword is encountered. The first wait time is relative to this start time. |
[in] | conditions | Partially formed individual statements of the triggering conditions for this action. For restart file output purposes. |
[in] | tokens | Textual representation of condition block. Will be used to form the internal expression tree representation of the triggering condition. |
void Opm::Action::ActionX::addKeyword | ( | const DeckKeyword & | kw | ) |
Include SCHEDULE section keyword in block executed when action triggers.
[in] | kw | SCHEDULE section keyword. |
Evaluate the action's conditions at current dynamic state.
[in] | context | Current summary vectors and wells |
std::vector< std::string > Opm::Action::ActionX::keyword_strings | ( | ) | const |
Textual representation of action block SCHEDULE keywords.
For restart file output purposes.
bool Opm::Action::ActionX::operator== | ( | const ActionX & | data | ) | const |
Equality predicate.
[in] | data | Object against which *this
|
data
. bool Opm::Action::ActionX::ready | ( | const State & | state, |
std::time_t | sim_time | ||
) | const |
Query whether or not the current ActionX object is ready to run.
Will typically consider at least the object's current run count and wait times.
[in] | state | Dynamic run count and run time. |
[in] | sim_time | Simulated time since simulation start. |
void Opm::Action::ActionX::required_summary | ( | std::unordered_set< std::string > & | required_summary | ) | const |
|
inline |
Convert between byte array and object representation.
Serializer | Byte array conversion protocol. |
[in,out] | serializer | Byte array conversion object. |
|
inline |
Retrieve point in time at which this action object is created.
Typically the simulated time at the start of the report step at which an ACTIONX keyword is encountered. The first wait time is relative to this start time.
void Opm::Action::ActionX::update_id | ( | std::size_t | id | ) |
Assign distinguishing numeric ID of this action object.
Typically invoked only if encountering an ACTIONX keyword naming the same action object as an earlier ACTIONX keyword.
|
static |
Keyword validity predicate.
[in] | keyword | Name of SCHEDULE section keyword. |
keyword
in an ACTIONX block. std::vector< std::string > Opm::Action::ActionX::wellpi_wells | ( | const WellMatcher & | well_matcher, |
const Result::MatchingEntities & | matches | ||
) | const |
Retrive list of well names used in action block WELPI keywords.
[in] | well_matcher | Final arbiter for wells currently known to simulator. |
[in] | matches | List of entities for which the current action triggered. Function wellpi_wells() will only inspect the set of matching/triggering wells, and only if a WELPI keyword in the current action's keyword block uses the well name pattern "?". |
well_matcher
.