Dune::SubYGrid< d, ct >::SubIterator Class Reference
#include <grids.hh>

Detailed Description
template<int d, typename ct>
class Dune::SubYGrid< d, ct >::SubIterator
SubIterator is an Iterator that provides in addition the consecutive index in the enclosing grid. Public Member Functions | |
SubIterator (const SubYGrid< d, ct > &r) | |
Make iterator pointing to first cell in subgrid. | |
SubIterator (const SubYGrid< d, ct > &r, const iTupel &coord) | |
Make iterator pointing to given cell in subgrid. | |
SubIterator (const typename YGrid< d, ct >::Iterator &i) | |
Make transforming iterator from iterator (used for automatic conversion of end). | |
void | reinit (const SubYGrid< d, ct > &r, const iTupel &coord) |
Make iterator pointing to given cell in subgrid. | |
int | superindex () const |
Return consecutive index in enclosing grid. | |
int | superneighbor (int i, int dist) const |
Get index of cell which is dist cells away in direction i in enclosing grid. | |
int | superdown (int i) const |
Get index of neighboring cell which is -1 away in direction i in enclosing grid. | |
int | superup (int i) const |
Get index of neighboring cell which is +1 away in direction i in enclosing grid. | |
void | move (int i, int dist) |
move this iterator dist cells in direction i | |
SubIterator & | operator++ () |
Increment iterator to next cell in subgrid. | |
void | print (std::ostream &s) const |
Print position of iterator. | |
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. | |
Protected Attributes | |
int | _superindex |
consecutive index in enclosing grid | |
iTupel | _superincrement |
moves consecutive index by one in this direction in supergrid | |
iTupel | _size |
size of subgrid |
Constructor & Destructor Documentation
Dune::SubYGrid< d, ct >::SubIterator::SubIterator | ( | const SubYGrid< d, ct > & | r | ) | [inline] |
Make iterator pointing to first cell in subgrid.
store some grid information
References Dune::SubYGrid< d, ct >::SubIterator::_size, Dune::SubYGrid< d, ct >::SubIterator::_superincrement, Dune::SubYGrid< d, ct >::SubIterator::_superindex, Dune::SubYGrid< d, ct >::offset(), Dune::YGrid< d, ct >::size(), and Dune::SubYGrid< d, ct >::supersize().
Dune::SubYGrid< d, ct >::SubIterator::SubIterator | ( | const SubYGrid< d, ct > & | r, | |
const iTupel & | coord | |||
) | [inline] |
Make iterator pointing to given cell in subgrid.
store some grid information
References Dune::SubYGrid< d, ct >::SubIterator::_size, Dune::SubYGrid< d, ct >::SubIterator::_superincrement, Dune::SubYGrid< d, ct >::SubIterator::_superindex, Dune::SubYGrid< d, ct >::offset(), Dune::YGrid< d, ct >::origin(), Dune::YGrid< d, ct >::size(), and Dune::SubYGrid< d, ct >::supersize().
Member Function Documentation
void Dune::SubYGrid< d, ct >::SubIterator::reinit | ( | const SubYGrid< d, ct > & | r, | |
const iTupel & | coord | |||
) | [inline] |
Make iterator pointing to given cell in subgrid.
store some grid information
Reimplemented in Dune::SubYGrid< d, ct >::TransformingSubIterator.
References Dune::SubYGrid< d, ct >::SubIterator::_size, Dune::SubYGrid< d, ct >::SubIterator::_superincrement, Dune::SubYGrid< d, ct >::SubIterator::_superindex, Dune::SubYGrid< d, ct >::offset(), Dune::YGrid< d, ct >::origin(), Dune::YGrid< d, ct >::size(), and Dune::SubYGrid< d, ct >::supersize().
Referenced by Dune::SubYGrid< d, ct >::TransformingSubIterator::reinit().
The documentation for this class was generated from the following file: