Dune::YGrid< d, ct >::Iterator Class Reference
#include <grids.hh>
Inheritance diagram for Dune::YGrid< d, ct >::Iterator:

Detailed Description
template<int d, typename ct>
class Dune::YGrid< d, ct >::Iterator
Iterator class allows one to run over all cells of a grid. The cells of the grid to iterate over are numbered consecutively starting with zero. Via the index() method the iterator provides a mapping of the cells of the grid to a one-dimensional array. The number of entries in this array must be the size of the grid.
Public Member Functions | |
Iterator (const YGrid< d, ct > &r) | |
Make iterator pointing to first cell in a grid. | |
Iterator (const YGrid< d, ct > &r, const iTupel &coord) | |
Make iterator pointing to given cell in a grid. | |
void | reinit (const YGrid< d, ct > &r, const iTupel &coord) |
reinitialize iterator to given position | |
bool | operator== (const Iterator &i) const |
Return true when two iterators over the same grid are equal (!). | |
bool | operator!= (const Iterator &i) const |
Return true when two iterators over the same grid are not equal (!). | |
int | index () const |
Return index of the current cell in the consecutive numbering. | |
int | coord (int i) const |
Return coordinate of the cell in direction i. | |
const iTupel & | coord () const |
Return coordinate of the cell as reference (do not modify). | |
int | neighbor (int i, int dist) const |
Get index of cell which is dist cells away in direction i. | |
int | down (int i) const |
Get index of neighboring cell which is -1 away in direction i. | |
int | up (int i) const |
Get index of neighboring cell which is +1 away in direction i. | |
void | move (int i, int dist) |
move this iterator dist cells in direction i | |
Iterator & | operator++ () |
Increment iterator to next cell. | |
void | print (std::ostream &s) const |
Print position of iterator. |
The documentation for this class was generated from the following file: