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
 
typedef boost::iterator_range
< CellIter
Range
 
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

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

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

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.

template<class Region = std::vector<int>>
typedef std::vector<CellId>::size_type Opm::RegionMapping< Region >::Pos
template<class Region = std::vector<int>>
typedef boost::iterator_range<CellIter> Opm::RegionMapping< Region >::Range
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

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

template<class Region = std::vector<int>>
const std::vector<RegionId>& Opm::RegionMapping< Region >::activeRegions ( ) const
inline
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.
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

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

Region cells

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

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: