1 #ifndef DUNE_GEOGRID_IDSET_HH
2 #define DUNE_GEOGRID_IDSET_HH
15 template<
class Gr
id,
class HostIdSet >
17 :
public Dune::IdSet< Grid, IdSet< Grid, HostIdSet >, typename HostIdSet::IdType >
22 typedef typename remove_const< Grid >::type::Traits Traits;
25 typedef typename HostIdSet::IdType
IdType;
33 explicit IdSet (
const HostIdSet &hostIdSet )
34 : hostIdSet_( &hostIdSet )
38 : hostIdSet_( other.hostIdSet_ )
43 hostIdSet_ = other.hostIdSet_;
48 IdType id (
const typename Traits::template Codim< codim >::Entity &entity )
const
50 return Grid::getRealImplementation( entity ).id( hostIdSet() );
53 template<
class Entity >
56 return id< Entity::codimension >( entity );
59 IdType subId (
const typename Traits::template Codim< 0 >::Entity &entity,
int i,
unsigned int codim )
const
61 return hostIdSet().subId( Grid::template getHostEntity< 0 >( entity ), i, codim );
64 operator bool ()
const {
return bool( hostIdSet_ ); }
67 const HostIdSet &hostIdSet ()
const
73 const HostIdSet *hostIdSet_;
80 #endif // #ifndef DUNE_GEOGRID_IDSET_HH