My Project
Loading...
Searching...
No Matches
Opm::CompletedCells Class Reference

Sparse collection of cells, and their properties, intersected by one or more well connections. More...

#include <CompletedCells.hpp>

Classes

struct  Cell
 Identification and associate properties of cell intersected by one or more well connections. More...
 

Public Member Functions

 CompletedCells ()=default
 Default constructor.
 
 CompletedCells (const GridDims &dims)
 Constructor.
 
 CompletedCells (std::size_t nx, std::size_t ny, std::size_t nz)
 Constructor.
 
const Cellget (std::size_t i, std::size_t j, std::size_t k) const
 Retrieve intersected cell.
 
std::pair< Cell *, bool > try_get (std::size_t i, std::size_t j, std::size_t k)
 Retrieve, and possibly create, an intersected cell.
 
bool operator== (const CompletedCells &other) const
 Equality predicate.
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 Convert between byte array and object representation.
 

Static Public Member Functions

static CompletedCells serializationTestObject ()
 Create a serialisation test object.
 

Detailed Description

Sparse collection of cells, and their properties, intersected by one or more well connections.

Constructor & Destructor Documentation

◆ CompletedCells() [1/3]

Opm::CompletedCells::CompletedCells ( )
default

Default constructor.

Creates a collection that is only usable as the target of a deserialisation operation.

◆ CompletedCells() [2/3]

Opm::CompletedCells::CompletedCells ( const GridDims dims)
explicit

Constructor.

Parameters
[in]dimsHost grid's Cartesian dimensions. Needed to translate between linearised Cartesian indices and (I,J,K) tuples.

◆ CompletedCells() [3/3]

Opm::CompletedCells::CompletedCells ( std::size_t  nx,
std::size_t  ny,
std::size_t  nz 
)

Constructor.

Parameters
[in]nxHost grid's Cartesian dimension in the X direction.
[in]nyHost grid's Cartesian dimension in the Y direction.
[in]nzHost grid's Cartesian dimension in the Z direction.

Member Function Documentation

◆ get()

const Opm::CompletedCells::Cell & Opm::CompletedCells::get ( std::size_t  i,
std::size_t  j,
std::size_t  k 
) const

Retrieve intersected cell.

Will throw an exception if the cell does not exist in the current collection.

Parameters
[in]iCell's Cartesian I index relative to grid's origin.
[in]jCell's Cartesian J index relative to grid's origin.
[in]kCell's Cartesian K index relative to grid's origin.
Returns
Intersected cell at specified coordinates.

◆ operator==()

bool Opm::CompletedCells::operator== ( const CompletedCells other) const

Equality predicate.

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

◆ serializeOp()

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

Convert between byte array and object representation.

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

◆ try_get()

std::pair< Opm::CompletedCells::Cell *, bool > Opm::CompletedCells::try_get ( std::size_t  i,
std::size_t  j,
std::size_t  k 
)

Retrieve, and possibly create, an intersected cell.

Will insert a cell object into the collection if none exist at specified coordinate.

Parameters
[in]iCell's Cartesian I index relative to grid's origin.
[in]jCell's Cartesian J index relative to grid's origin.
[in]kCell's Cartesian K index relative to grid's origin.
Returns
Cell object and existence status. The existence status is 'false' if a new cell object was inserted into the collection as a result of this request and 'true' otherwise.

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