DUNE MultiDomainGrid (2.10)
#include <dune/grid/multidomaingrid/indexsets.hh>
Public Member Functions | |
template<int codim> | |
IndexType | index (const typename Grid::Traits::template Codim< codim >::Entity &e) const |
Returns the index of the entity with codimension codim. | |
template<typename Entity > | |
IndexType | index (const Entity &e) const |
Returns the index of the entity. | |
template<int codim> | |
IndexType | subIndex (const typename Grid::Traits::template Codim< codim >::Entity &e, int i, unsigned int cd) const |
Returns the subdindex of the i-th subentity of e with codimension codim. | |
template<typename Entity > | |
IndexType | subIndex (const Entity &e, int i, unsigned int cd) const |
Returns the subdindex of the i-th subentity of e with codimension codim. | |
Types | types (int codim) const |
Returns a list of all geometry types with codimension codim contained in the grid. | |
IndexType | size (GeometryType type) const |
Returns the number of entities with GeometryType type in the grid. | |
IndexType | size (int codim) const |
Returns the number of entities with codimension codim in the grid. | |
template<typename EntityType > | |
bool | contains (const EntityType &e) const |
Returns true if the entity is contained in the grid. | |
template<typename EntityType > | |
const MapEntry< EntityType::codimension >::SubDomainSet & | subDomains (const EntityType &e) const |
Returns a constant reference to the SubDomainSet of the given entity. | |
template<int cc> | |
const MapEntry< cc >::SubDomainSet & | subDomains (const typename Grid::Traits::template Codim< cc >::Entity &e) const |
template<class EntityType > | |
IndexType | index (SubDomainIndex subDomain, const EntityType &e) const |
Returns the index of the entity in a specific subdomain. | |
template<int cc> | |
IndexType | index (SubDomainIndex subDomain, const typename Grid::Traits::template Codim< cc >::Entity &e) const |
template<typename EntityType > | |
bool | contains (SubDomainIndex subDomain, const EntityType &e) const |
Returns true if the entity is contained in a specific subdomain. | |
Detailed Description
class Dune::mdgrid::IndexSetWrapper< GridImp, HostGridViewType >
This is the heart of this module. The index sets for each level of the grid view and for the leaf grid view store a container of the type ContainerMap which is roughly the following:
Most of the fancy stuff is just to avoid instantiating unsupported codimensions by the host grid. But in general, the index of the sub-domain entity is stored in multiIndexMap
and is accessed through the indexMap
. If there is only one sub-domain in the entity, the sub-domain index is directly stored in indexMap
to avoid the indirection of going to multiIndexMap
. This also makes the multi-domain entities more compact.
To be performant in the overlapping case, the current implementation requires that MultiIndexContainer
stores its contents within its class itself (i.e. no indirection to the heap). Doing otherwise implies very scatter memory and a very irregular memory access pattern. Either a fixed integer or an array do this. An idea to make this performant in a more general case is to use a polymorphic allocator that creates the multi-indices contiguously in memory. Index set for the MultiDomainGrid.
Member Function Documentation
◆ index()
|
inline |
Returns the index of the entity with codimension cc in a specific subdomain.
- Template Parameters
-
the codimension of the entity.
◆ subDomains()
|
inline |
Returns a constant reference to the SubDomainSet of the given entity with codimension cc.
- Template Parameters
-
cc the codimension of the entity.
The documentation for this class was generated from the following file:
- dune/grid/multidomaingrid/indexsets.hh
