The Grid Function concept refines the Grid Element Function concept in that it bind the function to a particular grid. Evaluating a grid function without a valid grid set or with an element whose grid is different from that of the grid function is considered an error.
By binding to a particular grid, it is possible to treat both domain and range of a grid function as sequences with associated iterators.
The range of a grid function f is the set of all elements of type F::element_type in f.TheGrid().
The domain of a grid function is the set of all values of the form f(e) where e is in the range of f.
Name | Expression | Description |
Grid type | F::grid_type |
type of the corresponding associated grid,
model of Grid |
value iterator | F::const_iterator |
iterator over the values of f
model of STL Forward Iterator |
size type | F::size_type | integral type capable of representing the possible sizes of the value sequence. |
Name | Expression | Type requirements | return type |
Grid reference | f.TheGrid(); | F::grid_type const& | |
start of value sequence | f.begin(); | F::const_iterator | |
end of value sequence | f.end(); | F::const_iterator | |
size of value sequence | f.size(); | F::size_type | |
Name | Expression | Precondition | Semantics | Postcondition |
Grid reference | G& g = f.TheGrid(); | f is bound to a grid | get reference to the underlying grid | &(g.TheGrid()) == &(f.TheGrid()) |
start of value sequence | i = f.begin(); | f is bound to a grid | return iterator to start of value sequence | distance (i,f.end()) == f.size() |
end of value sequence | i = f.end(); | f is bound to a grid | return iterator to past-the-end of value sequence | i is past-the-end, i == f.end() |
size of value sequence | n = f.size(); | f is bound to a grid | return size of value sequence | f.size() == distance (f.begin(),f.end()) |