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> >
26 typedef YaspIndexSet< GridImp, isLeafIndexSet > This;
27 typedef IndexSet< GridImp, This, unsigned int, std::array<GeometryType, 1> > Base;
39 assert(not isLeafIndexSet);
46 assert(isLeafIndexSet);
53 return e.impl().compressedIndex();
59 int i,
unsigned int codim )
const 61 return e.impl().subCompressedIndex(i, codim);
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) };
102 #endif // DUNE_GRID_YASPGRIDINDEXSET_HH concept Entity
Model of a grid entity.
Definition: concepts/entity.hh:119
static constexpr std::array< GeometryType, 1 > types(int codim)
obtain all geometry types of entities in domain
Definition: yaspgridindexsets.hh:90
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
YaspIndexSet(const GridImp &g)
Level grid view constructor stores reference to a grid and level.
Definition: yaspgridindexsets.hh:43
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
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
bool contains(const EntityType &e) const
return true if the given entity is contained in .
Definition: yaspgridindexsets.hh:82
IndexTypeImp IndexType
The type used for the indices.
Definition: common/indexidset.hh:92
Include standard header files.
Definition: agrid.hh:59
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
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
YaspIndexSet(const GridImp &g, int l)
Level grid view constructor stores reference to a grid and level.
Definition: yaspgridindexsets.hh:35
concept IndexSet
Model of an index set.
Definition: concepts/indexidset.hh:55