1#ifndef DUNE_FEM_GRIDPART_GEOMETRYGRIDPART_INDEXSET_HH
2#define DUNE_FEM_GRIDPART_GEOMETRYGRIDPART_INDEXSET_HH
8#include <dune/grid/common/gridenums.hh>
20 template<
class HostIndexSet >
21 class GeometryGridPartIndexSet
23 typedef GeometryGridPartIndexSet< HostIndexSet > This;
26 typedef typename HostIndexSet::IndexType IndexType;
28 explicit GeometryGridPartIndexSet (
const HostIndexSet &hostIndexSet )
29 : hostIndexSet_( &hostIndexSet )
32 int size (
const GeometryType &type )
const {
return hostIndexSet().size( type ); }
33 int size (
const int codim )
const {
return hostIndexSet().size( codim ); }
35 template<
class Entity >
36 int index (
const Entity &entity )
const
38 return hostIndexSet().index( entity.impl().hostEntity() );
41 template<
class Entity >
42 int subIndex (
const Entity &entity,
const int local,
const unsigned int codim )
const
44 return hostIndexSet().subIndex( entity.impl().hostEntity(), local, codim );
47 const std::vector< GeometryType > &geomTypes (
const int codim )
const
49 return hostIndexSet().geomTypes( codim );
52 template<
class Entity >
53 bool contains (
const Entity &entity )
const
55 return hostIndexSet().contains( entity.impl().hostEntity() );
58 bool consecutive ()
const {
return hostIndexSet().consecutive(); }
59 bool persistent ()
const {
return hostIndexSet().persistent(); }
61 int numberOfHoles (
const int codim )
const {
return hostIndexSet().numberOfHoles( codim ); }
63 int oldIndex (
const int hole,
const int codim )
const
65 return hostIndexSet().oldIndex( hole, codim );
68 int newIndex (
const int hole,
const int codim )
const
70 return hostIndexSet().newIndex( hole, codim );
73 std::string name ()
const {
return "GeometryGridPart::IndexSet" ; }
76 const HostIndexSet &hostIndexSet ()
const
78 assert( hostIndexSet_ );
79 return *hostIndexSet_;
82 const HostIndexSet *hostIndexSet_;
Provides base classes for index and id sets.
Dune namespace.
Definition: alignedallocator.hh:13
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75
constexpr std::bool_constant<((II==value)||...)> contains(std::integer_sequence< T, II... >, std::integral_constant< T, value >)
Checks whether or not a given sequence contains a value.
Definition: integersequence.hh:137
Traits for type conversions and type information.