Dune::unstructured Namespace Reference

Functions

int connectCellsAcrossGaps (UnstructuredGrid &grid, const std::vector< std::pair< int, int > > &cells)
 

Function Documentation

◆ connectCellsAcrossGaps()

int Dune::unstructured::connectCellsAcrossGaps ( UnstructuredGrid &  grid,
const std::vector< std::pair< int, int > > &  cells 
)

Connect a cell to the cell below it when there is space between them that is not a cell, as where MINPV removed a cell and left empty space, with PINCH.

The bottom side of the first cell of a pair is a face at the boundary of the grid, and the top side of the second cell as well. This is what the CpGrid does with the pairs that MinpvProcessor gives: the face of the first cell is given the second cell as its other cell, with the geometry of the face of the first cell. The second cell keeps its own top face and gets the face as one more, with the tag of its top side.

A pair is left out if the first cell has no bottom face at the boundary, which is the case if the cells are connected already, or if a cell is not in the grid.

Parameters
gridA three dimensional grid with the tags of the sides of the cells, which is changed.
cellsPairs of the indices of the cells in the grid: the cell above and the cell below.
Returns
The number of connections that were made.

Referenced by Dune::PolyhedralGrid< dim, dimworld, coord_t >::createGrid().