1#ifndef DUNE_MULTIDOMAINGRID_SUBDOMAINGRID_IDSETS_HH
2#define DUNE_MULTIDOMAINGRID_SUBDOMAINGRID_IDSETS_HH
6#include <dune/grid/common/indexidset.hh>
14template<
typename MDGr
id>
17template<
typename Gr
idImp,
typename HostIdSet>
19 public Dune::IdSet<GridImp,IdSetWrapper<GridImp,HostIdSet>,
20 typename HostIdSet::IdType>
24 friend class SubDomainGrid;
26 using HostGrid =
typename std::remove_const_t<GridImp>::HostGrid;
27 using Codim0Entity =
typename std::remove_const_t<GridImp>::Traits::template Codim<0>::Entity;
31 typedef typename HostIdSet::IdType IdType;
34 IdType id(
const typename std::remove_const_t<GridImp>::Traits::template Codim<codim>::Entity& e)
const {
35 assert(_grid.containsHostEntity(_grid.hostEntity(e)));
36 return _hostIdSet.id(_grid.hostEntity(e));
39 template<
typename Entity>
40 IdType id(
const Entity& e)
const {
41 assert(_grid.containsHostEntity(_grid.hostEntity(e)));
42 return _hostIdSet.id(_grid.hostEntity(e));
46 IdType subId(
const Codim0Entity& e,
int i)
const {
47 assert(_grid.containsHostEntity(_grid.hostEntity(e)));
48 return _hostIdSet.subId(_grid.hostEntity(e),i,codim);
51 IdType subId(
const Codim0Entity& e,
int i,
unsigned int codim)
const {
52 assert(_grid.containsHostEntity(_grid.hostEntity(e)));
53 return _hostIdSet.subId(_grid.hostEntity(e),i,codim);
59 const HostIdSet& _hostIdSet;
61 IdSetWrapper(
const GridImp& grid,
const HostIdSet& hostIdSet) :