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> 23 template<
int codim,
int dim,
class Gr
idFamily >
27 typedef typename std::remove_const< GridFamily >::type::Traits
Traits;
31 static const int dimension = std::remove_const< GridFamily >::type::dimension;
33 static const int dimensionworld = std::remove_const< GridFamily >::type::dimensionworld;
35 typedef typename std::remove_const< GridFamily >::type::ctype
ctype;
37 typedef typename Traits::template Codim< codimension >::EntitySeed
EntitySeed;
38 typedef typename Traits::template Codim< codimension >::Geometry
Geometry;
41 typedef typename Traits::HostGridPartType HostGridPartType;
42 typedef typename Traits::CoordFunctionType CoordFunctionType;
44 typedef typename Geometry::Implementation GeometryImplType;
49 typedef typename HostGridPartType::template Codim< codimension >::EntityType
HostEntityType;
54 : coordFunction_( &coordFunction ),
55 hostEntity_(
std::
move( hostEntity ) )
73 geo_ = GeometryImplType(
type(), coords );
87 assert( coordFunction_ );
88 return *coordFunction_;
97 const CoordFunctionType *coordFunction_ =
nullptr;
98 HostEntityType hostEntity_;
100 mutable GeometryImplType geo_;
108 template<
int dim,
class Gr
idFamily >
112 typedef typename std::remove_const< GridFamily >::type::Traits
Traits;
116 static const int dimension = std::remove_const< GridFamily >::type::dimension;
118 static const int dimensionworld = std::remove_const< GridFamily >::type::dimensionworld;
120 typedef typename std::remove_const< GridFamily >::type::ctype
ctype;
122 typedef typename Traits::template Codim< codimension >::EntitySeed
EntitySeed;
123 typedef typename Traits::template Codim< codimension >::Geometry
Geometry;
124 typedef typename Traits::template Codim< codimension >::LocalGeometry
LocalGeometry;
131 typedef typename Traits::HostGridPartType HostGridPartType;
132 typedef typename Traits::CoordFunctionType CoordFunctionType;
134 typedef typename Geometry::Implementation GeometryImplType;
139 typedef typename HostGridPartType::template Codim< codimension >::EntityType
HostEntityType;
144 : coordFunction_( &coordFunction ),
145 hostEntity_(
std::
move( hostEntity ) )
148 template<
class LocalFunction >
150 : coordFunction_( other.coordFunction_ ),
151 hostEntity_( other.hostEntity_ )
154 geo_ = GeometryImplType(
type(), coords );
172 geo_ = GeometryImplType(
type(), coords );
179 template<
int codim >
182 return hostEntity().template count< codim >();
187 template<
int codim >
188 typename Traits::template Codim< codim >::Entity
191 typedef typename Traits::template Codim< codim >::Entity::Implementation EntityImpl;
197 return hostEntity().hasBoundaryIntersections();
207 assert( coordFunction_ );
208 return *coordFunction_;
222 const CoordFunctionType *coordFunction_ =
nullptr;
223 HostEntityType hostEntity_;
225 mutable GeometryImplType geo_;
232 #endif // #ifndef DUNE_FEM_GRIDPART_GEOGRIDPART_ENTITY_HH HostGridPartType::template Codim< codimension >::EntityType HostEntityType
Definition: geogridpart/entity.hh:139
int count() const
Definition: geogridpart/entity.hh:180
unsigned int subEntities(unsigned int codim) const
Definition: geogridpart/entity.hh:185
static const int mydimension
Definition: geogridpart/entity.hh:32
PartitionType partitionType() const
Definition: geogridpart/entity.hh:162
GeometryType type() const
Definition: geogridpart/entity.hh:157
Definition: cornerstorage.hh:147
Traits::LevelIntersectionIterator LevelIntersectionIterator
Definition: geogridpart/entity.hh:128
Geometry geometry() const
Definition: geogridpart/entity.hh:68
const CoordFunctionType & coordFunction() const
Definition: geogridpart/entity.hh:205
const HostEntityType & hostEntity() const
Definition: geogridpart/entity.hh:211
GeoEntity(const CoordFunctionType &coordFunction, HostEntityType hostEntity)
Definition: geogridpart/entity.hh:53
const CoordFunctionType & coordFunction() const
Definition: geogridpart/entity.hh:85
const HostEntityType & hostEntity() const
Definition: geogridpart/entity.hh:91
GeometryType type() const
Definition: geogridpart/entity.hh:58
static const int codimension
Definition: geogridpart/entity.hh:30
Traits::template Codim< codimension >::Geometry Geometry
Definition: geogridpart/entity.hh:123
Traits::template Codim< codim >::Entity subEntity(int i) const
Definition: geogridpart/entity.hh:189
interface for local functions
Definition: localfunction.hh:41
Traits::template Codim< codimension >::Geometry Geometry
Definition: geogridpart/entity.hh:38
bool hasBoundaryIntersections() const
Definition: geogridpart/entity.hh:195
bool equals(const GeoEntity &rhs) const
Definition: geogridpart/entity.hh:80
Traits::template Codim< codimension >::EntitySeed EntitySeed
Definition: geogridpart/entity.hh:37
Dune::EntityPointer< Grid, Implementation >::Entity make_entity(const Dune::EntityPointer< Grid, Implementation > &entityPointer)
Definition: compatibility.hh:23
HostGridPartType::template Codim< codimension >::EntityType HostEntityType
Definition: geogridpart/entity.hh:49
Traits::template Codim< codimension >::LocalGeometry LocalGeometry
Definition: geogridpart/entity.hh:124
Traits::template Codim< codimension >::EntitySeed EntitySeed
Definition: geogridpart/entity.hh:122
std::remove_const< GridFamily >::type::ctype ctype
Definition: geogridpart/entity.hh:120
Definition: coordinate.hh:4
GeoEntity(const CoordFunctionType &coordFunction, HostEntityType hostEntity)
Definition: geogridpart/entity.hh:143
Traits::LeafIntersectionIterator LeafIntersectionIterator
Definition: geogridpart/entity.hh:127
bool equals(const GeoEntity &rhs) const
Definition: geogridpart/entity.hh:200
std::remove_const< GridFamily >::type::ctype ctype
Definition: geogridpart/entity.hh:35
static const int dimension
Definition: geogridpart/entity.hh:31
Geometry geometry() const
Definition: geogridpart/entity.hh:167
std::remove_const< GridFamily >::type::Traits Traits
Definition: defaultgridpartentity.hh:46
std::remove_const< GridFamily >::type::Traits Traits
Definition: defaultgridpartentity.hh:24
static const int dimensionworld
Definition: geogridpart/entity.hh:33
Definition: geogridpart/entity.hh:24
void move(ArrayInterface< T > &array, const unsigned int oldOffset, const unsigned int newOffset, const unsigned int length)
Definition: array_inline.hh:38
void setHostEntity(const HostEntityType &hostEntity)
Definition: geogridpart/entity.hh:216
EntitySeed seed() const
Definition: geogridpart/entity.hh:177
Definition: defaultgridpartentity.hh:21
PartitionType partitionType() const
Definition: geogridpart/entity.hh:63
EntitySeed seed() const
Definition: geogridpart/entity.hh:78
Definition: cornerstorage.hh:191
GeoEntity(const GeoEntity &other, const LocalFunction &localCoordFunction)
Definition: geogridpart/entity.hh:149
Traits::HierarchicIterator HierarchicIterator
Definition: geogridpart/entity.hh:126