dune-grid
2.4
|
#include <dune/grid/yaspgrid/ygrid.hh>
Public Member Functions | |
Iterator () | |
Iterator (const YGridComponent< Coordinates > &r) | |
Make iterator pointing to first cell in a grid. More... | |
Iterator (const YGridComponent< Coordinates > &r, const iTupel &coord) | |
Make iterator pointing to given cell in a grid. More... | |
void | reinit (const YGridComponent< Coordinates > &r, const iTupel &coord) |
reinitialize iterator to given position More... | |
bool | operator== (const Iterator &i) const |
Return true when two iterators over the same grid are equal (!). More... | |
bool | operator!= (const Iterator &i) const |
Return true when two iterators over the same grid are not equal (!). More... | |
int | superindex () const |
Return consecutive index in enclosing grid. More... | |
int | coord (int i) const |
Return coordinate of the cell in direction i. More... | |
const iTupel & | coord () const |
Return coordinate of the cell as reference (do not modify). More... | |
void | move (int i, int dist) |
move this iterator dist cells in direction i More... | |
void | move (const iTupel &dist) |
move this iterator dist cells in direction i More... | |
Iterator & | operator++ () |
Increment iterator to next cell with position. More... | |
ct | lowerleft (int i) const |
Return ith component of lower left corner of the entity associated with the current coordinates and shift. More... | |
fTupel | lowerleft () const |
Return lower left corner of the entity associated with the current coordinates and shift. More... | |
ct | upperright (int i) const |
Return ith component of upper right corder of the entity associated with the current coordinates and shift. More... | |
fTupel | upperright () const |
Return upper right corder of the entity associated with the current coordinates and shift. More... | |
ct | meshsize (int i) const |
Return meshsize in direction i. More... | |
fTupel | meshsize () const |
Return meshsize of current cell as reference. More... | |
bool | shift (int i) const |
std::bitset< d > | shift () const |
Coordinates * | coordCont () const |
Protected Attributes | |
iTupel | _coord |
current position in index set More... | |
int | _superindex |
consecutive index in enclosing grid More... | |
const YGridComponent< Coordinates > * | _grid |
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.
|
inline |
|
inline |
Make iterator pointing to first cell in a grid.
References Dune::YGridComponent< Coordinates >::Iterator::coord(), Dune::YGridComponent< Coordinates >::origin(), and Dune::YGridComponent< Coordinates >::Iterator::reinit().
|
inline |
Make iterator pointing to given cell in a grid.
References Dune::YGridComponent< Coordinates >::Iterator::reinit().
|
inline |
Return coordinate of the cell in direction i.
References Dune::YGridComponent< Coordinates >::Iterator::_coord.
|
inline |
Return coordinate of the cell as reference (do not modify).
References Dune::YGridComponent< Coordinates >::Iterator::_coord.
Referenced by Dune::YGridComponent< Coordinates >::Iterator::Iterator(), and Dune::YGridComponent< Coordinates >::Iterator::upperright().
|
inline |
|
inline |
Return ith component of lower left corner of the entity associated with the current coordinates and shift.
References Dune::YGridComponent< Coordinates >::Iterator::_coord, and Dune::YGridComponent< Coordinates >::Iterator::_grid.
|
inline |
Return lower left corner of the entity associated with the current coordinates and shift.
References Dune::YGridComponent< Coordinates >::d.
|
inline |
Return meshsize in direction i.
References Dune::YGridComponent< Coordinates >::Iterator::_coord, and Dune::YGridComponent< Coordinates >::Iterator::_grid.
|
inline |
Return meshsize of current cell as reference.
References Dune::YGridComponent< Coordinates >::d.
|
inline |
move this iterator dist cells in direction i
References Dune::YGridComponent< Coordinates >::Iterator::_coord, Dune::YGridComponent< Coordinates >::Iterator::_grid, Dune::YGridComponent< Coordinates >::Iterator::_superindex, and dist().
|
inline |
move this iterator dist cells in direction i
References Dune::YGridComponent< Coordinates >::Iterator::_coord, Dune::YGridComponent< Coordinates >::Iterator::_grid, Dune::YGridComponent< Coordinates >::Iterator::_superindex, and Dune::YGridComponent< Coordinates >::d.
|
inline |
Return true when two iterators over the same grid are not equal (!).
References Dune::YGridComponent< Coordinates >::Iterator::_superindex.
|
inline |
Increment iterator to next cell with position.
References Dune::YGridComponent< Coordinates >::Iterator::_coord, Dune::YGridComponent< Coordinates >::Iterator::_grid, Dune::YGridComponent< Coordinates >::Iterator::_superindex, and Dune::YGridComponent< Coordinates >::d.
|
inline |
Return true when two iterators over the same grid are equal (!).
References Dune::YGridComponent< Coordinates >::Iterator::_superindex.
|
inline |
reinitialize iterator to given position
References Dune::YGridComponent< Coordinates >::Iterator::_coord, Dune::YGridComponent< Coordinates >::Iterator::_grid, Dune::YGridComponent< Coordinates >::Iterator::_superindex, Dune::YGridComponent< Coordinates >::d, Dune::YGridComponent< Coordinates >::offset(), Dune::YGridComponent< Coordinates >::origin(), and Dune::YGridComponent< Coordinates >::superincrement().
Referenced by Dune::YGridComponent< Coordinates >::Iterator::Iterator().
|
inline |
|
inline |
References Dune::YGridComponent< Coordinates >::Iterator::_grid.
Referenced by Dune::YGridComponent< Coordinates >::Iterator::upperright().
|
inline |
Return consecutive index in enclosing grid.
References Dune::YGridComponent< Coordinates >::Iterator::_superindex.
|
inline |
Return ith component of upper right corder of the entity associated with the current coordinates and shift.
References Dune::YGridComponent< Coordinates >::Iterator::_coord, Dune::YGridComponent< Coordinates >::Iterator::_grid, Dune::YGridComponent< Coordinates >::Iterator::coord(), and Dune::YGridComponent< Coordinates >::Iterator::shift().
|
inline |
Return upper right corder of the entity associated with the current coordinates and shift.
References Dune::YGridComponent< Coordinates >::d.
|
protected |
current position in index set
Referenced by Dune::YGridComponent< Coordinates >::Iterator::coord(), Dune::YGridComponent< Coordinates >::Iterator::lowerleft(), Dune::YGridComponent< Coordinates >::Iterator::meshsize(), Dune::YGridComponent< Coordinates >::Iterator::move(), Dune::YGridComponent< Coordinates >::Iterator::operator++(), Dune::YGridComponent< Coordinates >::Iterator::reinit(), and Dune::YGridComponent< Coordinates >::Iterator::upperright().
|
protected |
Referenced by Dune::YGridComponent< Coordinates >::Iterator::coordCont(), Dune::YGridComponent< Coordinates >::Iterator::lowerleft(), Dune::YGridComponent< Coordinates >::Iterator::meshsize(), Dune::YGridComponent< Coordinates >::Iterator::move(), Dune::YGridComponent< Coordinates >::Iterator::operator++(), Dune::YGridComponent< Coordinates >::Iterator::reinit(), Dune::YGridComponent< Coordinates >::Iterator::shift(), and Dune::YGridComponent< Coordinates >::Iterator::upperright().
|
protected |
consecutive index in enclosing grid
Referenced by Dune::YGridComponent< Coordinates >::Iterator::move(), Dune::YGridComponent< Coordinates >::Iterator::operator!=(), Dune::YGridComponent< Coordinates >::Iterator::operator++(), Dune::YGridComponent< Coordinates >::Iterator::operator==(), Dune::YGridComponent< Coordinates >::Iterator::reinit(), and Dune::YGridComponent< Coordinates >::Iterator::superindex().