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:

## 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

  xyz | The cartesian dimensions of the grid
  globalCell | Pointer to first entry of contiguous array mapping local index to cartesian one.
  nc | The 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

  nx | Number of cells in x
  ny | Number of cells in y
  nz | Number of cells in z
  globalCell | Pointer to first entry of contiguous array mapping local index to cartesian one.
  nc | The 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

  cartesianIndex | The 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

  i | The index in the i direction
  j | The index in the j direction
  k | The 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:

- opm/common/utility/ActiveGridCells.hpp
- opm/common/utility/ActiveGridCells.cpp