My Project
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  Impl
 Implementation of Action::Result. More...
 
class  MatchingEntities
 Container of matching entities. More...
 
class  ValueRange
 Random access range of values. More...
 

Public Member Functions

 Result (bool result_arg)
 Constructor.
 
 Result (const Result &rhs)
 Copy constructor.
 
 Result (Result &&rhs)
 Move constructor.
 
 ~Result ()
 Destructor.
 
ResultmakeSetUnion (const Result &rhs)
 Assignment operator.
 
ResultmakeSetIntersection (const Result &rhs)
 Incorporate another result set into the current set as if by set intersection.
 
const MatchingEntitiesmatches () 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_argCondition value.

◆ Result() [2/3]

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

Copy constructor.

Parameters
[in]rhsSource object from which to form an independent copy.

◆ Result() [3/3]

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

Move constructor.

Parameters
[in,out]rhsSource 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

◆ 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]rhsOther result set.
Returns
*this
after the rhs result set has been incorporated.

◆ makeSetUnion()

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

Assignment operator.

Parameters
[in]rhsSource object whose value will overwrite
*this.
\return *this.
Result& operator=(const Result& rhs);
Move-assignment operator.
\param[in] rhs Source object which will be moved into \code *this.
Left in an empty state on return from the move constructor.
\return *this.
Result& operator=(Result&& rhs);
Include a sequence of well names as matching entities.
Duplicates, if any, will be ignored.
\param[in] w Sequence of well names.
\return *this.
Result& wells(const std::vector<std::string>& w);
Predicate for whether or not the result set represents a 'true'
value.
\return Result set's condition value--i.e., constructor argument.
bool conditionSatisfied() const;
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.
\param[in] rhs Other result set.
\return \code *this
Class Action::Result holds the boolean result of a ACTIONX condition like.
Definition ActionResult.hpp:69
Definition Source.hpp:44
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]thatObject against which
*this
will be tested for equality.
Returns
Whether or not
*this
is the same as that.

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