Dune::SubYGrid< d, ct >::TransformingSubIterator Class Reference

#include <grids.hh>

Inheritance diagram for Dune::SubYGrid< d, ct >::TransformingSubIterator:

Dune::SubYGrid< d, ct >::SubIterator Dune::YGrid< d, ct >::Iterator List of all members.

Detailed Description

template<int d, typename ct>
class Dune::SubYGrid< d, ct >::TransformingSubIterator

TransformingSubIterator is a SubIterator providing in addition a linear transformation of the coordinates of the grid in the form $ y_i = x_i h_i + s_i $. This can be used to interpret the grid cells as vertices, edges, faces, etc.


Public Member Functions

 TransformingSubIterator (const SubYGrid< d, ct > &r)
 Make iterator pointing to first cell in a grid.
 TransformingSubIterator (const SubYGrid< d, ct > &r, const iTupel &coord)
 Make iterator pointing to given cell in a grid.
 TransformingSubIterator (const SubIterator &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 a grid.
TransformingSubIteratoroperator++ ()
 Increment iterator to next cell with position.
ct position (int i) const
 Return position of current cell in direction i.
const fTupel & position () const
 Return position of current cell as reference.
ct meshsize (int i) const
 Return meshsize in direction i.
const fTupel & meshsize () const
 Return meshsize of current cell as reference.
void move (int i, int dist)
 Move cell position by dist cells in direction i.
void print (std::ostream &s) const
 Print contents of iterator.
void reinit (const YGrid< d, ct > &r, const iTupel &coord)
 reinitialize iterator to given position
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.
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 iTupelcoord () 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

The documentation for this class was generated from the following file:

Generated on 9 Apr 2008 with Doxygen (ver 1.5.2) [logfile].