5 #ifndef DUNE_GRID_COMMON_ENTITY_HH 6 #define DUNE_GRID_COMMON_ENTITY_HH 10 #include <dune/common/iteratorrange.hh> 11 #include <dune/common/typetraits.hh> 13 #include <dune/geometry/dimension.hh> 14 #include <dune/geometry/referenceelements.hh> 64 template<
int cd,
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
239 template<
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
401 template<
int codim >
405 return realEntity.template subEntity< codim >( i );
540 template<
int cd,
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
569 typedef typename std::remove_const< GridImp >::type::ctype ctype;
570 return ReferenceElements< ctype, mydimension >::general( asImp().
type() ).size( codim -
codimension );
580 EntityImp<cd,dim,GridImp>& asImp ()
582 return static_cast<EntityImp<cd,dim,GridImp>&
>(*this);
584 const EntityImp<cd,dim,GridImp>& asImp ()
const 586 return static_cast<const EntityImp<cd,dim,GridImp>&
>(*this);
601 template<
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
635 typedef typename std::remove_const< GridImp >::type::ctype ctype;
636 return ReferenceElements< ctype, mydimension >::general( asImp().
type() ).size( codim -
codimension );
646 bool isNew ()
const {
return false; }
669 EntityImp<0,dim,GridImp>& asImp () {
return static_cast<EntityImp<0,dim,GridImp>&
>(*this); }
670 const EntityImp<0,dim,GridImp>& asImp ()
const {
return static_cast<const EntityImp<0,dim,GridImp>&
>(*this); }
686 template<
int cd,
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp >
688 -> decltype(
referenceElement<
typename GridImp::ctype,GridImp::template Codim<cd>::Geometry::mydimension>(entity.type()))
691 return referenceElement< typename Geo::ctype, Geo::mydimension >(entity.type());
695 #endif // DUNE_GRID_COMMON_ENTITY_HH unsigned int subEntities(unsigned int codim) const
Number of subentities for a given codimension.
Definition: common/entity.hh:159
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:30
concept Entity
Model of a grid entity.
Definition: concepts/entity.hh:119
concept IntersectionIterator
Model of an intersection iterator.
Definition: concepts/intersectioniterator.hh:21
static constexpr int mydimension
Know dimension of the entity.
Definition: common/entity.hh:551
static constexpr int dimension
Dimension of the grid.
Definition: common/entity.hh:548
bool hasFather() const
Return true if entity has a father entity which can be accessed using the father() method...
Definition: common/entity.hh:426
bool operator==(const Entity &other) const
Compares two entities for equality.
Definition: common/entity.hh:345
Geometry geometry() const
obtain geometric realization of the entity
Definition: common/entity.hh:141
bool operator!=(const Entity &other) const
Compares two entities for inequality.
Definition: common/entity.hh:351
Entity(const EntityImp< 0, dim, GridImp > &e)
Copy constructor from EntityImp.
Definition: common/entity.hh:519
static constexpr int mydimension
Dimensionality of the reference element of the entity.
Definition: common/entity.hh:112
GridImp::template Codim< 0 >::Geometry Geometry
The geometry type of this entity.
Definition: common/entity.hh:268
GridImp::template Codim< cd >::Entity Entity
Definition: common/entity.hh:286
Implementation realEntity
Definition: common/entity.hh:89
Entity & operator=(const Entity &other)
Copy assignment operator from an existing entity.
Definition: common/entity.hh:370
Entity(EntityImp< 0, dim, GridImp > &&e)
Move constructor from EntityImp.
Definition: common/entity.hh:522
Implementation & impl()
access to the underlying implementation
Definition: common/entity.hh:80
Codim< codim >::Entity subEntity(int i) const
Obtain a subentity.
Definition: common/entity.hh:403
int level() const
The level of this entity.
Definition: common/entity.hh:124
static constexpr int dimension
Know the grid dimension.
Definition: common/entity.hh:109
unsigned int subEntities(unsigned int codim) const
Number of subentities for a given codimension.
Definition: common/entity.hh:567
const Implementation & impl() const
Return const reference to the real implementation.
Definition: common/entity.hh:254
static constexpr int codimension
know your own codimension
Definition: common/entity.hh:545
bool hasBoundaryIntersections() const
Returns true, if entity has intersections with boundary.
Definition: common/entity.hh:509
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition: common/entity.hh:342
LocalGeometry geometryInFather() const
Provides information how this element has been subdivided from its father element.
Definition: common/entity.hh:467
Entity(EntityImp< cd, dim, GridImp > &&e)
Move constructor from EntityImp.
Definition: common/entity.hh:220
PartitionType partitionType() const
Partition type of this entity.
Definition: common/entity.hh:127
bool operator!=(const Entity &other) const
Compares two entities for inequality.
Definition: common/entity.hh:176
bool mightVanish() const
Returns true, if entity might disappear during the next call to adapt(). If the method returns false...
Definition: common/entity.hh:505
HierarchicIterator hbegin(int maxLevel) const
Inter-level access to elements that resulted from (recursive) subdivision of this element...
Definition: common/entity.hh:480
GridImp::template Codim< cd >::Geometry Geometry
The corresponding geometry type.
Definition: common/entity.hh:100
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition: common/entity.hh:167
concept Geometry
Model of a geometry object.
Definition: concepts/geometry.hh:29
Entity()
Definition: common/entity.hh:181
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
The geometry type of this entity when the geometry is expressed embedded in the father element...
Definition: common/entity.hh:280
Different resources needed by all grid implementations.
Entity & operator=(const Entity &other)
Copy assignment operator from an existing entity.
Definition: common/entity.hh:195
EntityImp< cd, dim, GridImp > Implementation
type of underlying implementation
Definition: common/entity.hh:73
EntityImp< 0, dim, GridImp > Implementation
Type of underlying implementation.
Definition: common/entity.hh:249
Entity(const Entity &other)
Copy constructor from an existing entity.
Definition: common/entity.hh:185
bool isNew() const
Returns true, if the entity has been created during the last call to adapt()
Definition: common/entity.hh:499
Entity & operator=(Entity &&other)
Move assignment operator from an existing entity.
Definition: common/entity.hh:377
Entity(const EntityImp< cd, dim, GridImp > &e)
Copy constructor from EntityImp.
Definition: common/entity.hh:217
bool isRegular() const
Returns true if element is of regular type in red/green type refinement. In bisection or hanging node...
Definition: common/entity.hh:620
int level() const
The level of this entity.
Definition: common/entity.hh:310
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:271
const Implementation & impl() const
access to the underlying implementation
Definition: common/entity.hh:86
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:615
bool hasBoundaryIntersections() const
Returns true, if entity has intersections with boundary, this implementation uses the Level- and Leaf...
Definition: common/entity.hh:656
bool isLeaf() const
Returns true if the entity is contained in the leaf grid.
Definition: common/entity.hh:432
unsigned int subEntities(unsigned int codim) const
Number of subentities for a given codimension.
Definition: common/entity.hh:633
Entity()
Definition: common/entity.hh:356
Entity(const Entity &other)
Copy constructor from an existing entity.
Definition: common/entity.hh:360
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition: common/geometry.hh:558
unsigned int subEntities(unsigned int codim) const
Number of subentities for a given codimension.
Definition: common/entity.hh:329
Entity & operator=(Entity &&other)
Move assignment operator from an existing entity.
Definition: common/entity.hh:202
Include standard header files.
Definition: agrid.hh:59
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:576
bool isRegular() const
Returns true if element is of regular type in red/green type refinement. In bisection or hanging node...
Definition: common/entity.hh:440
static constexpr int codimension
Know your own codimension.
Definition: common/entity.hh:106
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:337
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:347
HierarchicIterator hend(int maxLevel) const
Returns iterator to one past the last son element.
Definition: common/entity.hh:492
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:146
Geometry geometry() const
obtain geometric realization of the entity
Definition: common/entity.hh:316
GridImp::template Codim< cd >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:103
bool mightVanish() const
Returns true, if entity might disappear during the next call to adapt()
Definition: common/entity.hh:650
Entity father() const
Inter-level access to father entity on the next-coarser grid. The given entity resulted directly from...
Definition: common/entity.hh:418
auto referenceElement(const Entity< cd, dim, GridImp, EntityImp > &entity) -> decltype(referenceElement< typename GridImp::ctype, GridImp::template Codim< cd >::Geometry::mydimension >(entity.type()))
Second-level dispatch to select the correct reference element for a grid entity.
Definition: common/entity.hh:687
Entity(Entity &&other)
Move constructor from an existing entity.
Definition: common/entity.hh:190
GridImp::HierarchicIterator HierarchicIterator
The HierarchicIterator type.
Definition: common/entity.hh:290
Default Implementations for EntityImp.
Definition: common/entity.hh:541
bool isNew() const
Returns true, if the entity has been created during the last call to adapt()
Definition: common/entity.hh:646
Wrapper class for entities.
Definition: common/entity.hh:65
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
Entity(Entity &&other)
Move constructor from an existing entity.
Definition: common/entity.hh:365
Implementation realEntity
Definition: common/entity.hh:257
bool operator==(const Entity &other) const
Compares two entities for equality.
Definition: common/entity.hh:170
PartitionType partitionType() const
Partition type of this entity.
Definition: common/entity.hh:313
GridImp::template Codim< cd >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:554
concept EntitySeed
Model of an entity seed.
Definition: concepts/entity.hh:25
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:642
Implementation & impl()
Return reference to the real implementation.
Definition: common/entity.hh:252