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

Expression evaluation tree of a full ACTIONX condition block. More...

`#include <ActionAST.hpp>`

## Public Member Functions

| AST ()
| Default constructor.
| AST (const std::vector< std::string > &tokens)
| Constructor.
| ~AST ()
| Destructor.
| AST (const AST &rhs)
| Copy constructor.
| AST (AST &&rhs)
| Move constructor.
AST & | operator= (const AST &rhs)
| Assignment operator.
AST & | operator= (AST &&rhs)
| Move assignment operator.
Result | eval (const Context &context) const
| Evaluate the expression tree at current dynamic state.
bool | operator== (const AST &data) const
| Equality predicate.
template<class Serializer>
void | serializeOp (Serializer &serializer)
| Convert between byte array and object representation.
void | required_summary (std::unordered_set< std::string > &required_summary) const
| Export all summary vectors needed to evaluate the expression tree.

## Static Public Member Functions

static AST | serializationTestObject ()
| Create a serialisation test object.

## Detailed Description

Expression evaluation tree of a full ACTIONX condition block.

There is no additional context such as current summary vector values or a set of active wells. This must be supplied through an Action::Context instace when invoking the eval() member function.

## Constructor & Destructor Documentation

## AST() [1/4]

Opm::Action::AST::AST | ( |  | ) |

default

Default constructor.

Creates an empty object with no internal condition. Mostly useful as a target for an object deserialisation process.

## AST() [2/4]

Opm::Action::AST::AST | ( | const std::vector< std::string > & | tokens | ) |

explicit

Constructor.

Forms the internal expression tree by parsing a sequence of text tokens.

Parameters

  [in] | tokens | Tokenised textual representation of an ACTIONX condition block.

## AST() [3/4]

Opm::Action::AST::AST | ( | const AST & | rhs | ) |

Copy constructor.

Parameters

  [in] | rhs | Source object.

## AST() [4/4]

Opm::Action::AST::AST | ( | AST && | rhs | ) |

Move constructor.

Parameters

  [in,out] | rhs | Source object. In a valid but unspecified state on exit.

## Member Function Documentation

## eval()

Opm::Action::Result Opm::Action::AST::eval | ( | const Context & | context | ) | const

Evaluate the expression tree at current dynamic state.

Parameters

  [in] | context | Current summary vectors and wells

Returns
  Condition value. A 'true' result means the condition is satisfied while a 'false' result means the condition is not satisfied. Any wells for which the expression is true will be included in the result set. A 'false' result has no matching wells.

## operator=() [1/2]

Opm::Action::AST & Opm::Action::AST::operator= | ( | AST && | rhs | ) |

Move assignment operator.

Parameters

  [in,out] | rhs | Source object. In a valid but unspecified state on exit.

Returns

## operator=() [2/2]

Opm::Action::AST & Opm::Action::AST::operator= | ( | const AST & | rhs | ) |

Assignment operator.

Parameters

  [in] | rhs | Source object.

Returns

## operator==()

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

Equality predicate.

Parameters

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

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

## required_summary()

void Opm::Action::AST::required_summary | ( | std::unordered_set< std::string > & | required_summary | ) | const

Export all summary vectors needed to evaluate the expression tree.

Parameters

  [in,out] | required_summary | Named summary vectors. Upon completion, any additional summary vectors needed to evaluate the full condition block of the current AST object will be included in this set.

## serializeOp()

template<class Serializer>

void Opm::Action::AST::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/ActionAST.hpp
- opm/input/eclipse/Schedule/Action/ActionAST.cpp