Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
MeshEntityIterator provides a common iterator for mesh entities over meshes, boundaries and incidence relations. The basic use is illustrated below.
Example
The following example shows how to iterate over all mesh entities of a mesh of topological dimension dim:
for (MeshEntityIterator e(mesh, dim); !e.end(); ++e) { e->foo(); }The following example shows how to iterate over mesh entities of topological dimension dim connected (incident) to some mesh entity f:
for (MeshEntityIterator e(f, dim); !e.end(); ++e) { e->foo(); }
In addition to the general iterator, a set of specific named iterators are provided for entities of type Vertex, Edge, Face, Facet and Cell. These iterators are defined along with their respective classes.
Default constructor
Create iterator for mesh entities over given topological dimension
Iterator over MeshEntity of dimension dim on mesh, with string option to iterate over “regular”, “ghost” or “all” entities
Create iterator for entities of given dimension connected to given entity
Copy constructor
Step to next mesh entity (prefix increment)
Step to the previous mesh entity (prefix decrease)
Return current position
Comparison operator
Comparison operator
Dereference operator
Member access operator
Check if iterator has reached the end
Provide a safeguard iterator pointing beyond the end of an iteration process, either iterating over the mesh /or incident entities. Added to be bit more like STL iterators, since many algorithms rely on a kind of beyond iterator.