dune-grid 2.9.0
|
#include <dune/grid/yaspgrid/ygrid.hh>
Classes | |
class | Iterator |
Public Types | |
typedef Coordinates::ctype | ct |
typedef std::array< int, d > | iTupel |
typedef FieldVector< ct, d > | fTupel |
Public Member Functions | |
YGridComponent () | |
make uninitialized ygrid More... | |
YGridComponent (iTupel origin, iTupel size) | |
make ygrid without coordinate information More... | |
YGridComponent (iTupel origin, iTupel size, const YGridComponent< Coordinates > &enclosing) | |
make a subgrid by taking coordinates from a larger grid More... | |
YGridComponent (iTupel origin, std::bitset< d > shift, Coordinates *coords, iTupel size, iTupel offset, iTupel supersize) | |
Make YGridComponent by giving all parameters. More... | |
int | origin (int i) const |
Return origin in direction i. More... | |
const iTupel & | origin () const |
return reference to origin More... | |
bool | shift (int i) const |
Return shift in direction i. More... | |
const std::bitset< d > & | shift () const |
Return shift tupel. More... | |
Coordinates * | getCoords () const |
int | offset (int i) const |
Return offset to origin of enclosing grid. More... | |
const iTupel & | offset () const |
Return offset to origin of enclosing grid. More... | |
int | supersize (int i) const |
return size of enclosing grid More... | |
const iTupel & | supersize () const |
return size of enclosing grid More... | |
int | size (int i) const |
return size in direction i More... | |
iTupel | size () const |
retrun size More... | |
int | totalsize () const |
Return total size of index set which is the product of all size per direction. More... | |
int | min (int i) const |
Return minimum index in direction i. More... | |
int | max (int i) const |
Return maximum index in direction i. More... | |
bool | empty () const |
Return true if YGrid is empty, i.e. has size 0 in all directions. More... | |
bool | inside (const iTupel &coord) const |
given a coordinate, return true if it is in the grid More... | |
int | index (const iTupel &coord) const |
given a tupel compute its index in the lexicographic numbering More... | |
YGridComponent< Coordinates > | move (iTupel v) const |
return grid moved by the vector v More... | |
YGridComponent< Coordinates > | intersection (const YGridComponent< Coordinates > &r) const |
Return YGridComponent of supergrid of self which is the intersection of self and another YGridComponent. More... | |
int | superindex (iTupel coord) const |
int | superincrement (int i) const |
Iterator | begin () const |
return iterator to first element of index set More... | |
Iterator | begin (const iTupel &co) const |
return iterator to given element of index set More... | |
Iterator | end () const |
return subiterator to last element of index set More... | |
Static Public Attributes | |
static const int | d = Coordinates::dimension |
The YGrid considered here describes a finite set -tupels of the form
together with an affine mapping.
A YGrid is characterized by the following quantities:
The shift can be used to interpret the points of a grid as midpoints of cells, faces, edges, etc.
Here is a graphical illustration of a grid:
A YGrid allows to iterate over all its cells with an Iterator class.
A YGrid is always considered as being embedded in a larger grid. This embedding is characterized by an offset and an enclosing grid as shown in the following picture:
The iterator provides also a mapping to the consecutive index in the enclosing grid.
Note: as of november 2013 there are only YGrid and YGrid::Iterator. These represent the functionality of former SubYGrid and SubYGrid::TransformingSubIterator. All other classes in the hierarchy have not been used.
typedef Coordinates::ctype Dune::YGridComponent< Coordinates >::ct |
typedef FieldVector<ct,d> Dune::YGridComponent< Coordinates >::fTupel |
typedef std::array<int, d> Dune::YGridComponent< Coordinates >::iTupel |
|
inline |
make uninitialized ygrid
|
inline |
make ygrid without coordinate information
origin | origin of the grid in global coordinates |
size | size of the grid Such grid has no coordinate information stored but can be used to determine an intersection with a grid with coordinate information. This avoids sending coordinates in the parallel case. |
|
inline |
make a subgrid by taking coordinates from a larger grid
origin | origin of the grid to be constructed |
size | size of the grid to be constructed |
enclosing | the grid to take coordinates and shift vector from |
|
inline |
Make YGridComponent by giving all parameters.
origin | the origin of the grid in global coordinates |
shift | the shift vector |
coords | the coordinate vectors to be used |
size | the size vector |
offset | the offset in the enclosing grid |
supersize | size of the enclosing grid |
|
inline |
return iterator to first element of index set
|
inline |
return iterator to given element of index set
|
inline |
Return true if YGrid is empty, i.e. has size 0 in all directions.
|
inline |
return subiterator to last element of index set
|
inline |
|
inline |
given a tupel compute its index in the lexicographic numbering
|
inline |
given a coordinate, return true if it is in the grid
|
inline |
Return YGridComponent of supergrid of self which is the intersection of self and another YGridComponent.
|
inline |
Return maximum index in direction i.
|
inline |
Return minimum index in direction i.
|
inline |
return grid moved by the vector v
|
inline |
Return offset to origin of enclosing grid.
|
inline |
Return offset to origin of enclosing grid.
|
inline |
return reference to origin
|
inline |
Return origin in direction i.
|
inline |
Return shift tupel.
|
inline |
Return shift in direction i.
|
inline |
retrun size
|
inline |
return size in direction i
|
inline |
|
inline |
|
inline |
return size of enclosing grid
|
inline |
return size of enclosing grid
|
inline |
Return total size of index set which is the product of all size per direction.
|
static |