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

Simple class capturing active cells of a grid. More...

#include <ActiveGridCells.hpp>

Inheritance diagram for Opm::ActiveGridCells:
Opm::GridDims

Public Member Functions

 ActiveGridCells (std::array< int, 3 > xyz, const int *globalCell, std::size_t nc)
 Constructs mapping of active cells.
 
 ActiveGridCells (std::size_t nx, std::size_t ny, std::size_t nz, const int *globalCell, std::size_t nc)
 Constructs mapping of active cells.
 
bool cellActive (std::size_t i, std::size_t j, std::size_t k) const
 
bool cellActive (std::size_t cartesianIndex) const
 
std::vector< int > actNum () const
 
int localCell (std::size_t cartesianIndex) const
 Get the local index of a cell.
 
int localCell (std::size_t i, std::size_t j, std::size_t k) const
 Get the local index of a cell.
 
- Public Member Functions inherited from Opm::GridDims
 GridDims (const std::array< int, 3 > &xyz)
 
 GridDims (std::size_t nx, std::size_t ny, std::size_t nz)
 
 GridDims (const Deck &deck)
 
std::size_t getNX () const
 
std::size_t getNY () const
 
std::size_t getNZ () const
 
std::size_t operator[] (int dim) const
 
std::array< int, 3 > getNXYZ () const
 
std::size_t getGlobalIndex (std::size_t i, std::size_t j, std::size_t k) const
 
std::array< int, 3 > getIJK (std::size_t globalIndex) const
 
std::size_t getCartesianSize () const
 
void assertGlobalIndex (std::size_t globalIndex) const
 
void assertIJK (std::size_t i, std::size_t j, std::size_t k) const
 
bool operator== (const GridDims &data) const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 

Protected Attributes

std::vector< int > localCell_
 Maps the cartesian index to a compressed local index.
 
- Protected Attributes inherited from Opm::GridDims
std::size_t m_nx
 
std::size_t m_ny
 
std::size_t m_nz
 

Additional Inherited Members

- Static Public Member Functions inherited from Opm::GridDims
static GridDims serializationTestObject ()
 

Detailed Description

Simple class capturing active cells of a grid.

Constructor & Destructor Documentation

◆ ActiveGridCells() [1/2]

Opm::ActiveGridCells::ActiveGridCells ( std::array< int, 3 >  xyz,
const int *  globalCell,
std::size_t  nc 
)

Constructs mapping of active cells.

Parameters
xyzThe cartesian dimensions of the grid
globalCellPointer to first entry of contiguous array mapping local index to cartesian one.
ncThe number of cells of a grid.

◆ ActiveGridCells() [2/2]

Opm::ActiveGridCells::ActiveGridCells ( std::size_t  nx,
std::size_t  ny,
std::size_t  nz,
const int *  globalCell,
std::size_t  nc 
)

Constructs mapping of active cells.

Parameters
nxNumber of cells in x
nyNumber of cells in y
nzNumber of cells in z
globalCellPointer to first entry of contiguous array mapping local index to cartesian one.
ncThe number of cells of a grid.

Member Function Documentation

◆ localCell() [1/2]

int Opm::ActiveGridCells::localCell ( std::size_t  cartesianIndex) const

Get the local index of a cell.

Parameters
cartesianIndexThe cartesian index of the cell
Returns
The local index or -1 if the cell is inactive

◆ localCell() [2/2]

int Opm::ActiveGridCells::localCell ( std::size_t  i,
std::size_t  j,
std::size_t  k 
) const

Get the local index of a cell.

Parameters
iThe index in the i direction
jThe index in the j direction
kThe index in the k direction
Returns
The local index or -1 if the cell is inactive

Member Data Documentation

◆ localCell_

std::vector<int> Opm::ActiveGridCells::localCell_
protected

Maps the cartesian index to a compressed local index.

nonactive cells are marked with -1.


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