Holds the implementation of the CpGrid as a pimple.
More...
|
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) |
|
◆ 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
-
input | The input vector to gather from the rank. |
comm | The 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()
For each cell, find indices of all cells sharing a vertex with it. - Parameters
-
- 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
-
grid | The grid from which to extract the columns. |
columns | will 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
-
input | The input vector to gather from the rank. |
comm | The Dune::Communication object. |
root | The 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()
For each cell, order the (cell) neighbours counterclockwise. - Parameters
-
[in] | grid | A 2d grid object. |
[in,out] | nb | A cell-cell neighbourhood table, such as from vertexNeighbours(). |
|