Loading...
Searching...
No Matches
Opm::RegionMapping< Region > Class Template Reference

Forward and reverse mappings between cells and regions/partitions (e.g., the ECLIPSE-style 'SATNUM', 'PVTNUM', or 'EQUILNUM' arrays). More...

`#include <RegionMapping.hpp>`

## Public Types

typedef Region::value_type | RegionId
| Type of forward (cell-to-region) mapping result.
typedef Region::size_type | CellId
| Type of reverse (region-to-cell) mapping (element) result.
typedef std::vector< CellId >::const_iterator | CellIter
| Type of reverse region-to-cell range bounds and iterators.
using | Range = iterator_range<CellIter>

## Public Member Functions

| RegionMapping (const Region &reg)
| Constructor.
RegionId | region (const CellId c) const
| Compute region number of given active cell.
const std::vector< RegionId > & | activeRegions () const
Range | cells (const RegionId r) const
| Extract active cells in particular region.

## Detailed Description

template<class Region = std::vector<int>>
class Opm::RegionMapping< Region >

Forward and reverse mappings between cells and regions/partitions (e.g., the ECLIPSE-style 'SATNUM', 'PVTNUM', or 'EQUILNUM' arrays).

Template Parameters

  Region | Type of a forward region mapping. Expected to provide indexed access through operator[]() as well as inner types 'value_type', 'size_type', and 'const_iterator'.

## Member Typedef Documentation

## RegionId

template<class Region = std::vector<int>>

typedef Region::value_type Opm::RegionMapping< Region >::RegionId

Type of forward (cell-to-region) mapping result.

Expected to be an integer.

## Constructor & Destructor Documentation

## RegionMapping()

template<class Region = std::vector<int>>

Opm::RegionMapping< Region >::RegionMapping | ( | const Region & | reg | ) |

inline explicit

Constructor.

Parameters

  [in] | reg | Forward region mapping, restricted to active cells only.

## Member Function Documentation

## cells()

template<class Region = std::vector<int>>

Range Opm::RegionMapping< Region >::cells | ( | const RegionId | r | ) | const

inline

Extract active cells in particular region.

Parameters

  [in] | r | Region number

Returns
  Range of active cells in region `r`. Empty if `r` is not an active region.

## region()

template<class Region = std::vector<int>>

RegionId Opm::RegionMapping< Region >::region | ( | const CellId | c | ) | const

inline

Compute region number of given active cell.

Parameters

  [in] | c | Active cell

Returns
  Region to which `c` belongs.

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

- opm/grid/utility/RegionMapping.hpp