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

◆ Iterator() [1/3]

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

default constructor

◆ Iterator() [2/3]

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

construct an iterator from coordinates and component

◆ Iterator() [3/3]

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

◆ coord() [1/2]

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

return coordinate array at the current position

◆ coord() [2/2]

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

return coordinate at the current position (direction i)

◆ coordCont()

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

◆ lowerleft() [1/2]

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

◆ lowerleft() [2/2]

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

◆ meshsize() [1/2]

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

return the current meshsize vector

◆ meshsize() [2/2]

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

return the current meshsize in direction i

◆ move() [1/2]

template<class Coordinates >
void Dune::YGrid< Coordinates >::Iterator::move ( const iTupel dist)
inline

◆ move() [2/2]

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

◆ operator!=()

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

compare two iterators: component has to match

◆ operator++()

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

increment to the next entity jumping to next component if necessary

◆ operator==()

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

compare two iterators: component has to match

◆ reinit()

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

reinitializes an iterator, as if it was just constructed.

◆ shift() [1/2]

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

return the shift vector

◆ shift() [2/2]

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

return the shift in direction i

◆ superindex()

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

return the superindex

◆ upperright() [1/2]

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

◆ upperright() [2/2]

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

◆ which()

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: