My Project
Loading...
Searching...
No Matches
Opm Namespace Reference

Holds the implementation of the CpGrid as a pimple. More...

Classes

class  CellQuadrature
 A class providing numerical quadrature for cells. More...
 
class  FaceQuadrature
 A class providing numerical quadrature for faces. More...
 
class  GridManager
 This class manages an Opm::UnstructuredGrid in the sense that it encapsulates creation and destruction of the grid. More...
 
struct  iterator_range
 
struct  iterator_range_pod
 
class  LookUpCartesianData
 LookUpCartesianData - To search field properties of leaf grid view elements via CartesianIndex (cartesianMapper) More...
 
struct  LookUpCellCentroid
 LookUpCellCentroid struct - To search cell centroids via element index. More...
 
class  LookUpData
 LookUpData class - To search field properties of leaf grid view elements via element/elementIndex. More...
 
class  MinpvProcessor
 Transform a corner-point grid ZCORN field to account for MINPV processing. More...
 
struct  mutable_iterator_range
 
class  RegionMapping
 Forward and reverse mappings between cells and regions/partitions (e.g., the ECLIPSE-style 'SATNUM', 'PVTNUM', or 'EQUILNUM' arrays). More...
 
class  SparseTable
 A SparseTable stores a table with rows of varying size as efficiently as possible. More...
 
class  VelocityInterpolationConstant
 A constant velocity approximation. More...
 
class  VelocityInterpolationECVI
 Interpolate velocity using the extended CVI scheme: compute a corner velocity for each cell corner that is consistent with fluxes of adjacent faces, then interpolate with generalized barycentric coordinates. More...
 
class  VelocityInterpolationInterface
 Abstract interface for velocity interpolation method classes. More...
 
class  WachspressCoord
 Class capable of computing Wachspress coordinates in 2d and 3d. More...
 

Functions

void extractColumn (const UnstructuredGrid &grid, std::vector< std::vector< int > > &columns)
 Extract each column of the grid.
 
template<class T , class A , class C >
std::pair< std::vector< T, A >, std::vector< int > > allGatherv (const std::vector< T, A > &input, const C &comm)
 Gathers vectors from all processes on all processes.
 
template<class T , class A , class C >
std::pair< std::vector< T, A >, std::vector< int > > gatherv (const std::vector< T, A > &input, const C &comm, int root)
 Gathers vectors from all processes on a root process.
 
SparseTable< int > cellNeighboursAcrossVertices (const UnstructuredGrid &grid)
 For each cell, find indices of all other cells sharing a vertex with it.
 
void orderCounterClockwise (const UnstructuredGrid &grid, SparseTable< int > &nb)
 For each cell, order the (cell) neighbours counterclockwise.
 
std::unordered_map< int, int > cartesianToCompressed (const int num_cells, const int *global_cell)
 
std::vector< int > compressedToCartesian (const int num_cells, const int *global_cell)
 

Detailed Description

Holds the implementation of the CpGrid as a pimple.

Author
Markus Blatt marku.nosp@m.s@dr.nosp@m.-blat.nosp@m.t.de Atgeirr F Rasmussen atgei.nosp@m.rr@s.nosp@m.intef.nosp@m..no Bård Skaflestad bard..nosp@m.skaf.nosp@m.lesta.nosp@m.d@si.nosp@m.ntef..nosp@m.no

Function Documentation

◆ allGatherv()

template<class T , class A , class C >
std::pair< std::vector< T, A >, std::vector< int > > Opm::allGatherv ( const std::vector< T, A > &  input,
const C &  comm 
)

Gathers vectors from all processes on all processes.

In parallel this will call MPI_Allgatherv. Has to be called on all ranks.

Parameters
inputThe input vector to gather from the rank.
commThe Dune::Communication object.
Returns
A pair of a vector with all the values gathered (first the ones from rank 0, then the ones from rank 1, ...) and a vector with the offsets of the first value from each rank (values[offset[rank]] will be the first value from rank). This vector is one bigger than the number of processes and the last entry is the size of the first array.

◆ cellNeighboursAcrossVertices()

SparseTable< int > Opm::cellNeighboursAcrossVertices ( const UnstructuredGrid grid)

For each cell, find indices of all other cells sharing a vertex with it.

For each cell, find indices of all cells sharing a vertex with it.

Parameters
[in]gridA grid object.
Returns
A table of neighbour cell-indices by cell.

◆ extractColumn()

void Opm::extractColumn ( const UnstructuredGrid grid,
std::vector< std::vector< int > > &  columns 
)

Extract each column of the grid.

Note
Assumes the pillars of the grid are all vertically aligned.
Parameters
gridThe grid from which to extract the columns.
columnswill for each (i, j) where (i, j) represents a non-empty column, contain the cell indices contained in the column centered at (i, j) in the second variable, and i+jN in the first variable.

◆ gatherv()

template<class T , class A , class C >
std::pair< std::vector< T, A >, std::vector< int > > Opm::gatherv ( const std::vector< T, A > &  input,
const C &  comm,
int  root 
)

Gathers vectors from all processes on a root process.

In parallel this will call MPI_Gatherv. Has to be called on all ranks.

Parameters
inputThe input vector to gather from the rank.
commThe Dune::Communication object.
rootThe rank of the processes to gather the values-
Returns
On non-root ranks a pair of empty vectors. On the root rank a pair of a vector with all the values gathered (first the ones from rank 0, then the ones from rank 1, ...) and a vector with the offsets of the first value from each rank (values[offset[rank]] will be the first value from rank). This vector is one bigger than the number of processes and the last entry is the size of the first array.

◆ orderCounterClockwise()

void Opm::orderCounterClockwise ( const UnstructuredGrid grid,
SparseTable< int > &  nb 
)

For each cell, order the (cell) neighbours counterclockwise.

Parameters
[in]gridA 2d grid object.
[in,out]nbA cell-cell neighbourhood table, such as from cellNeighboursAcrossVertices().
[in]gridA 2d grid object.
[in,out]nbA cell-cell neighbourhood table, such as from vertexNeighbours().