Opm::RegionMapping< Region > Class Template Reference

#include <RegionMapping.hpp>

Public Types

typedef Region::value_type RegionId
 
typedef Region::size_type CellId
 
typedef std::vector< CellId >::const_iterator CellIter
 
using Range = iterator_range< CellIter >
 
typedef std::vector< CellId >::size_type Pos
 

Public Member Functions

 RegionMapping (const Region &reg)
 
RegionId region (const CellId c) const
 
const std::vector< RegionId > & activeRegions () const
 
Range cells (const RegionId r) const
 

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

◆ CellId

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

Type of reverse (region-to-cell) mapping (element) result.

◆ CellIter

template<class Region = std::vector<int>>
typedef std::vector<CellId>::const_iterator Opm::RegionMapping< Region >::CellIter

Type of reverse region-to-cell range bounds and iterators.

◆ Pos

template<class Region = std::vector<int>>
typedef std::vector<CellId>::size_type Opm::RegionMapping< Region >::Pos

◆ Range

template<class Region = std::vector<int>>
using Opm::RegionMapping< Region >::Range = iterator_range<CellIter>

◆ 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)
inlineexplicit

Constructor.

Parameters
[in]regForward region mapping, restricted to active cells only.

Member Function Documentation

◆ activeRegions()

template<class Region = std::vector<int>>
const std::vector< RegionId > & Opm::RegionMapping< Region >::activeRegions ( ) const
inline

◆ 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]rRegion 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]cActive cell
Returns
Region to which c belongs.

References Opm::RegionMapping< Region >::c.

Member Data Documentation

◆ active

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

◆ binid

template<class Region = std::vector<int>>
std::unordered_map<RegionId, Pos> Opm::RegionMapping< Region >::binid

◆ c

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

Region cells

Referenced by Opm::RegionMapping< Region >::region().

◆ p

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

Region start pointers


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