DUNE-FEM (unstable)
#include <dune/grid/common/grid.hh>
Public Types | |
typedef GridFamily::Traits | Traits |
The traits of this class. More... | |
Exported types | |
typedef GridFamily::Traits::LeafGridView | LeafGridView |
type of view for leaf grid | |
typedef GridFamily::Traits::LevelGridView | LevelGridView |
type of view for level grid | |
typedef GridFamily::Traits::LeafIntersection | LeafIntersection |
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in the leaf view. | |
typedef GridFamily::Traits::LevelIntersection | LevelIntersection |
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in a level view. | |
typedef GridFamily::Traits::LeafIntersectionIterator | LeafIntersectionIterator |
A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an leaf element (entity of codimension 0) with other leaf elements. | |
typedef GridFamily::Traits::LevelIntersectionIterator | LevelIntersectionIterator |
A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an element (entity of codimension 0) with other elements on the same level. | |
typedef GridFamily::Traits::HierarchicIterator | HierarchicIterator |
A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine, but not to modify, entities of codimension 0 that result from refinement of an entity of codimension 0. | |
typedef GridFamily::Traits::LevelIndexSet | LevelIndexSet |
A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities on a grid level. | |
typedef GridFamily::Traits::LeafIndexSet | LeafIndexSet |
A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities in the leaf grid. | |
typedef GridFamily::Traits::GlobalIdSet | GlobalIdSet |
A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is unique over all processes over which the grid is partitioned. The numbering is not necessarily consecutive. | |
typedef GridFamily::Traits::LocalIdSet | LocalIdSet |
A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is only unique in a single process and it is not necessarily consecutive. | |
using | Communication = typename GridFamily::Traits::Communication |
A type that is a model of Dune::Communication. It provides a portable way for communication on the set of processes used by the grid. | |
typedef ct | ctype |
Define type used for coordinates in grid module. | |
Public Member Functions | |
Traits::LevelGridView | levelGridView (int level) const |
View for a grid level for All_Partition. | |
Traits::LeafGridView | leafGridView () const |
View for the leaf grid for All_Partition. | |
Traits::LeafIntersectionIterator | ileafbegin (const typename Traits::template Codim< 0 >::Entity &entity) const |
obtain begin intersection iterator on the leaf level | |
Traits::LeafIntersectionIterator | ileafend (const typename Traits::template Codim< 0 >::Entity &entity) const |
obtain end intersection iterator on the leaf level | |
Traits::LevelIntersectionIterator | ilevelbegin (const typename Traits::template Codim< 0 >::Entity &entity) const |
obtain begin intersection iterator on the entity level | |
Traits::LevelIntersectionIterator | ilevelend (const typename Traits::template Codim< 0 >::Entity &entity) const |
obtain end intersection iterator on the entity level | |
bool | mark (int refCount, const typename Traits ::template Codim< 0 >::Entity &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. More... | |
int | getMark (const typename Traits::template Codim< 0 >::Entity &e) const |
returns adaptation mark for given entity, i.e. here the default implementation returns 0. More... | |
bool | adapt () |
Refine all positive marked leaf entities coarsen all negative marked entities if possible. More... | |
bool | preAdapt () |
returns true, if at least one entity is marked for adaption | |
void | postAdapt () |
clean up some markers | |
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 | |
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. | |
size_t | numBoundarySegments () const |
returns the number of boundary segments within the macro grid More... | |
Access to index and id sets | |
const GlobalIdSet & | globalIdSet () const |
return const reference to the grids global id set | |
const LocalIdSet & | localIdSet () const |
return const reference to the grids local id set | |
const LevelIndexSet & | levelIndexSet (int level) const |
return const reference to the grids level index set for level level | |
const 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. More... | |
bool | mark (int refCount, const typename Codim< 0 >::Entity &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. More... | |
int | getMark (const typename Codim< 0 >::Entity &e) const |
returns adaptation mark for given entity More... | |
Parallel data distribution and communication | |
const Communication & | comm () const |
return const reference to a communication object. The return type is a model of Dune::Communication. | |
template<class EntitySeed > | |
Codim< EntitySeed::codimension >::Entity | entity (const EntitySeed &seed) const |
obtain Entity from EntitySeed. | |
GridImp & | asImp () |
Barton-Nackman trick. | |
const GridImp & | asImp () const |
Barton-Nackman trick. | |
Detailed Description
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::OneDGrid
Onedimensional adaptive grid - Dune::UGGrid
Provides the meshes of the finite element toolbox UG3. (described in https://doi.org/10.1007/s007910050003). - Dune::YaspGrid (Yet Another Structured Parallel Grid)
Provides a distributed structured cube mesh.
- Dune::AlbertaGrid
Member Typedef Documentation
◆ Traits
typedef GridFamily::Traits Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::Traits |
The traits of this class.
Presents the typedefs as described in GridTraits.
Member Function Documentation
◆ 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
◆ getMark() [1/2]
|
inlineinherited |
returns adaptation mark for given entity
- Parameters
-
[in] e Entity for which adaptation mark should be determined
- Returns
- int adaptation mark currently set for given Entity e
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
◆ getMark() [2/2]
|
inline |
returns adaptation mark for given entity, i.e. here the default implementation returns 0.
- Parameters
-
[in] e Entity for which adaptation mark should be determined
- Returns
- int adaptation mark, here the default value 0 is returned
◆ globalRefine()
|
inlineinherited |
Refine the grid refCount times using the default refinement rule.
This behaves like marking all elements for refinement and then calling preAdapt, adapt and postAdapt. The state after globalRefine is comparable to the state after postAdapt.
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp(), CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Grid< dim, dimworld, ct, GridFamily >::globalRefine().
Referenced by checkGrid(), and Dune::Grid< dim, dimworld, ct, GridFamily >::globalRefine().
◆ mark() [1/2]
|
inlineinherited |
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 Entity that should be marked
- Returns
- true if Entity was marked, false otherwise.
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
◆ mark() [2/2]
|
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 Entity 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 typename Traits::template Codim<0>::Entity & e ).bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e)Marks an entity to be refined/coarsened in a subsequent adapt.Definition: grid.hh:929A Traits struct that collects all associated types of one implementation.Definition: grid.hh:411
◆ numBoundarySegments()
|
inlineinherited |
returns the number of boundary segments within the macro grid
- Returns
- number of boundary segments within the macro grid
The documentation for this class was generated from the following files:
- dune/grid/common/geometry.hh
- dune/grid/common/grid.hh