Grid iteratorsFacetIterator<> Type

FacetIterator<> Type

Declaration
template<class FacOnCellIt>
class FacetIterator;
Description

The class template FacetIterator implements a Grid Facet Iterator based on cell iteration and local facet iteration. The iteration proceeds by iterating over each facet of each cell; in order to ensure visiting each facet only once, there is established an arbitrary order between the two possible occurences of an interior facet, and the greater one is silently skipped over.

In order to evaluate the comparison, an order must be defined on cells, and neighbor cells must be accessibleX.

Definition

Defined in facet-iterator.h

Template parameters

Parameter Description Default
FacetOnCellIt a local facet-on-cell iterator  

Model of

Facet Iterator

Type requirements

FacetOnCellIt is a model of FacetOnCell Iterator. The grid type of FacetOnCellIt must be a model of Cell Grid Range and of Grid-With-Boundary; the associated cell type must be a model of STL LessThanComparable.

Members
Complexity

Each facet is visited at most 2 times. Memory consumption is constant -- one CellOnCellIterator and one FacetOnCellIterator.

Example
a_grid_type g;
a_geometry_type geom(g); // a grid geometry for g

typedef grid_types<a_grid_type> gt;
grid_function<gt::Facet, double> volume(g);

typedef FacetIterator<gt::FacetOnCellIterator> FacetIt;
for(FacetIt f(g); ! f.IsDone(); ++f)
  volume[*f] = geom.volume(*f);
Uses
Used by
Notes
  1. If information about cell neighbors is not available, one has to mark visited facets explicitely, which is done by facet_set_of_cells_iterator. In a future version, there could be a compile-time switch on the availability of cell neighbor information, selecting the appropriate version of FacetIterator automatically.
See also

facet_set_of_cells_iterator   facet_handle


Guntram Berti


Grid iteratorsFacetIterator<> Type