Grid Vertex (Edge, Facet, Cell ...) Iterator ConceptGrid IteratorsGrid Sequence iterator ConceptGrid Incidence Iterator Concept

Grid Incidence Iterator Concept

Description

A Grid Incidence Iterator allows to access all elements of a given type incident to an given element (the anchor), for example all vertices incident to a given cell, or all edges incident to a given vertex.

For each combination of element types, there is a subconcept of incidence iterator, for example, the Vertex-On-Cell Iterator.

Refinement of

STL Forward Iterator
Grid Entity

Notation

I is a model of incidence iterator
i, j are objects of type I

Associated types

Name

Expression Description
grid type I::grid_type type of the iterators underlying grid (range)
anchor type I::anchor_type type of the iterators anchor element
element type I::element_type type of the Element that the iterator references
value type I::value_type synomym for I::element_type

Valid Expressions

Name

Expression Type requirements return type
prefix increment ++it;   I&
dereference *it;   I::element_type
equality comparison i == j bool
validity check i.IsDone();X   bool

Expression semantics

Name

Expression Precondition Semantics Postcondition
constructor i(a); e is valid set i to e's first incident element of type I::element_type i.TheAnchor() == a
prefix increment ++i; ! i.IsDone() move iterator forward i.IsDone() or *i is a valid grid element
dereference e = *it; ! it.IsDone() access the element it points to E == (*it);
equality comparison i == j &(i.TheGrid()) == &(j.TheGrid()) true if i and j reference the same element: *i == *j  
validity check i.IsDone();   true iff i is past-the-end.  

Complexity guarantees
Refinements

Vertex-On-Cell Iterator
Edge-On-Cell Iterator

Models
Notes
  1. For circular sequences, such as the vertices around a cell, there is no natural, predefined past-the-end value. Therefore it is more natural to let the iterator itself decide when it is invalid, instead of the standard comparison with a past-the-end iterator (which is defined as well, in order to be able to use STL algorithms).
See also

Grid   Grid Element   Grid Sequence Iterator  


Guntram Berti


Grid Vertex (Edge, Facet, Cell ...) Iterator ConceptGrid IteratorsGrid Sequence iterator ConceptGrid Incidence Iterator Concept