|
|
calculate the neighborhood relationship on a set of cells.
The algorithm works by inserting new facets into the table and extracting the corresponding counterparts from the table, if they are found.
A sample use can be found in test-triang2d-construct.C. -
Parameters:
-
| nbf |
[OUT]: A mapping Cell x int -> cell_handle |
| cell_set |
[IN]: set of cells on which to calculate neighbors |
| facet_map |
[INOUT]: a (possibly empty) mapping from facet vertex sets to FacetOnCellIterators |
| CGT |
[TYPE ONLY] a traits type providing iterator types connected to type CELLSET |
Input
facet_map may already contain entries for facets which must have at most one adjacent cell in 'cell_set' . The case that exacly one cell is in 'cell_set' is of course the interesting one and corresponds to facets on the boundary. If cell_set contains all cells of a grid then facet_map should be empty.cell_set contains a subset of the cells of a grid on which the algorithm will be executed. The grid underlying cell_set must have unique vertex sets for facets. The algorithm is incremental in the sense that, given a cell_set C, and a disjoint partition
, calling the algorithm n times with
instead of
yields the same result with the same time and memory complexity.
Output
nbf: the neighbor relations for cells in cell_set that correspond to internal facets are set in nbf, as well as those corresponding to facets already present in 'facet_map'.facet_map contains all unmatched facets of F(cell_set), that is, facets on the boundary of cell_set that have not been contained in facet_map before.
More formally: Let
- FC = all facets of cell_set
- I = internal facets of cell_set
- B = boundary facets of cell_set (i.e.
) - FM1 = facets in facet_map before
- FM2 = facets in facet_map after
Then
- PRECONDITION:
- POSTCONDITION:
-
Template parameters:
-
NBF
nb_type& operator[](CGT::Cell C) where nb_type satisfies: cell_handle& operator[](int nb)
- Examples:
grid_function<CGT::Cell, cell_handle[3]> (for a triangulation, c.NumOfFacets() == 3
cells c)
CGT (default: grid_types<CELLSET>)
- type
Cell - type
CellIterator - type
FacetOnCellIterator int local (FacetOnCellIterator fc) (get local number n of facet fc, n
[0, fc.TheCell().NumOfFacets() [ )- Examples: grid_types<CELLSET>
CELLSET
- type
CellIterator CellIterator FirstCell() - Examples: Grids, Grid subranges
FACETMAP
- type
iterator iterator end() iterator find(vtuple) void erase(iterator) CGT::FacetOnCellIterator& operator[](vtuple) - Examples:
hash_map<vtuple, CGT::FacetOnCellIterator> - Note:
vtuple is short for vtuple<CELLSET>
Definition at line 51 of file cell-neighbor-search.C. |