Opm Namespace Reference

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

Namespaces

namespace  time
 
namespace  UgGridHelpers
 

Classes

class  CellQuadrature
 
class  FaceQuadrature
 
class  GridManager
 
struct  iterator_range
 
struct  iterator_range_pod
 
class  LookUpCartesianData
 
struct  LookUpCellCentroid
 
class  LookUpData
 
class  MinpvProcessor
 Transform a corner-point grid ZCORN field to account for MINPV processing. More...
 
struct  mutable_iterator_range
 
class  RegionMapping
 
class  SparseTable
 
class  VariableSizeCommunicator
 A buffered communicator where the amount of data sent does not have to be known a priori. More...
 
class  VelocityInterpolationConstant
 
class  VelocityInterpolationECVI
 
class  VelocityInterpolationInterface
 Abstract interface for velocity interpolation method classes. More...
 
class  WachspressCoord
 

Functions

void extractColumn (const UnstructuredGrid &grid, std::vector< std::vector< int > > &columns)
 
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. More...
 
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. More...
 
SparseTable< int > cellNeighboursAcrossVertices (const UnstructuredGrid &grid)
 
void orderCounterClockwise (const UnstructuredGrid &grid, SparseTable< int > &nb)
 
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.

◆ cartesianToCompressed()

std::unordered_map< int, int > Opm::cartesianToCompressed ( const int  num_cells,
const int *  global_cell 
)

◆ cellNeighboursAcrossVertices()

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

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.

◆ compressedToCartesian()

std::vector< int > Opm::compressedToCartesian ( const int  num_cells,
const int *  global_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 vertexNeighbours().