Grid Entity Concept |
The Grid Entity concept is rather abstract in that it gives rise to rather separate sub-concepts, notably Grid Element , Grid Sequence Iterator, and Grid Incidence Iterator. Its purpose is to bundle some fundamental properties, much like the STL concepts Assignable and Equality Comparable which it refines.
The fundamental property captured by Grid Entity is binding to a Grid (the anchor grid), and global identity, in contrast to Element Handles, which are unique only within a single grid.
Conceptually, a grid is the owner of its entities; an entities lifetime cannot exceed that of its anchor grid. Also, a grid entity needs not necessarily to be stored permanently, it may be constructed only temporarily, for example a Grid Iterator or a Grid Element obtained by dereferencing a Grid Iterator.
STL Assignable
STL Equality Comparable
E is a type which is a model of Grid Entity
e, e1, e2 are objects of type E
An anchor of e is a logically superior entity. It is either an object of a type which is a model of Grid or an object of a type which is a model of Grid Element, to which e is incident. This is defined more precisely depending on the subconcept involved. For example, for Grid Element the anchor is the underlying grid; for a Grid Sequence Iterator on a Grid Range, it is the grid range, and for a Grid Incidence Iterator, it is a grid element. So, the anchor of a Vertex-On-Cell Iterator, is the cell over whose incident vertices the iteration is performed.
A grid entity e is valid, if its anchor is valid (either refers to an existing grid, or is itself a valid Grid Entity), and its handle is a valid handle of that grid.
Name | Expression | Description |
Grid type | E::grid_type | type of the corresponding anchor grid |
Anchor type | E::anchor_type | type of the corresponding anchor |
handle type | E::handle_type | type of the corresponding element handle |
Name | Expression | Type requirements | return type |
Anchor grid | e.TheGrid() | grid_type const& | |
Anchor entity | e.TheAnchor() | anchor_type const& | |
Handle | e.handle() | handle_type |
Name | Expression | Precondition | Semantics | Postcondition |
Copy constructor | E e1(e2) | e1 == e2 | ||
Assignment | e1 = e2 | e1 is a copy of e2 | e1 == e2 | |
Anchor grid | e.TheGrid() | e is valid | get the grid to which e is bound | |
Equality comparison | e1 == e2 | e1.TheAnchor() == e2.TheAnchor() X | true if e1 and e2 refer to the same element of e1.TheGrid() e1 == e2 is equivalent to e1.handle() == e2.handle() and e1.TheAnchor() == e2.TheAnchor()X |
Grid Element
Grid Sequence Iterator
Grid Incidence Iterator
Put another way, for grid entities, e1 = e2 entails e1 == e2, which is not the case for grids.
Guntram Berti
Grid Entity Concept |