1#ifndef DUNE_FEM_GRIDPART_GEOGRIDPART_ENTITY_HH
2#define DUNE_FEM_GRIDPART_GEOGRIDPART_ENTITY_HH
7#include <dune/grid/common/entity.hh>
8#include <dune/grid/common/gridenums.hh>
22 template<
int codim,
int dim,
class Gr
idFamily >
26 typedef typename std::remove_const< GridFamily >::type::Traits Traits;
30 static const int dimension = std::remove_const< GridFamily >::type::dimension;
32 static const int dimensionworld = std::remove_const< GridFamily >::type::dimensionworld;
34 typedef typename std::remove_const< GridFamily >::type::ctype
ctype;
36 typedef typename Traits::template Codim< codimension >::EntitySeed
EntitySeed;
37 typedef typename Traits::template Codim< codimension >::Geometry
Geometry;
40 typedef typename Traits::HostGridPartType HostGridPartType;
41 typedef typename Traits::CoordFunctionType CoordFunctionType;
43 typedef typename Geometry::Implementation GeometryImplType;
48 typedef typename HostGridPartType::template Codim< codimension >::EntityType
HostEntityType;
72 geo_ = GeometryImplType(
type(), coords );
86 assert( coordFunction_ );
87 return *coordFunction_;
98 const CoordFunctionType *coordFunction_ =
nullptr;
101 mutable GeometryImplType geo_;
109 template<
int dim,
class Gr
idFamily >
113 typedef typename std::remove_const< GridFamily >::type::Traits Traits;
117 static const int dimension = std::remove_const< GridFamily >::type::dimension;
119 static const int dimensionworld = std::remove_const< GridFamily >::type::dimensionworld;
121 typedef typename std::remove_const< GridFamily >::type::ctype
ctype;
123 typedef typename Traits::template Codim< codimension >::EntitySeed
EntitySeed;
124 typedef typename Traits::template Codim< codimension >::Geometry
Geometry;
125 typedef typename Traits::template Codim< codimension >::LocalGeometry
LocalGeometry;
132 typedef typename Traits::HostGridPartType HostGridPartType;
133 typedef typename Traits::CoordFunctionType CoordFunctionType;
135 typedef typename Geometry::Implementation GeometryImplType;
140 typedef typename HostGridPartType::template Codim< codimension >::EntityType
HostEntityType;
149 template<
class LocalFunction >
151 : coordFunction_( other.coordFunction_ ),
152 hostEntity_( other.hostEntity_ )
155 geo_ = GeometryImplType(
type(), coords );
173 geo_ = GeometryImplType(
type(), coords );
180 template<
int codim >
183 return hostEntity().template count< codim >();
188 template<
int codim >
189 typename Traits::template Codim< codim >::Entity
192 typedef typename Traits::template Codim< codim >::Entity::Implementation EntityImpl;
193 return EntityImpl( *coordFunction_,
hostEntity().
template subEntity< codim >( i ) );
198 return hostEntity().hasBoundaryIntersections();
208 assert( coordFunction_ );
209 return *coordFunction_;
223 const CoordFunctionType *coordFunction_ =
nullptr;
226 mutable GeometryImplType geo_;
Definition: bindguard.hh:11
interface for local functions
Definition: localfunction.hh:77
Definition: defaultgridpartentity.hh:22
Definition: cornerstorage.hh:145
Definition: cornerstorage.hh:189
Definition: geogridpart/entity.hh:25
Traits::template Codim< codimension >::Geometry Geometry
Definition: geogridpart/entity.hh:37
static const int codimension
Definition: geogridpart/entity.hh:29
static const int mydimension
Definition: geogridpart/entity.hh:31
GeoEntity(const CoordFunctionType &coordFunction, HostEntityType hostEntity)
Definition: geogridpart/entity.hh:52
static const int dimension
Definition: geogridpart/entity.hh:30
const HostEntityType & hostEntity() const
Definition: geogridpart/entity.hh:90
Traits::template Codim< codimension >::EntitySeed EntitySeed
Definition: geogridpart/entity.hh:36
static const int dimensionworld
Definition: geogridpart/entity.hh:32
bool equals(const GeoEntity &rhs) const
Definition: geogridpart/entity.hh:79
GeometryType type() const
Definition: geogridpart/entity.hh:57
const CoordFunctionType & coordFunction() const
Definition: geogridpart/entity.hh:84
std::remove_const< GridFamily >::type::ctype ctype
Definition: geogridpart/entity.hh:34
unsigned int subEntities(unsigned int cdim) const
Definition: geogridpart/entity.hh:95
PartitionType partitionType() const
Definition: geogridpart/entity.hh:62
EntitySeed seed() const
Definition: geogridpart/entity.hh:77
Geometry geometry() const
Definition: geogridpart/entity.hh:67
HostGridPartType::template Codim< codimension >::EntityType HostEntityType
Definition: geogridpart/entity.hh:48
Geometry geometry() const
Definition: geogridpart/entity.hh:168
void setHostEntity(const HostEntityType &hostEntity)
Definition: geogridpart/entity.hh:217
Traits::template Codim< codimension >::Geometry Geometry
Definition: geogridpart/entity.hh:124
const CoordFunctionType & coordFunction() const
Definition: geogridpart/entity.hh:206
EntitySeed seed() const
Definition: geogridpart/entity.hh:178
Traits::template Codim< codimension >::LocalGeometry LocalGeometry
Definition: geogridpart/entity.hh:125
int count() const
Definition: geogridpart/entity.hh:181
GeoEntity(const GeoEntity &other, const LocalFunction &localCoordFunction)
Definition: geogridpart/entity.hh:150
Traits::HierarchicIterator HierarchicIterator
Definition: geogridpart/entity.hh:127
GeometryType type() const
Definition: geogridpart/entity.hh:158
HostGridPartType::template Codim< codimension >::EntityType HostEntityType
Definition: geogridpart/entity.hh:140
Traits::template Codim< codim >::Entity subEntity(int i) const
Definition: geogridpart/entity.hh:190
bool hasBoundaryIntersections() const
Definition: geogridpart/entity.hh:196
unsigned int subEntities(unsigned int codim) const
Definition: geogridpart/entity.hh:186
GeoEntity(const CoordFunctionType &coordFunction, HostEntityType hostEntity)
Definition: geogridpart/entity.hh:144
std::remove_const< GridFamily >::type::ctype ctype
Definition: geogridpart/entity.hh:121
bool equals(const GeoEntity &rhs) const
Definition: geogridpart/entity.hh:201
Traits::template Codim< codimension >::EntitySeed EntitySeed
Definition: geogridpart/entity.hh:123
Traits::LeafIntersectionIterator LeafIntersectionIterator
Definition: geogridpart/entity.hh:128
PartitionType partitionType() const
Definition: geogridpart/entity.hh:163
Traits::LevelIntersectionIterator LevelIntersectionIterator
Definition: geogridpart/entity.hh:129
const HostEntityType & hostEntity() const
Definition: geogridpart/entity.hh:212