Go to Overview over all GrAL packages.
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Cell Neighbor Search
[Combinatoric Algorithms on Grids]

A collection of routines for finding cell neighborhood relationsships and boundary facets. More...

Functions

template<class NBF, class CELLSET, class FACETMAP, class CGT> void CalculateNeighborCells (NBF &Nb, CELLSET const &cell_set, FACETMAP &facet_map, CGT const &)
 calculate the neighborhood relationship on a set of cells. More...

template<class NBF, class CELLSET, class FACETMAP> void CalculateNeighborCells (NBF &Nb, CELLSET const &cell_set, FACETMAP &facet_map)
 convenience wrapper for CalculateNeighborCells.

template<class NBF, class CELLSET> void CalculateNeighborCells (NBF &Nb, CELLSET const &cell_set)
 convenience wrapper for CalculateNeighborCells.


Detailed Description

A collection of routines for finding cell neighborhood relationsships and boundary facets.

See also:
Combinatoric Algorithms on Grids

Function Documentation

template<class NBF, class CELLSET, class FACETMAP, class CGT>
void CalculateNeighborCells NBF &    Nb,
CELLSET const &    cell_set,
FACETMAP &    facet_map,
CGT const &   
 

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.


Copyright (c) Guntram Berti 1997-2002. See the GrAL Homepage for up-to-date information.

Generated at Tue Feb 26 16:06:06 2002 for GrAL Base by doxygen 1.2.11-20011104 written by Dimitri van Heesch, © 1997-2000