opm-common
Loading...
Searching...
No Matches
Opm::WellGroupEvents Class Reference

Collection of events tied to a time and associated to specific, named wells or groups. More...

#include <Events.hpp>

Public Member Functions

void addWell (const std::string &wname)
 Include a named well into the events collection.
void addGroup (const std::string &gname)
 Include a named group in the events collection.
void addEvent (const std::string &wgname, ScheduleEvents::Events event)
 Add a single event for a named well or group.
void clearEvent (const std::string &wgname, std::uint64_t eventMask)
 Remove one or more individual events from the collection tied to a single named well or group.
void reset ()
 Remove all events for all known wells and groups.
void merge (const WellGroupEvents &events)
 Merge current event collection with other.
bool has (const std::string &wgname) const
 Check if any events have ever been registered for a named well or group.
bool hasEvent (const std::string &wgname, std::uint64_t eventMask) const
 Query current collection for one or more specific events associated to a specific well or group.
const Eventsat (const std::string &wgname) const
 Look up collection of events for named well or group.
bool operator== (const WellGroupEvents &data) const
 Equality predicate.
template<class Serializer>
void serializeOp (Serializer &serializer)
 Convert between byte array and object representation.

Static Public Member Functions

static WellGroupEvents serializationTestObject ()
 Create a serialisation test object.

Detailed Description

Collection of events tied to a time and associated to specific, named wells or groups.

Member Function Documentation

◆ addEvent()

void Opm::WellGroupEvents::addEvent ( const std::string & wgname,
ScheduleEvents::Events event )

Add a single event for a named well or group.

Parameters
[in]wgnameWell or group name.
[in]eventSingle named event. If event already exists for wgname, then this function does nothing.

◆ addGroup()

void Opm::WellGroupEvents::addGroup ( const std::string & gname)

Include a named group in the events collection.

Typically used in the handlers for the 'WELSPECS' and GRUPTREE keywords

◆ addWell()

void Opm::WellGroupEvents::addWell ( const std::string & wname)

Include a named well into the events collection.

Typically used in the handler for the 'WELSPECS' keyword.

◆ at()

const Events & Opm::WellGroupEvents::at ( const std::string & wgname) const

Look up collection of events for named well or group.

Throws an exception of type

if the named well or group has not been previously registered through addWell() or addGroup().

Parameters
[in]wgnameWell or group name.
Returns
Event collection for wgname.

◆ clearEvent()

void Opm::WellGroupEvents::clearEvent ( const std::string & wgname,
std::uint64_t eventMask )

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

Parameters
[in]wgnameWell or group name.
[in]eventMaskOne or more events combined using bitwise 'or' ('|'). All events for wgname that are set in eventMask will be cleared.

◆ has()

bool Opm::WellGroupEvents::has ( const std::string & wgname) const

Check if any events have ever been registered for a named well or group.

Parameters
[in]wgnameWell or group name.
Returns
Whether or not the well or group \wgname has been registered in this collection.

◆ hasEvent()

bool Opm::WellGroupEvents::hasEvent ( const std::string & wgname,
std::uint64_t eventMask ) const

Query current collection for one or more specific events associated to a specific well or group.

Parameters
[in]wgnameWell or group name.
[in]eventMaskBit mask of events for which to check existence.
Returns
Whether not at least one of the events represented in eventMask is active in the current collection.

◆ merge()

void Opm::WellGroupEvents::merge ( const WellGroupEvents & events)

Merge current event collection with other.

Resulting collection (*this) has the union of the events for all wells and groups in both collections.

◆ operator==()

bool Opm::WellGroupEvents::operator== ( const WellGroupEvents & data) const

Equality predicate.

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

◆ reset()

void Opm::WellGroupEvents::reset ( )

Remove all events for all known wells and groups.

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::WellGroupEvents::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:
  • opm/input/eclipse/Schedule/Events.hpp
  • opm/input/eclipse/Schedule/Events.cpp