5#ifndef DUNE_IDENTITYGRIDENTITY_HH
6#define DUNE_IDENTITYGRIDENTITY_HH
19 template<
int codim,
int dim,
class Gr
idImp>
20 class IdentityGridEntity;
22 template<
int codim, PartitionIteratorType pitype,
class Gr
idImp>
23 class IdentityGridLevelIterator;
25 template<
class Gr
idImp>
26 class IdentityGridLevelIntersectionIterator;
28 template<
class Gr
idImp>
29 class IdentityGridLeafIntersectionIterator;
31 template<
class Gr
idImp>
32 class IdentityGridHierarchicIterator;
36 template<
class Gr
id >
37 struct HostGridAccess;
52 template<
int codim,
int dim,
class Gr
idImp>
57 template <
class Gr
idImp_>
60 template <
class Gr
idImp_>
63 template <
class Gr
idImp_>
66 template <
class Gr
idImp_>
74 typedef typename GridImp::ctype ctype;
77 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension + codim;
80 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity HostGridEntity;
91 : identityGrid_(nullptr)
96 , identityGrid_(identityGrid)
101 , identityGrid_(identityGrid)
107 , identityGrid_(original.identityGrid_)
112 , identityGrid_(original.identityGrid_)
118 if (
this != &original)
120 identityGrid_ = original.identityGrid_;
129 if (
this != &original)
131 identityGrid_ = original.identityGrid_;
183 const GridImp* identityGrid_;
202 template<
int dim,
class Gr
idImp>
211 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension;
214 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity
HostGridEntity;
235 : identityGrid_(nullptr)
240 , identityGrid_(identityGrid)
245 , identityGrid_(identityGrid)
251 , identityGrid_(original.identityGrid_)
256 , identityGrid_(original.identityGrid_)
262 if (
this != &original)
264 identityGrid_ = original.identityGrid_;
273 if (
this != &original)
275 identityGrid_ = original.identityGrid_;
329 typename GridImp::template Codim<cc>::Entity
subEntity (
int i)
const {
354 identityGrid_->getHostGrid().leafGridView().ibegin(
hostEntity_));
362 identityGrid_->getHostGrid().leafGridView().iend(
hostEntity_));
374 typename GridImp::template Codim<0>::Entity
father ()
const {
414 if (identityGrid_->adaptationStep!=GridImp::adaptDone)
418 int index = identityGrid_->levelIndexSet(
level).index(*
this);
419 return identityGrid_->refinementMark_[
level][index];
440 typedef typename GridImp::ctype ctype;
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:30
Include standard header files.
Definition: agrid.hh:60
Default Implementations for EntityImp.
Definition: common/entity.hh:542
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
provides access to host grid objects from GeometryGrid
Definition: identitygrid.hh:37
The implementation of entities in a IdentityGrid.
Definition: identitygridentity.hh:55
IdentityGridEntity()
Definition: identitygridentity.hh:90
IdentityGridEntity & operator=(IdentityGridEntity &&original)
Definition: identitygridentity.hh:127
IdentityGridEntity(IdentityGridEntity &&original)
Definition: identitygridentity.hh:110
bool equals(const IdentityGridEntity &other) const
Definition: identitygridentity.hh:137
HostGridEntity hostEntity_
Definition: identitygridentity.hh:179
GridImp::template Codim< codim >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition: identitygridentity.hh:88
EntitySeed seed() const
Create EntitySeed.
Definition: identitygridentity.hh:148
IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
Definition: identitygridentity.hh:94
Geometry geometry() const
geometry of this entity
Definition: identitygridentity.hh:173
PartitionType partitionType() const
The partition type for parallel computing.
Definition: identitygridentity.hh:161
unsigned int subEntities(unsigned int cc) const
Return the number of subEntities of codimension codim.
Definition: identitygridentity.hh:167
IdentityGridEntity(const IdentityGridEntity &original)
Definition: identitygridentity.hh:105
IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
Definition: identitygridentity.hh:99
bool hasFather() const
returns true if father entity exists
Definition: identitygridentity.hh:143
GridImp::template Codim< codim >::Geometry Geometry
Definition: identitygridentity.hh:85
IdentityGridEntity & operator=(const IdentityGridEntity &original)
Definition: identitygridentity.hh:116
int level() const
level of this element
Definition: identitygridentity.hh:154
Definition: identitygridintersectioniterator.hh:84
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition: identitygridintersectioniterator.hh:29
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition: identitygridhierarchiciterator.hh:26
unsigned int subEntities(unsigned int codim) const
Return the number of subEntities of codimension codim.
Definition: identitygridentity.hh:319
IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
Definition: identitygridentity.hh:243
bool isLeaf() const
returns true if Entity has NO children
Definition: identitygridentity.hh:367
IdentityGridHierarchicIterator< GridImp > hbegin(int maxLevel) const
Inter-level access to son elements on higher levels<=maxlevel. This is provided for sparsely stored n...
Definition: identitygridentity.hh:398
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
Definition: identitygridentity.hh:218
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition: identitygridentity.hh:230
EntitySeed seed() const
Create EntitySeed.
Definition: identitygridentity.hh:292
IdentityGridLevelIntersectionIterator< GridImp > ilevelbegin() const
First level intersection.
Definition: identitygridentity.hh:335
IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
Definition: identitygridentity.hh:238
int level() const
Level of this element.
Definition: identitygridentity.hh:298
IdentityGridLeafIntersectionIterator< GridImp > ileafbegin() const
First leaf intersection.
Definition: identitygridentity.hh:351
HostGridEntity hostEntity_
Definition: identitygridentity.hh:435
IdentityGridEntity & operator=(const IdentityGridEntity &original)
Definition: identitygridentity.hh:260
Geometry geometry() const
Geometry of this entity.
Definition: identitygridentity.hh:311
IdentityGridLevelIntersectionIterator< GridImp > ilevelend() const
Reference to one past the last neighbor.
Definition: identitygridentity.hh:343
IdentityGridEntity(const IdentityGridEntity &original)
Definition: identitygridentity.hh:249
IdentityGridHierarchicIterator< GridImp > hend(int maxLevel) const
Returns iterator to one past the last son.
Definition: identitygridentity.hh:405
IdentityGridLeafIntersectionIterator< GridImp > ileafend() const
Reference to one past the last leaf intersection.
Definition: identitygridentity.hh:359
bool wasRefined() const
Definition: identitygridentity.hh:412
IdentityGridEntity & operator=(IdentityGridEntity &&original)
Definition: identitygridentity.hh:271
bool hasFather() const
returns true if father entity exists
Definition: identitygridentity.hh:287
GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Entity HostGridEntity
Definition: identitygridentity.hh:214
GridImp::template Codim< 0 >::Entity father() const
Definition: identitygridentity.hh:374
bool mightBeCoarsened() const
Definition: identitygridentity.hh:424
LocalGeometry geometryInFather() const
Location of this element relative to the reference element element of the father. This is sufficient ...
Definition: identitygridentity.hh:388
const GridImp * identityGrid_
Definition: identitygridentity.hh:436
GridImp::template Codim< cc >::Entity subEntity(int i) const
Provide access to sub entity i of given codimension. Entities are numbered 0 ... subEntities(cc)-1.
Definition: identitygridentity.hh:329
IdentityGridEntity(IdentityGridEntity &&original)
Definition: identitygridentity.hh:254
GridImp::template Codim< 0 >::Geometry Geometry
Definition: identitygridentity.hh:216
bool equals(const IdentityGridEntity &other) const
Definition: identitygridentity.hh:281
PartitionType partitionType() const
The partition type for parallel computing.
Definition: identitygridentity.hh:305
Definition: identitygridindexsets.hh:26
Definition: identitygridindexsets.hh:103
Definition: identitygridindexsets.hh:199
Definition: identitygridindexsets.hh:251
Different resources needed by all grid implementations.