Dune::YGrid< d, ct > Class Template Reference
#include <grids.hh>
Inheritance diagram for Dune::YGrid< d, ct >:

Detailed Description
template<int d, typename ct>
class Dune::YGrid< d, ct >
This is the basis of a parallel implementation of the dune grid interface supporting codim 0 and dim.You can also use the structured interface and write really fast code.
The YGrid considered here describes a finite set -tupels of the form
togehter with an affine mapping
.
Therefore a YGrid is characterized by the following four quantities:
- The origin
,
- the size
,
- the mesh width
,
- The shift
. The shift can be used to interpret the points of a grid as midpoints of cells, faces, edges, etc.
The YGrid can be parametrized by the dimension d and the type to be used for the coordinates.
Here is a graphical illustration of a grid:

A YGrid.
A grid can be manipulated either in the origin/size representation or in the min index / max index representation.
A YGrid allows to iterate over all its cells with an Iterator class.
Public Types | |
typedef FieldVector< int, d > | iTupel |
define types used for arguments | |
Public Member Functions | |
virtual | ~YGrid () |
Destructor. | |
YGrid () | |
Make an empty YGrid with origin 0. | |
YGrid (iTupel o, iTupel s, fTupel h, fTupel r) | |
Make YGrid from origin and size arrays. | |
int | origin (int i) const |
Return origin in direction i. | |
void | origin (int i, int oi) const |
Set origin in direction i. | |
const iTupel & | origin () const |
return reference to origin | |
int | size (int i) const |
Return size in direction i. | |
void | size (int i, int si) const |
Set size in direction i. | |
const iTupel & | size () const |
Return reference to size tupel. | |
int | totalsize () const |
Return total size of index set which is the product of all size per direction. | |
int | min (int i) const |
Return minimum index in direction i. | |
void | min (int i, int mi) const |
Set minimum index in direction i. | |
int | max (int i) const |
Return maximum index in direction i. | |
void | max (int i, int mi) const |
Set maximum index in direction i. | |
const fTupel & | meshsize () const |
Return reference to mesh size tupel for read write access. | |
ct | meshsize (int i) const |
Return mesh size in direction i. | |
void | meshsize (int i, int hi) const |
Set mesh size in direction i. | |
const fTupel & | shift () const |
Return shift tupel. | |
ct | shift (int i) const |
Return shift in direction i. | |
void | shift (int i, int ri) const |
Set shift in direction i. | |
bool | empty () const |
Return true if YGrid is empty, i.e. has size 0 in all directions. | |
int | index (const iTupel &coord) const |
given a tupel compute its index in the lexicographic numbering | |
bool | inside (const iTupel &coord) const |
given a coordinate, return true if it is in the grid | |
virtual SubYGrid< d, ct > | intersection (YGrid< d, ct > &r) const |
Return new SubYGrid of self which is the intersection of self and another YGrid. | |
YGrid< d, ct > | move (iTupel v) const |
return grid moved by the vector v | |
Iterator | begin () const |
return iterator to first element of index set | |
Iterator | end () const |
return iterator to one past the last element of index set | |
TransformingIterator | tbegin () const |
return iterator to first element of index set | |
TransformingIterator | tend () const |
return iterator to one past the last element of the grid | |
Protected Attributes | |
iTupel | _origin |
internal representation uses origin/size | |
fTupel | _h |
mesh size per direction | |
fTupel | _r |
shift per direction | |
Classes | |
class | Iterator |
class | TransformingIterator |
The documentation for this class was generated from the following file: