5#ifndef DUNE_GEOGRID_ENTITYSEED_HH
6#define DUNE_GEOGRID_ENTITYSEED_HH
11#include <dune/grid/geometrygrid/capabilities.hh>
22 template<
int codim,
class Gr
id,
bool fake = !(Capabilities::hasHostEntity< Gr
id, codim >::v) >
30 template<
int codim,
class Grd >
31 class EntitySeed< codim, Grd, false >
33 typedef typename std::remove_const< Grd >::type::Traits Traits;
36 static const int codimension = codim;
37 static const int dimension = Traits::dimension;
38 static const int mydimension = dimension - codimension;
39 static const int dimensionworld = Traits::dimensionworld;
41 static const bool fake =
false;
43 typedef typename Traits::Grid Grid;
44 typedef typename Traits::template Codim< codim >::Entity Entity;
46 typedef typename Traits::HostGrid HostGrid;
47 typedef typename HostGrid::template Codim< codim >::EntitySeed HostEntitySeed;
53 explicit EntitySeed (
const HostEntitySeed &hostEntitySeed )
54 : hostEntitySeed_( hostEntitySeed )
60 return hostEntitySeed_.isValid();
63 const HostEntitySeed &hostEntitySeed ()
const {
return hostEntitySeed_; }
66 HostEntitySeed hostEntitySeed_;
74 template<
int codim,
class Grd >
75 class EntitySeed< codim, Grd, true >
77 typedef typename std::remove_const< Grd >::type::Traits Traits;
80 static const int codimension = codim;
81 static const int dimension = Traits::dimension;
82 static const int mydimension = dimension - codimension;
83 static const int dimensionworld = Traits::dimensionworld;
85 static const bool fake =
true;
87 typedef typename Traits::Grid Grid;
88 typedef typename Traits::template Codim< codim >::Entity Entity;
90 typedef typename Traits::HostGrid HostGrid;
91 typedef typename HostGrid::template Codim< 0 >::EntitySeed HostElementSeed;
97 explicit EntitySeed (
const HostElementSeed &hostElementSeed,
unsigned int subEntity )
98 : hostElementSeed_( hostElementSeed ),
99 subEntity_( subEntity )
105 return hostElementSeed_.isValid();
108 const HostElementSeed &hostElementSeed ()
const {
return hostElementSeed_; }
109 unsigned int subEntity ()
const {
return subEntity_; }
112 HostElementSeed hostElementSeed_;
113 unsigned int subEntity_;
Interface class EntitySeed.
Traits for type conversions and type information.
Dune namespace.
Definition: alignedallocator.hh:13