Opm::BlackoilWellModelGeneric< Scalar >::ConnectionIndexMap Class Reference

Connection index mappings. More...

#include <BlackoilWellModelGeneric.hpp>

Public Member Functions

 ConnectionIndexMap (const std::size_t numConns)
 
void addActiveConnection (const int connIdx, const bool connIsOpen)
 
const std::vector< int > & local () const
 
int global (const int connIdx) const
 
int open (const int connIdx) const
 

Detailed Description

template<class Scalar>
class Opm::BlackoilWellModelGeneric< Scalar >::ConnectionIndexMap

Connection index mappings.

Constructor & Destructor Documentation

◆ ConnectionIndexMap()

template<class Scalar >
Opm::BlackoilWellModelGeneric< Scalar >::ConnectionIndexMap::ConnectionIndexMap ( const std::size_t  numConns)
inlineexplicit

Constructor.

Parameters
[in]numConnsTotal number of well connections, both open and closed/shut. Typically
WellConnections::size()
.

Member Function Documentation

◆ addActiveConnection()

template<class Scalar >
void Opm::BlackoilWellModelGeneric< Scalar >::ConnectionIndexMap::addActiveConnection ( const int  connIdx,
const bool  connIsOpen 
)
inline

Enumerate/map new active connection.

Parameters
[in]connIdxGlobal well connection index. Must be an integer in the range 0..numConns-1.
[in]connIsOpenWhether or not the connection is open/flowing.

◆ global()

template<class Scalar >
int Opm::BlackoilWellModelGeneric< Scalar >::ConnectionIndexMap::global ( const int  connIdx) const
inline

Get global connection ID of local (on-rank) connection.

Parameters
[in]connIdxLocal connection index.
Returns
Global connection ID of connIdx.

◆ local()

template<class Scalar >
const std::vector< int > & Opm::BlackoilWellModelGeneric< Scalar >::ConnectionIndexMap::local ( ) const
inline

Get local connection IDs/indices of every existing well connection.

Negative value (-1) for connections that don't intersect the current rank.

◆ open()

template<class Scalar >
int Opm::BlackoilWellModelGeneric< Scalar >::ConnectionIndexMap::open ( const int  connIdx) const
inline

Get open connection ID of local (on-rank) connection.

Parameters
[in]connIdxLocal connection index.
Returns
Open connection ID of connIdx. Integer in the range 0..open connections - 1 if the connection is open or negative value (-1) otherwise.

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