3#ifndef DUNE_GEOGRID_ENTITYSEED_HH
4#define DUNE_GEOGRID_ENTITYSEED_HH
9#include <dune/grid/geometrygrid/capabilities.hh>
20 template<
int codim,
class Gr
id,
bool fake = !(Capabilities::hasHostEntity< Gr
id, codim >::v) >
28 template<
int codim,
class Grd >
29 class EntitySeed< codim, Grd, false >
31 typedef typename std::remove_const< Grd >::type::Traits Traits;
34 static const int codimension = codim;
35 static const int dimension = Traits::dimension;
36 static const int mydimension = dimension - codimension;
37 static const int dimensionworld = Traits::dimensionworld;
39 static const bool fake =
false;
41 typedef typename Traits::Grid Grid;
42 typedef typename Traits::template Codim< codim >::Entity Entity;
44 typedef typename Traits::HostGrid HostGrid;
45 typedef typename HostGrid::template Codim< codim >::EntitySeed HostEntitySeed;
51 explicit EntitySeed (
const HostEntitySeed &hostEntitySeed )
52 : hostEntitySeed_( hostEntitySeed )
58 return hostEntitySeed_.isValid();
61 const HostEntitySeed &hostEntitySeed ()
const {
return hostEntitySeed_; }
64 HostEntitySeed hostEntitySeed_;
72 template<
int codim,
class Grd >
73 class EntitySeed< codim, Grd, true >
75 typedef typename std::remove_const< Grd >::type::Traits Traits;
78 static const int codimension = codim;
79 static const int dimension = Traits::dimension;
80 static const int mydimension = dimension - codimension;
81 static const int dimensionworld = Traits::dimensionworld;
83 static const bool fake =
true;
85 typedef typename Traits::Grid Grid;
86 typedef typename Traits::template Codim< codim >::Entity Entity;
88 typedef typename Traits::HostGrid HostGrid;
89 typedef typename HostGrid::template Codim< 0 >::EntitySeed HostElementSeed;
95 explicit EntitySeed (
const HostElementSeed &hostElementSeed,
unsigned int subEntity )
96 : hostElementSeed_( hostElementSeed ),
97 subEntity_( subEntity )
103 return hostElementSeed_.isValid();
106 const HostElementSeed &hostElementSeed ()
const {
return hostElementSeed_; }
107 unsigned int subEntity ()
const {
return subEntity_; }
110 HostElementSeed hostElementSeed_;
111 unsigned int subEntity_;
Interface class EntitySeed.
Traits for type conversions and type information.
Dune namespace.
Definition: alignedallocator.hh:11