5#ifndef DUNE_GEOGRID_ENTITYSEED_HH
6#define DUNE_GEOGRID_ENTITYSEED_HH
8#include <dune/common/typetraits.hh>
22 template<
int codim,
class Gr
id,
bool fake = !(Capabilities::hasHostEntity< Gr
id, codim >::v) >
30 template<
int codim,
class Grd >
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;
47 typedef typename HostGrid::template Codim< codim >::EntitySeed
HostEntitySeed;
54 : hostEntitySeed_( hostEntitySeed )
60 return hostEntitySeed_.isValid();
66 HostEntitySeed hostEntitySeed_;
74 template<
int codim,
class Grd >
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;
98 : hostElementSeed_( hostElementSeed ),
99 subEntity_( subEntity )
105 return hostElementSeed_.isValid();
112 HostElementSeed hostElementSeed_;
113 unsigned int subEntity_;
Include standard header files.
Definition: agrid.hh:60
Definition: geometrygrid/entityseed.hh:23
Traits::template Codim< codim >::Entity Entity
Definition: geometrygrid/entityseed.hh:44
EntitySeed(const HostEntitySeed &hostEntitySeed)
Definition: geometrygrid/entityseed.hh:53
Traits::Grid Grid
Definition: geometrygrid/entityseed.hh:43
HostGrid::template Codim< codim >::EntitySeed HostEntitySeed
Definition: geometrygrid/entityseed.hh:47
EntitySeed()
default construct an invalid entity seed
Definition: geometrygrid/entityseed.hh:50
Traits::HostGrid HostGrid
Definition: geometrygrid/entityseed.hh:46
bool isValid() const
check whether the EntitySeed refers to a valid Entity
Definition: geometrygrid/entityseed.hh:58
const HostEntitySeed & hostEntitySeed() const
Definition: geometrygrid/entityseed.hh:63
HostGrid::template Codim< 0 >::EntitySeed HostElementSeed
Definition: geometrygrid/entityseed.hh:91
EntitySeed()
default construct an invalid entity seed
Definition: geometrygrid/entityseed.hh:94
const HostElementSeed & hostElementSeed() const
Definition: geometrygrid/entityseed.hh:108
Traits::template Codim< codim >::Entity Entity
Definition: geometrygrid/entityseed.hh:88
unsigned int subEntity() const
Definition: geometrygrid/entityseed.hh:109
Traits::HostGrid HostGrid
Definition: geometrygrid/entityseed.hh:90
bool isValid() const
check whether the EntitySeed refers to a valid Entity
Definition: geometrygrid/entityseed.hh:103
EntitySeed(const HostElementSeed &hostElementSeed, unsigned int subEntity)
Definition: geometrygrid/entityseed.hh:97
Traits::Grid Grid
Definition: geometrygrid/entityseed.hh:87
Interface class EntitySeed.