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

Class Action::Result holds the boolean result of a ACTIONX condition like. More...

`#include <ActionResult.hpp>`

## Classes

class | ValueRange
| Random access range of values. More...
class | MatchingEntities
| Container of matching entities. More...
class | Impl
| Implementation of Action::Result. More...

## Public Member Functions

| Result (bool result_arg)
| Constructor.
| Result (const Result &rhs)
| Copy constructor.
| Result (Result &&rhs)
| Move constructor.
| ~Result ()
| Destructor.
Result & | wells (const std::vector< std::string > &w)
| Assignment operator.
bool | conditionSatisfied () const
| Predicate for whether or not the result set represents a 'true' value.
Result & | makeSetUnion (const Result &rhs)
| Incorporate another result set into the current set as if by set union.
Result & | makeSetIntersection (const Result &rhs)
| Incorporate another result set into the current set as if by set intersection.
const MatchingEntities & | matches () const
| Retrieve set of matching entities.
bool | operator== (const Result &that) const
| Equality predicate.

## Detailed Description

Class Action::Result holds the boolean result of a ACTIONX condition like.

WWCT > 0.75

In addition to the overall truthness of the expression an Action::Result instance can optionally have a set of matching entities such as wells or groups. For instance the the result of:

FWCT > 0.75

will not contain any wells, whereas the result of:

WWCT > 0.75

will contain a set of all the wells matching the condition. The set of matching entities can be queried with the matches() member function. When a result with matching entities and a result without matching entities are combined, for instance as,

WWCT > 0.50 AND FPR > 1000

the result will have all the wells corresponding to the first condition. When multiple results with matching entities are combined with logical operators AND and OR, the set of matching entities are combined accordingly–as a set union for 'OR' and a set intersection for 'AND'.

It is possible to have a result which evaluates to true and still have zero matching entities

WWCT > 1.25 OR FOPT > 1

in which case it is likely that the WWCT condition is false, but the FOPT condition is true. If the condition evaluates to true the set of matching entities will be passed to the Schedule::applyAction() method, and will be substituted in place of the name pattern '?' in keywords like WELOPEN.

## Constructor & Destructor Documentation

## Result() [1/3]

Opm::Action::Result::Result | ( | bool | result_arg | ) |

explicit

Constructor.

Creates a result set with a known condition value.

Parameters

  [in] | result_arg | Condition value.

## Result() [2/3]

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

Copy constructor.

Parameters

  [in] | rhs | Source object from which to form an independent copy.

## Result() [3/3]

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

Move constructor.

Parameters

  [in,out] | rhs | Source object from which form a new object. Left in an empty state on return from the move constructor.

## ~Result()

Opm::Action::Result::~Result | ( |  | ) |

default

Destructor.

Needed for PIMPL idiom.

## Member Function Documentation

## conditionSatisfied()

bool Opm::Action::Result::conditionSatisfied | ( |  | ) | const

Predicate for whether or not the result set represents a 'true' value.

Returns
  Result set's condition value–i.e., constructor argument.

## makeSetIntersection()

Opm::Action::Result & Opm::Action::Result::makeSetIntersection | ( | const Result & | rhs | ) |

Incorporate another result set into the current set as if by set intersection.

Final result set condition value is logical AND of the current condition value and that of the other result set. Set of matching entities is the intersection of the current set and that of the other result set, albeit with special case handling of empty sets of matching entities.

Parameters

  [in] | rhs | Other result set.

Returns
  after the `rhs` result set has been incorporated.

## makeSetUnion()

Opm::Action::Result & Opm::Action::Result::makeSetUnion | ( | const Result & | rhs | ) |

Incorporate another result set into the current set as if by set union.

Final result set condition value is logical OR of the current condition value and that of the other result set. Set of matching entities is union of the current set and that of the other result set.

Parameters

  [in] | rhs | Other result set.

Returns
  after the `rhs` result set has been incorporated.

## matches()

const Opm::Action::Result::MatchingEntities & Opm::Action::Result::matches | ( |  | ) | const

Retrieve set of matching entities.

Empty unless conditionSatisfied() is true.

Returns
  Set of matching entities.

## operator==()

bool Opm::Action::Result::operator== | ( | const Result & | that | ) | const

Equality predicate.

Parameters

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

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

## wells()

Opm::Action::Result & Opm::Action::Result::wells | ( | const std::vector< std::string > & | w | ) |

Assignment operator.

Parameters

  [in] | rhs | Source object whose value will overwrite Result& operator=(Result&& rhs);

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

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