5#ifndef DUNE_GRID_YASPGRIDINDEXSET_HH
6#define DUNE_GRID_YASPGRIDINDEXSET_HH
22 template<
class Gr
idImp,
bool isLeafIndexSet>
24 :
public IndexSet< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >, unsigned int, std::array<GeometryType, 1> >
39 assert(not isLeafIndexSet);
46 assert(isLeafIndexSet);
51 IndexType index (
const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e)
const
53 return e.impl().compressedIndex();
58 IndexType subIndex (
const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e,
59 int i,
unsigned int codim )
const
61 return e.impl().subCompressedIndex(i, codim);
65 std::size_t
size (GeometryType type)
const
67 return (isLeafIndexSet)
69 : grid.size( level, type );
73 std::size_t
size (
int codim)
const
75 return (isLeafIndexSet)
77 : grid.size( level, codim );
81 template<
class EntityType>
84 return (isLeafIndexSet)
85 ? e.level() == grid.maxLevel()
90 static constexpr std::array<GeometryType, 1>
types (
int codim)
92 return { GeometryTypes::cube(GridImp::dimension - codim) };
Include standard header files.
Definition agrid.hh:60
Index Set Interface base class.
Definition common/indexidset.hh:78
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition common/indexidset.hh:153
Export the type of the entity used as parameter in the index(...) method.
Definition common/indexidset.hh:87
Implementation of Level- and LeafIndexSets for YaspGrid.
Definition yaspgridindexsets.hh:25
YaspIndexSet(const GridImp &g)
Level grid view constructor stores reference to a grid and level.
Definition yaspgridindexsets.hh:43
YaspIndexSet(const GridImp &g, int l)
Level grid view constructor stores reference to a grid and level.
Definition yaspgridindexsets.hh:35
IndexType index(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e) const
get index of an entity
Definition yaspgridindexsets.hh:51
bool contains(const EntityType &e) const
return true if the given entity is contained in .
Definition yaspgridindexsets.hh:82
std::size_t size(GeometryType type) const
get number of entities of given type and level (the level is known to the object)
Definition yaspgridindexsets.hh:65
IndexType subIndex(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
get index of subentity of an entity
Definition yaspgridindexsets.hh:58
static constexpr std::array< GeometryType, 1 > types(int codim)
obtain all geometry types of entities in domain
Definition yaspgridindexsets.hh:90
std::size_t size(int codim) const
return size of set for a given codim
Definition yaspgridindexsets.hh:73
Base::IndexType IndexType
Definition yaspgridindexsets.hh:30