opm-common
Opm::WellCompletionEvents Class Reference

Collection of events associated to specific completions of named wells. More...

#include <Events.hpp>

Public Member Functions

void addEvent (const std::string &wname, int complnum, ScheduleEvents::Events event)
 Add a single event for a specific completion of a named well. More...
 
void clearEvent (const std::string &wname, int complnum, std::uint64_t eventMask)
 Remove one or more individual events from the collection tied to a single completion of a named well. More...
 
void reset ()
 Remove all events for all known wells and completions. More...
 
void merge (const WellCompletionEvents &events)
 Merge current event collection with other. More...
 
bool hasEvent (const std::string &wname, int complnum, std::uint64_t eventMask) const
 Query current collection for one or more specific events associated to a specific completion of a named well. More...
 
bool operator== (const WellCompletionEvents &data) const
 Equality predicate. More...
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 Convert between byte array and object representation. More...
 

Static Public Member Functions

static WellCompletionEvents serializationTestObject ()
 Create a serialisation test object.
 

Detailed Description

Collection of events associated to specific completions of named wells.

Keyed by well name plus completion number (set by COMPDAT/COMPLNUM, referenced by e.g. WELOPEN), since completions have no stable name. Unlike WellGroupEvents, pairs need not be registered up front: addEvent() creates entries on first use.

Member Function Documentation

◆ addEvent()

void Opm::WellCompletionEvents::addEvent ( const std::string &  wname,
int  complnum,
ScheduleEvents::Events  event 
)

Add a single event for a specific completion of a named well.

Parameters
[in]wnameWell name.
[in]complnumCompletion number within wname.
[in]eventSingle named event. If event already exists for the (wname, complnum) pair, then this function does nothing.

◆ clearEvent()

void Opm::WellCompletionEvents::clearEvent ( const std::string &  wname,
int  complnum,
std::uint64_t  eventMask 
)

Remove one or more individual events from the collection tied to a single completion of a named well.

Parameters
[in]wnameWell name.
[in]complnumCompletion number within wname.
[in]eventMaskOne or more events combined using bitwise 'or' ('|'). All events for the (wname, complnum) pair that are set in eventMask will be cleared.

◆ hasEvent()

bool Opm::WellCompletionEvents::hasEvent ( const std::string &  wname,
int  complnum,
std::uint64_t  eventMask 
) const

Query current collection for one or more specific events associated to a specific completion of a named well.

Parameters
[in]wnameWell name.
[in]complnumCompletion number within wname.
[in]eventMaskBit mask of events for which to check existence.
Returns
Whether or not at least one of the events represented in eventMask is active for the (wname, complnum) pair in the current collection.

◆ merge()

void Opm::WellCompletionEvents::merge ( const WellCompletionEvents events)

Merge current event collection with other.

Resulting collection (*this) has the union of the events for all (well, completion) pairs in both collections.

◆ operator==()

bool Opm::WellCompletionEvents::operator== ( const WellCompletionEvents data) const

Equality predicate.

Parameters
[in]dataObject against which
*this
will be tested for equality.
Returns
Whether or not
*this
is the same as data.

◆ reset()

void Opm::WellCompletionEvents::reset ( )

Remove all events for all known wells and completions.

Typically used only when preparing the events system for a new report step as part of Schedule object initialisation.

◆ serializeOp()

template<class Serializer >
void Opm::WellCompletionEvents::serializeOp ( Serializer serializer)
inline

Convert between byte array and object representation.

Template Parameters
SerializerByte array conversion protocol.
Parameters
[in,out]serializerByte array conversion object.

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