1 #ifndef DUNE_GEOGRID_ENTITYSEED_HH
2 #define DUNE_GEOGRID_ENTITYSEED_HH
4 #include <dune/common/typetraits.hh>
17 template< int codim, class Grid, bool fake = !(Capabilities::hasHostEntity< Grid, codim >::v) >
25 template<
int codim,
class Grd >
26 class EntitySeed< codim, Grd, false >
28 typedef typename remove_const< Grd >::type::Traits Traits;
31 static const int codimension = codim;
32 static const int dimension = Traits::dimension;
33 static const int mydimension = dimension - codimension;
34 static const int dimensionworld = Traits::dimensionworld;
36 static const bool fake =
false;
38 typedef typename Traits::Grid
Grid;
39 typedef typename Traits::template Codim< codim >::Entity
Entity;
42 typedef typename HostGrid::template Codim< codim >::EntitySeed
HostEntitySeed;
45 : hostEntitySeed_( hostEntitySeed )
51 HostEntitySeed hostEntitySeed_;
59 template<
int codim,
class Grd >
60 class EntitySeed< codim, Grd, true >
62 typedef typename remove_const< Grd >::type::Traits Traits;
65 static const int codimension = codim;
66 static const int dimension = Traits::dimension;
67 static const int mydimension = dimension - codimension;
68 static const int dimensionworld = Traits::dimensionworld;
70 static const bool fake =
true;
72 typedef typename Traits::Grid
Grid;
73 typedef typename Traits::template Codim< codim >::Entity
Entity;
78 explicit EntitySeed (
const HostElementSeed &hostElementSeed,
unsigned int subEntity )
79 : hostElementSeed_( hostElementSeed ),
80 subEntity_( subEntity )
84 unsigned int subEntity ()
const {
return subEntity_; }
87 HostElementSeed hostElementSeed_;
88 unsigned int subEntity_;
95 #endif // #ifndef DUNE_GEOGRID_ENTITYSEED_HH