Go backward to
Cell-neighbor-search
Algorithm
Go up to
Grid algorithms
Go forward to
ConstructGrid
Algorithm
Count boundary components
Algorithm
Declaration
template<class GRID> int count_boundary_components(GRID const& G);
Description
Counts the number of connected components of the boundary of
G
.
Definition
Declared in
find-boundary-components.h
Defined in
find-boundary-components.C
Type requirements
GRID
is a model of
Grid
and of
Facet Grid Range
.
There is a
Partial Grid Function
container on facets associated to
GRID
X
.
Preconditions
G
represents a
manifold-with-boundary
grid.
Postconditions
The value returned is the number of connected components of
G
's boundary.
Complexity
Expected time
O(F)
, where
F
is the number of facets of
G
.
Example
Uses
find_boundary_component_germs
Used in
Notes
This
is not a real constraint, because there is a
generic implementation
of partial grid functions. The only thing needed to use it is to define (specialize) the
hash<>
template on
Grid::Facet
.
See also
Guntram Berti