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

Named sequence of wells. More...

#include <WList.hpp>

Public Member Functions

 WList ()=default
 Default constructor.
 WList (const std::vector< std::string > &wlist, const std::string &wlname)
 Constructor.
std::size_t size () const
 Number of wells in this well list.
bool empty () const
 Predicate for an empty well list.
void clear ()
 Remove all wells from this well list.
void add (const std::string &well)
 Add named well to this well list.
void del (const std::string &well)
 Remove named well from this well list.
bool has (const std::string &well) const
 Whether or not named well is on the current list.
const std::string & getName () const
 Retrieve name of current well list.
const std::vector< std::string > & wells () const
 Sequence of named wells on current well list.
bool operator== (const WList &data) const
 Equality predicate.
bool operator!= (const WList &that) const
 Inequality predicate.
template<class Serializer>
void serializeOp (Serializer &serializer)
 Convert between byte array and object representation.

Detailed Description

Named sequence of wells.

Constructor & Destructor Documentation

◆ WList() [1/2]

Opm::WList::WList ( )
default

Default constructor.

Creates an object that is mostly useful as a target for a deserialisation operation. May nevertheless be populated through the add() or del() member functions.

◆ WList() [2/2]

Opm::WList::WList ( const std::vector< std::string > & wlist,
const std::string & wlname )

Constructor.

Parameters
[in]wlistInitial collection of wells for this well list.
[in]wlnameWell list name.

Member Function Documentation

◆ add()

void Opm::WList::add ( const std::string & well)

Add named well to this well list.

No change if the well already exists in the current well list.

Parameters
[in]wellWell name.

◆ del()

void Opm::WList::del ( const std::string & well)

Remove named well from this well list.

No change if the well is not on the current list.

Parameters
[in]wellWell name.

◆ getName()

const std::string & Opm::WList::getName ( ) const
inline

Retrieve name of current well list.

Returns the wlname constructor argument.

◆ has()

bool Opm::WList::has ( const std::string & well) const

Whether or not named well is on the current list.

Parameters
[in]wellWell name.
Returns
Whether or not well is on the current list.

◆ operator!=()

bool Opm::WList::operator!= ( const WList & that) const
inline

Inequality predicate.

Parameters
[in]thatObject against which
will be tested for inequality.
Returns
Whether or not
is different from that.

◆ operator==()

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

Equality predicate.

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

◆ serializeOp()

template<class Serializer>
void Opm::WList::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/Well/WList.hpp
  • opm/input/eclipse/Schedule/Well/WList.cpp