dune-grid  2.4.1
Public Member Functions | List of all members
Dune::YGrid< Coordinates >::Iterator Class Reference

Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid. More...

#include <dune/grid/yaspgrid/ygrid.hh>

Public Member Functions

 Iterator ()
 default constructor More...
 
 Iterator (const YGrid< Coordinates > &yg, const Dune::array< int, dim > &coords, int which=0)
 construct an iterator from coordinates and component More...
 
 Iterator (const YGrid< Coordinates > &yg, bool end=false)
 create an iterator to start or end of the codimension More...
 
void reinit (const YGrid< Coordinates > &yg, const Dune::array< int, dim > &coords, int which=0)
 reinitializes an iterator, as if it was just constructed. More...
 
int coord (int i) const
 return coordinate at the current position (direction i) More...
 
const Dune::array< int, dim > & coord () const
 return coordinate array at the current postion More...
 
Coordinates::ctype lowerleft (int i) const
 
Dune::FieldVector< typename Coordinates::ctype, dimlowerleft () const
 
Coordinates::ctype upperright (int i) const
 
Dune::FieldVector< typename Coordinates::ctype, dimupperright () const
 
Coordinates::ctype meshsize (int i) const
 return the current meshsize in direction i More...
 
Dune::FieldVector< typename Coordinates::ctype, dimmeshsize () const
 return the current meshsize vector More...
 
bool shift (int i) const
 return the shift in direction i More...
 
std::bitset< dimshift () const
 return the shift vector More...
 
int superindex () const
 return the superindex More...
 
Iteratoroperator++ ()
 increment to the next entity jumping to next component if necessary More...
 
bool operator== (const Iterator &i) const
 compare two iterators: component has to match More...
 
bool operator!= (const Iterator &i) const
 compare two iterators: component has to match More...
 
int which () const
 return the current component number More...
 
void move (int i, int dist)
 move the grid, this is only done and needed for codim 0 More...
 
void move (const iTupel &dist)
 
Coordinates * coordCont () const
 

Detailed Description

template<class Coordinates>
class Dune::YGrid< Coordinates >::Iterator

Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid.

Constructor & Destructor Documentation

template<class Coordinates>
Dune::YGrid< Coordinates >::Iterator::Iterator ( )
inline

default constructor

template<class Coordinates>
Dune::YGrid< Coordinates >::Iterator::Iterator ( const YGrid< Coordinates > &  yg,
const Dune::array< int, dim > &  coords,
int  which = 0 
)
inline

construct an iterator from coordinates and component

template<class Coordinates>
Dune::YGrid< Coordinates >::Iterator::Iterator ( const YGrid< Coordinates > &  yg,
bool  end = false 
)
inline

create an iterator to start or end of the codimension

Member Function Documentation

template<class Coordinates>
int Dune::YGrid< Coordinates >::Iterator::coord ( int  i) const
inline

return coordinate at the current position (direction i)

template<class Coordinates>
const Dune::array<int, dim>& Dune::YGrid< Coordinates >::Iterator::coord ( ) const
inline

return coordinate array at the current postion

template<class Coordinates>
Coordinates* Dune::YGrid< Coordinates >::Iterator::coordCont ( ) const
inline
template<class Coordinates>
Coordinates::ctype Dune::YGrid< Coordinates >::Iterator::lowerleft ( int  i) const
inline
template<class Coordinates>
Dune::FieldVector<typename Coordinates::ctype,dim> Dune::YGrid< Coordinates >::Iterator::lowerleft ( ) const
inline
template<class Coordinates>
Coordinates::ctype Dune::YGrid< Coordinates >::Iterator::meshsize ( int  i) const
inline

return the current meshsize in direction i

template<class Coordinates>
Dune::FieldVector<typename Coordinates::ctype,dim> Dune::YGrid< Coordinates >::Iterator::meshsize ( ) const
inline

return the current meshsize vector

template<class Coordinates>
void Dune::YGrid< Coordinates >::Iterator::move ( int  i,
int  dist 
)
inline

move the grid, this is only done and needed for codim 0

template<class Coordinates>
void Dune::YGrid< Coordinates >::Iterator::move ( const iTupel dist)
inline
template<class Coordinates>
bool Dune::YGrid< Coordinates >::Iterator::operator!= ( const Iterator i) const
inline

compare two iterators: component has to match

template<class Coordinates>
Iterator& Dune::YGrid< Coordinates >::Iterator::operator++ ( )
inline

increment to the next entity jumping to next component if necessary

template<class Coordinates>
bool Dune::YGrid< Coordinates >::Iterator::operator== ( const Iterator i) const
inline

compare two iterators: component has to match

template<class Coordinates>
void Dune::YGrid< Coordinates >::Iterator::reinit ( const YGrid< Coordinates > &  yg,
const Dune::array< int, dim > &  coords,
int  which = 0 
)
inline

reinitializes an iterator, as if it was just constructed.

template<class Coordinates>
bool Dune::YGrid< Coordinates >::Iterator::shift ( int  i) const
inline

return the shift in direction i

template<class Coordinates>
std::bitset<dim> Dune::YGrid< Coordinates >::Iterator::shift ( ) const
inline

return the shift vector

template<class Coordinates>
int Dune::YGrid< Coordinates >::Iterator::superindex ( ) const
inline

return the superindex

template<class Coordinates>
Coordinates::ctype Dune::YGrid< Coordinates >::Iterator::upperright ( int  i) const
inline
template<class Coordinates>
Dune::FieldVector<typename Coordinates::ctype,dim> Dune::YGrid< Coordinates >::Iterator::upperright ( ) const
inline
template<class Coordinates>
int Dune::YGrid< Coordinates >::Iterator::which ( ) const
inline

return the current component number


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