1 #ifndef DUNE_GEOGRID_INDEXSETS_HH
2 #define DUNE_GEOGRID_INDEXSETS_HH
6 #include <dune/common/typetraits.hh>
22 template<
class Gr
id,
class HostIndexSet >
24 :
public Dune::IndexSet< Grid, IndexSet< Grid, HostIndexSet >, typename HostIndexSet::IndexType >
29 typedef typename remove_const< Grid >::type::Traits Traits;
31 typedef typename Traits::HostGrid HostGrid;
42 explicit IndexSet (
const HostIndexSet &hostIndexSet )
43 : hostIndexSet_( &hostIndexSet )
47 : hostIndexSet_( other.hostIndexSet_ )
52 hostIndexSet_ = other.hostIndexSet_;
60 IndexType index (
const typename Traits::template Codim< cc >::Entity &entity )
const
62 return Grid::getRealImplementation( entity ).index( hostIndexSet() );
66 IndexType subIndex (
const typename Traits::template Codim< cc >::Entity &entity,
int i,
unsigned int codim )
const
68 return Grid::getRealImplementation( entity ).subIndex( hostIndexSet(), i, codim );
73 return hostIndexSet().size( type );
76 int size (
int codim )
const
78 return hostIndexSet().size( codim );
81 template<
class Entity >
84 return Grid::getRealImplementation( entity ).isContained( hostIndexSet() );
87 const std::vector< GeometryType > &
geomTypes (
int codim )
const
89 return hostIndexSet().geomTypes( codim );
92 operator bool ()
const {
return bool( hostIndexSet_ ); }
95 const HostIndexSet &hostIndexSet ()
const
98 return *hostIndexSet_;
101 const HostIndexSet *hostIndexSet_;
108 #endif // #ifndef DUNE_GEOGRID_INDEXSETS_HH