|
| 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 SubDomainEntity > |
| IndexType | subIndex (SubDomainIndex subDomain, const SubDomainEntity &e, int i, int codim) const |
| |
| Types | types (SubDomainIndex subDomain, int codim) const |
| |
| IndexType | size (SubDomainIndex subDomain, GeometryType type) const |
| |
| IndexType | size (SubDomainIndex subDomain, int codim) const |
| |
| template<typename EntityType > |
| bool | contains (SubDomainIndex subDomain, const EntityType &e) const |
| | Returns true if the entity is contained in a specific subdomain.
|
| |
| | IndexSetWrapper (const GridImp &grid, HostGridView hostGridView) |
| |
| IndexType | index (const typename Traits::template Codim< cc >::Entity &e) const |
| |
| IndexType | subIndex (const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const |
| |
| bool | contains (const Entity &e) const |
| |
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:
{c++}
template<int codim>
struct Container {
struct MapEntry {
SubDomainSet domains;
};
IndexMap indexMap;
SizeMap sizeMap;
CodimSizeMap codimSizeMap;
MultiIndexMap multiIndexMap;
};
bool setContains(const ArrayBasedSet< SI, capacity > &a, const ArrayBasedSet< SI, capacity > &b)
std::ptrdiff_t index() const
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.