#include <yaspgrid.hh>
Provides a distributed structured cube mesh.
YaspGrid stands for yet another structured parallel grid. It implements the dune grid interface for structured grids with codim 0 and dim, with arbitrary overlap (including zero), periodic boundaries and fast implementation allowing on-the-fly computations.
Public Types | |
enum | |
maximum number of levels allowed | |
typedef yaspgrid_ctype | ctype |
define type used for coordinates in grid module | |
typedef YaspGridFamily< dim, dim > | GridFamily |
the GridFamily of this grid | |
typedef YaspGridFamily< dim, dim >::Traits | Traits |
The traits of this class. | |
typedef MultiYGrid< dim, ctype > | YMG |
shorthand for base class data types | |
Exported constants | |
enum | { dimension = dim } |
A constant that exports the template parameter dim. More... | |
enum | { dimensionworld = dimworld } |
A constant that exports the template parameter dimworld. More... | |
Exported types | |
typedef Partition < All_Partition > ::LevelGridView | LevelGridView |
View types for All_Partition. | |
typedef Partition < All_Partition > ::LeafGridView | LeafGridView |
Public Member Functions | |
std::string | name () const |
return the name of this Grid | |
YaspGrid (MPI_Comm comm, Dune::FieldVector< ctype, dim > L, Dune::FieldVector< int, dim > s, Dune::FieldVector< bool, dim > periodic, int overlap) | |
YaspGrid (Dune::FieldVector< ctype, dim > L, Dune::FieldVector< int, dim > s, Dune::FieldVector< bool, dim > periodic, int overlap) | |
int | maxLevel () const |
void | globalRefine (int refCount) |
refine the grid refCount times. What about overlap? | |
void | refine (bool b) |
refine the grid refCount times. What about overlap? | |
bool | adapt () |
map adapt to global refine | |
template<int cd, PartitionIteratorType pitype> | |
Traits::template Codim< cd > ::template Partition< pitype > ::LevelIterator | lbegin (int level) const |
one past the end on this level | |
template<int cd, PartitionIteratorType pitype> | |
Traits::template Codim< cd > ::template Partition< pitype > ::LevelIterator | lend (int level) const |
Iterator to one past the last entity of given codim on level for partition type. | |
template<int cd> | |
Traits::template Codim< cd > ::template Partition < All_Partition > ::LevelIterator | lbegin (int level) const |
version without second template parameter for convenience | |
template<int cd> | |
Traits::template Codim< cd > ::template Partition < All_Partition > ::LevelIterator | lend (int level) const |
version without second template parameter for convenience | |
template<int cd, PartitionIteratorType pitype> | |
Traits::template Codim< cd > ::template Partition< pitype > ::LeafIterator | leafbegin () const |
return LeafIterator which points to the first entity in maxLevel | |
template<int cd, PartitionIteratorType pitype> | |
Traits::template Codim< cd > ::template Partition< pitype > ::LeafIterator | leafend () const |
return LeafIterator which points behind the last entity in maxLevel | |
template<int cd> | |
Traits::template Codim< cd > ::template Partition < All_Partition > ::LeafIterator | leafbegin () const |
return LeafIterator which points to the first entity in maxLevel | |
template<int cd> | |
Traits::template Codim< cd > ::template Partition < All_Partition > ::LeafIterator | leafend () const |
return LeafIterator which points behind the last entity in maxLevel | |
int | overlapSize (int level, int codim) const |
return size (= distance in graph) of overlap region | |
int | overlapSize (int codim) const |
return size (= distance in graph) of overlap region | |
int | ghostSize (int level, int codim) const |
return size (= distance in graph) of ghost region | |
int | ghostSize (int codim) const |
return size (= distance in graph) of ghost region | |
int | size (int level, int codim) const |
number of entities per level and codim in this process | |
int | size (int codim) const |
number of leaf entities per codim in this process | |
int | size (int level, GeometryType type) const |
number of entities per level and geometry type in this process | |
int | size (GeometryType type) const |
number of leaf entities per geometry type in this process | |
template<class DataHandleImp, class DataType> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir, int level) const |
template<class DataHandleImp, class DataType> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const |
template<class DataHandle, int codim> | |
void | communicateCodim (DataHandle &data, InterfaceType iftype, CommunicationDirection dir, int level) const |
const Traits::GlobalIdSet & | globalIdSet () const |
return const reference to the grids global id set | |
const Traits::LocalIdSet & | localIdSet () const |
return const reference to the grids local id set | |
const Traits::LevelIndexSet & | levelIndexSet (int level) const |
return const reference to the grids level index set for level level | |
const Traits::LeafIndexSet & | leafIndexSet () const |
return const reference to the grids leaf index set | |
const CollectiveCommunication < MPI_Comm > & | comm () const |
return a collective communication object | |
template<PartitionIteratorType pitype> | |
Traits::template Partition < pitype >::LevelGridView | levelView (int level) const |
View for a grid level. | |
Traits::template Partition < All_Partition > ::LevelGridView | levelView (int level) const |
View for a grid level for All_Partition. | |
template<PartitionIteratorType pitype> | |
Traits::template Partition < pitype >::LeafGridView | leafView () const |
View for the leaf grid. | |
Traits::template Partition < All_Partition > ::LeafGridView | leafView () const |
View for the leaf grid for All_Partition. | |
bool | mark (int refCount, const typename Traits::template Codim< 0 >::EntityPointer &e) |
Marks an entity to be refined/coarsened in a subsequent adapt (deprecated). | |
bool | mark (int refCount, const typename Traits::template Codim< 0 >::Entity &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. | |
int | getMark (const typename Traits::template Codim< 0 >::EntityPointer &e) const |
returns adaptation mark for given entity, i.e. here the default implementation returns 0. | |
int | getMark (const typename Traits::template Codim< 0 >::Entity &) const |
returns adaptation mark for given entity, i.e. here the default implementation returns 0. | |
bool | preAdapt () |
returns true, if at least one entity is marked for adaption | |
void | postAdapt () |
clean up some markers | |
template<class DataHandleImp, class DataTypeImp> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const |
template<class DataHandleImp, class DataTypeImp> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const |
bool | loadBalance () |
default implementation of load balance does nothing and returns false | |
template<class DataHandle> | |
bool | loadBalance (DataHandle &data) |
default implementation of load balance does nothing and returns false | |
Adaptivity and grid refinement | |
bool | mark (int refCount, const typename Codim< 0 >::EntityPointer &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. (deprecated). | |
bool | mark (int refCount, const typename Codim< 0 >::Entity &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. | |
int | getMark (const typename Codim< 0 >::EntityPointer &e) const |
returns adaptation mark for given entity pointer (deprecated) | |
int | getMark (const typename Codim< 0 >::Entity &e) const |
returns adaptation mark for given entity | |
Protected Member Functions | |
GridImp & | asImp () |
Barton-Nackman trick. | |
const GridImp & | asImp () const |
Barton-Nackman trick. | |
Static Protected Member Functions | |
template<class InterfaceType> | |
static ReturnImplementationType < InterfaceType > ::ImplementationType & | getRealImplementation (InterfaceType &i) |
return real implementation of interface class |
typedef YaspGridFamily<dim,dim>::Traits Dune::YaspGrid< dim, deprecated_dimworld >::Traits |
The traits of this class.
Presents the typedefs as described in GridTraits.
Reimplemented from Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >.
anonymous enum [inherited] |
anonymous enum [inherited] |
Dune::YaspGrid< dim, deprecated_dimworld >::YaspGrid | ( | MPI_Comm | comm, | |
Dune::FieldVector< ctype, dim > | L, | |||
Dune::FieldVector< int, dim > | s, | |||
Dune::FieldVector< bool, dim > | periodic, | |||
int | overlap | |||
) | [inline] |
Constructor for a YaspGrid, they are all forwarded to the base class
comm | MPI communicator where this mesh is distributed to | |
L | extension of the domain | |
s | number of cells on coarse mesh in each direction | |
periodic | tells if direction is periodic or not | |
size | of overlap on coarsest grid (same in all directions) |
Dune::YaspGrid< dim, deprecated_dimworld >::YaspGrid | ( | Dune::FieldVector< ctype, dim > | L, | |
Dune::FieldVector< int, dim > | s, | |||
Dune::FieldVector< bool, dim > | periodic, | |||
int | overlap | |||
) | [inline] |
Constructor for a sequential YaspGrid, they are all forwarded to the base class.
Sequential here means that the whole grid is living on one process even if your program is running in parallel.
L | extension of the domain | |
s | number of cells on coarse mesh in each direction | |
periodic | tells if direction is periodic or not | |
size | of overlap on coarsest grid (same in all directions) |
int Dune::YaspGrid< dim, deprecated_dimworld >::maxLevel | ( | ) | const [inline] |
Return maximum level defined in this grid. Levels are numbered 0 ... maxlevel with 0 the coarsest level.
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
void Dune::YaspGrid< dim, deprecated_dimworld >::communicate | ( | CommDataHandleIF< DataHandleImp, DataType > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir, | |||
int | level | |||
) | const [inline] |
The new communication interface
communicate objects for all codims on a given level
void Dune::YaspGrid< dim, deprecated_dimworld >::communicate | ( | CommDataHandleIF< DataHandleImp, DataType > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir | |||
) | const [inline] |
The new communication interface
communicate objects for all codims on the leaf grid
void Dune::YaspGrid< dim, deprecated_dimworld >::communicateCodim | ( | DataHandle & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir, | |||
int | level | |||
) | const [inline] |
The new communication interface
communicate objects for one codim
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::mark | ( | int | refCount, | |
const typename Traits::template Codim< 0 >::EntityPointer & | e | |||
) | [inline, inherited] |
Marks an entity to be refined/coarsened in a subsequent adapt (deprecated).
[in] | refCount | Number of subdivisions that should be applied. Negative value means coarsening. |
[in] | e | EntityPointer to Entity that should be refined |
bool mark( int refCount, typename Traits::template Codim<0>::EntityPointer & e ).
Reimplemented in Dune::UGGrid< dim >, and Dune::UGGrid< dimworld >.
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::mark | ( | int | refCount, | |
const typename Traits::template Codim< 0 >::Entity & | e | |||
) | [inline, inherited] |
Marks an entity to be refined/coarsened in a subsequent adapt.
[in] | refCount | Number of subdivisions that should be applied. Negative value means coarsening. |
[in] | e | Entity to Entity that should be refined |
bool mark( int refCount, typename Traits::template Codim<0>::Entity & e ).
Reimplemented in Dune::AlbertaGrid< dim, dimworld >, Dune::UGGrid< dim >, and Dune::UGGrid< dimworld >.
bool Dune::Grid< dim, dimworld, ct, GridFamily >::mark | ( | int | refCount, | |
const typename Codim< 0 >::EntityPointer & | e | |||
) | [inline, inherited] |
Marks an entity to be refined/coarsened in a subsequent adapt. (deprecated).
[in] | refCount | Number of subdivisions that should be applied. Negative value means coarsening. |
[in] | e | EntityPointer to Entity that should be refined |
bool Dune::Grid< dim, dimworld, ct, GridFamily >::mark | ( | int | refCount, | |
const typename Codim< 0 >::Entity & | e | |||
) | [inline, inherited] |
int Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::getMark | ( | const typename Traits::template Codim< 0 >::EntityPointer & | e | ) | const [inline, inherited] |
returns adaptation mark for given entity, i.e. here the default implementation returns 0.
[in] | e | EntityPointer for which adaptation mark should be determined |
Reimplemented in Dune::UGGrid< dim >, and Dune::UGGrid< dimworld >.
int Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::getMark | ( | const typename Traits::template Codim< 0 >::Entity & | ) | const [inline, inherited] |
returns adaptation mark for given entity, i.e. here the default implementation returns 0.
[in] | e | Entity for which adaptation mark should be determined |
Reimplemented in Dune::AlbertaGrid< dim, dimworld >, Dune::UGGrid< dim >, and Dune::UGGrid< dimworld >.
int Dune::Grid< dim, dimworld, ct, GridFamily >::getMark | ( | const typename Codim< 0 >::EntityPointer & | e | ) | const [inline, inherited] |
returns adaptation mark for given entity pointer (deprecated)
[in] | e | EntityPointer for which adaptation mark should be determined |
int Dune::Grid< dim, dimworld, ct, GridFamily >::getMark | ( | const typename Codim< 0 >::Entity & | e | ) | const [inline, inherited] |
void Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::communicate | ( | CommDataHandleIF< DataHandleImp, DataTypeImp > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir, | |||
int | level | |||
) | const [inline, inherited] |
dummy communicate, doing nothing
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
void Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::communicate | ( | CommDataHandleIF< DataHandleImp, DataTypeImp > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir | |||
) | const [inline, inherited] |
dummy communicate, doing nothing
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.