Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily > Class Template Reference
[Grid Developer API]
#include <grid.hh>
Inheritance diagram for Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >:

Detailed Description
template<int dim, int dimworld, class ct, class GridFamily>
class Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >
A Grid is a container of grid entities. Given a dimension dim these entities have a codimension codim with 0 <= codim <= dim.The Grid is assumed to be hierachically refined and nested. It enables iteration over entities of a given level and codimension.
The grid can be non-matching.
All information is provided to allocate degrees of freedom in appropriate vector data structures (which are not part of this module).
Template class Grid defines a "base class" for all grids.
- Classes implementing the Grid Interface
- Dune::AlbertaGrid
Provides the simplicial meshes of the finite element tool box ALBERTA (http://www.alberta-fem.de/) written by Kunibert Siebert and Alfred Schmidt. - Dune::ALUSimplexGrid and Dune::ALUCubeGrid and ALUConformGrid
2d/3D grid with support for non-conform adaptation and dynamic load balancing - Dune::OneDGrid
Onedimensional adaptive grid - Dune::SGrid
A structured mesh in d dimensions consisting of "cubes". - Dune::UGGrid
Provides the meshes of the finite element toolbox UG. (http://sit.iwr.uni-heidelberg.de/~ug). - Dune::YaspGrid (Yet Another Structured Parallel Grid)
Provides a distributed structured cube mesh.
- Dune::AlbertaGrid
Public Types | |
typedef GridFamily::Traits | Traits |
the traits of this class | |
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 ct | ctype |
Define type used for coordinates in grid module. | |
Public Member Functions | |
bool | mark (int refCount, const typename Traits::template Codim< 0 >::EntityPointer &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. | |
int | getMark (const typename Traits::template Codim< 0 >::EntityPointer &) const |
returns adaptation mark for given entity, i.e. here the default implementation returns 0. | |
bool | adapt () |
Refine all positive marked leaf entities coarsen all negative marked entities if possible. | |
bool | preAdapt () |
returns true, if at least one entity is marked for adaption | |
void | postAdapt () |
clean up some markers | |
int | ghostSize (int level, int codim) const |
ghostSize is zero by default | |
int | overlapSize (int level, int codim) const |
overlapSize is zero by default | |
int | ghostSize (int codim) const |
ghostSize is zero by default | |
int | overlapSize (int codim) const |
overlapSize is zero by default | |
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 | |
Grid id | |
std::string | name () const |
Return the id of the grid. | |
Size methods | |
int | maxLevel () const |
Return maximum level defined in this grid. Levels are numbered 0 ... maxLevel with 0 the coarsest level. | |
int | size (int level, int codim) const |
Return number of grid entities of a given codim on a given level in this process. | |
int | size (int codim) const |
Return number of leaf entities of a given codim in this process. | |
int | size (int level, GeometryType type) const |
Return number of entities per level and geometry type in this process. | |
int | size (GeometryType type) const |
Return number of leaf entities per geometry type in this process. | |
Iterators | |
template<int cd, PartitionIteratorType pitype> | |
Codim< cd >::template Partition< pitype >::LevelIterator | lbegin (int level) const |
Iterator to first entity of given codim on level. | |
template<int cd> | |
Codim< cd >::template Partition< All_Partition >::LevelIterator | lbegin (int level) const |
Iterator to first entity of given codim on level for PartitionType All_Partition. | |
template<int cd, PartitionIteratorType pitype> | |
Codim< cd >::template Partition< pitype >::LevelIterator | lend (int level) const |
one past the end on this level | |
template<int cd> | |
Codim< cd >::template Partition< All_Partition >::LevelIterator | lend (int level) const |
one past the end on this level for PartitionType All_Partition | |
template<int cd, PartitionIteratorType pitype> | |
Codim< cd >::template Partition< pitype >::LeafIterator | leafbegin () const |
Iterator to first entity of given codim on leaf grid. | |
template<int cd> | |
Codim< cd >::template Partition< All_Partition >::LeafIterator | leafbegin () const |
Iterator to first entity of given codim on leaf grid for PartitionType All_Partition. | |
template<int cd, PartitionIteratorType pitype> | |
Codim< cd >::template Partition< pitype >::LeafIterator | leafend () const |
one past the end on the leaf level grid | |
template<int cd> | |
Codim< cd >::template Partition< All_Partition >::LeafIterator | leafend () const |
one past the end on the leaf grid for PartitionType All_Partition | |
Access to index and id sets | |
const Codim< 0 >::GlobalIdSet & | globalIdSet () const |
return const reference to the grids global id set | |
const Codim< 0 >::LocalIdSet & | localIdSet () const |
return const reference to the grids local id set | |
const Codim< 0 >::LevelIndexSet & | levelIndexSet (int level) const |
return const reference to the grids level index set for level level | |
const Codim< 0 >::LeafIndexSet & | leafIndexSet () const |
return const reference to the grids leaf index set | |
Adaptivity and grid refinement | |
void | globalRefine (int refCount) |
Refine the grid refCount times using the default refinement rule. | |
bool | mark (int refCount, const typename Codim< 0 >::EntityPointer &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 | |
Parallel data distribution and communication | |
const Codim< 0 >::CollectiveCommunication & | comm () const |
return const reference to a collective communication object. The return type is a model of Dune::CollectiveCommunication. | |
Protected Member Functions | |
template<class InterfaceType> | |
ReturnImplementationType< InterfaceType >::ImplementationType & | getRealImplementation (InterfaceType &i) const |
return real implementation of interface class | |
GridImp & | asImp () |
Barton-Nackman trick. | |
const GridImp & | asImp () const |
Barton-Nackman trick. | |
Classes | |
class | ReturnImplementationType |
Helper class to choose correct implementation return type for getRealImplementation. More... |
Member Enumeration Documentation
anonymous enum [inherited] |
anonymous enum [inherited] |
Member Function Documentation
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::mark | ( | int | refCount, | |
const typename Traits::template Codim< 0 >::EntityPointer & | e | |||
) | [inline] |
Marks an entity to be refined/coarsened in a subsequent adapt.
- Parameters:
-
[in] refCount Number of subdivisions that should be applied. Negative value means coarsening. [in] e EntityPointer to Entity that should be refined
- Returns:
- true if Entity was marked, false otherwise.
- Note:
- default implementation is: return false; for grids with no adaptation.
- for the grid programmer: this method is implemented as a template method, because the Entity type is not defined when the class is instantiated You won't need this trick in the implementation. In your implementation you should use it as This template method will vanish due to the inheritance rules.
bool mark( int refCount, typename Traits::template Codim<0>::EntityPointer & e ).
Reimplemented in Dune::ALU2dGrid< dim, dimworld >, Dune::ALU3dGrid< dim, dimworld, elType >, Dune::UGGrid< dim >, Dune::ALU2dGrid< 2, 2 >, Dune::ALU3dGrid< 3, 3, Dune::hexa >, and Dune::ALU3dGrid< 3, 3, Dune::tetra >.
int Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::getMark | ( | const typename Traits::template Codim< 0 >::EntityPointer & | ) | const [inline] |
returns adaptation mark for given entity, i.e. here the default implementation returns 0.
- Parameters:
-
[in] e EntityPointer for which adaptation mark should be determined
- Returns:
- int adaptation mark, here the default value 0 is returned
Reimplemented in Dune::AlbertaGrid< dim, dimworld >, Dune::ALU2dGrid< dim, dimworld >, Dune::ALU3dGrid< dim, dimworld, elType >, Dune::UGGrid< dim >, Dune::ALU2dGrid< 2, 2 >, Dune::ALU3dGrid< 3, 3, Dune::hexa >, and Dune::ALU3dGrid< 3, 3, Dune::tetra >.
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::adapt | ( | ) | [inline] |
Refine all positive marked leaf entities coarsen all negative marked entities if possible.
- Returns:
- true if a least one entity was refined
- Note: this default implementation always returns false so grid with no adaptation doesn't need to implement these methods
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
Reimplemented in Dune::AlbertaGrid< dim, dimworld >, Dune::ALU2dGrid< dim, dimworld >, Dune::ALU3dGrid< dim, dimworld, elType >, Dune::OneDGrid, Dune::SGrid< dim, dimworld >, Dune::UGGrid< dim >, Dune::YaspGrid< dim, dimworld >, Dune::ALU2dGrid< 2, 2 >, Dune::ALU3dGrid< 3, 3, Dune::hexa >, Dune::ALU3dGrid< 3, 3, Dune::tetra >, Dune::SGrid< dimension, dimension >, and Dune::YaspGrid< dimworld, dimworld >.
void Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::communicate | ( | CommDataHandleIF< DataHandleImp, DataTypeImp > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir, | |||
int | level | |||
) | const [inline] |
dummy communicate, doing nothing
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
Reimplemented in Dune::ALU2dGrid< 2, 2 >, Dune::ALU3dGrid< 3, 3, Dune::hexa >, and Dune::ALU3dGrid< 3, 3, Dune::tetra >.
void Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::communicate | ( | CommDataHandleIF< DataHandleImp, DataTypeImp > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir | |||
) | const [inline] |
dummy communicate, doing nothing
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
Reimplemented in Dune::ALU2dGrid< 2, 2 >, Dune::ALU3dGrid< 3, 3, Dune::hexa >, and Dune::ALU3dGrid< 3, 3, Dune::tetra >.
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.
- Parameters:
-
[in] refCount Number of subdivisions that should be applied. Negative value means coarsening. [in] e EntityPointer to Entity that should be refined
- Returns:
- true if Entity was marked, false otherwise.
int Dune::Grid< dim, dimworld, ct, GridFamily >::getMark | ( | const typename Codim< 0 >::EntityPointer & | e | ) | const [inline, inherited] |
returns adaptation mark for given entity pointer
- Parameters:
-
[in] e EntityPointer for which adaptation mark should be determined
- Returns:
- int adaptation mark currently set for given EntityPointer e
The documentation for this class was generated from the following file: