dune-grid 3.0-git
geometrygrid/entity.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_GEOGRID_ENTITY_HH
4#define DUNE_GEOGRID_ENTITY_HH
5
6#include <dune/geometry/referenceelements.hh>
7
11
12namespace Dune
13{
14
15 namespace GeoGrid
16 {
17
18 // Internal Forward Declarations
19 // -----------------------------
20
31 template< int codim, class Grid, bool fake = !(Capabilities::hasHostEntity< Grid, codim >::v) >
33
46 template< int codim, int dim, class Grid >
47 class Entity;
48
49
50
51 // External Forward Declarations
52 // -----------------------------
53
54 template< class Grid >
56
57 template< class Grid, class HostIntersectionIterator >
59
60
61
62 // EntityBase (real)
63 // -----------------
64
72 template< int codim, class Grid >
73 class EntityBase< codim, Grid, false >
74 {
75 typedef typename std::remove_const< Grid >::type::Traits Traits;
76
77 public:
82 static const int codimension = codim;
84 static const int dimension = Traits::dimension;
86 static const int mydimension = dimension - codimension;
88 static const int dimensionworld = Traits::dimensionworld;
89
91 static const bool fake = false;
92
99 typedef typename Traits::ctype ctype;
100
102 typedef typename Traits::template Codim< codimension >::Geometry Geometry;
105 private:
106 typedef typename Traits::HostGrid HostGrid;
107 typedef typename Traits::CoordFunction CoordFunction;
108
109 public:
114 typedef typename HostGrid::template Codim< codimension >::Entity HostEntity;
115
117 typedef typename Traits::template Codim< codimension >::EntitySeed EntitySeed;
118
120 typedef typename HostGrid::template Codim< 0 >::Entity HostElement;
123 typedef typename Traits::template Codim< codim >::GeometryImpl GeometryImpl;
124
125 private:
126 typedef typename HostGrid::template Codim< codimension >::Geometry HostGeometry;
127
129
130 public:
135 : hostEntity_()
136 , grid_( nullptr )
137 , geo_()
138 {}
139
140 EntityBase ( const Grid &grid, const EntitySeed &seed )
141 : hostEntity_( grid.hostGrid().entity( grid.getRealImplementation(seed).hostEntitySeed() ) )
142 , grid_( &grid )
143 {}
144
145 EntityBase ( const Grid &grid, const HostElement &hostElement, int i )
146 : hostEntity_( hostElement.template subEntity<codim>(i) )
147 , grid_( &grid )
148 {}
149
150
151 EntityBase ( const GeometryImpl &geo, const HostEntity &hostEntity )
152 : hostEntity_( hostEntity )
153 , grid_( &geo.grid() )
154 , geo_( geo )
155 {}
156
157 EntityBase ( const GeometryImpl &geo, HostEntity&& hostEntity )
158 : hostEntity_( std::move( hostEntity ) )
159 , grid_( &geo.grid() )
160 , geo_( geo )
161 {}
162
163 EntityBase ( const Grid &grid, const HostEntity& hostEntity )
164 : hostEntity_( hostEntity )
165 , grid_( &grid )
166 {}
167
168 EntityBase ( const Grid &grid, HostEntity&& hostEntity )
169 : hostEntity_( std::move( hostEntity ) )
170 , grid_( &grid )
171 {}
172
173
174 EntityBase ( const EntityBase &other )
175 : hostEntity_( other.hostEntity_ )
176 , grid_( other.grid_ )
177 , geo_( other.geo_ )
178 {}
179
181 : hostEntity_( std::move( other.hostEntity_ ) )
182 , grid_( other.grid_ )
183 , geo_( std::move( other.geo_ ) )
184 {}
185
188 const EntityBase &operator= ( const EntityBase &other )
189 {
190 hostEntity_ = other.hostEntity_;
191 grid_ = other.grid_;
192 geo_ = other.geo_;
193 return *this;
194 }
195
196 const EntityBase &operator= ( EntityBase&& other )
197 {
198 hostEntity_ = std::move( other.hostEntity_ );
199 grid_ = std::move( other.grid_ );
200 geo_ = std::move( other.geo_ );
201 return *this;
202 }
203
205 bool equals ( const EntityBase &other) const
206 {
207 return hostEntity_ == other.hostEntity_;
208 }
209
210 public:
218 GeometryType type () const
219 {
220 return hostEntity().type();
221 }
222
224 int level () const
225 {
226 return hostEntity().level();
227 }
228
231 {
232 return hostEntity().partitionType();
233 }
234
250 {
251 if( !geo_ )
252 {
253 CoordVector coords( hostEntity(), grid().coordFunction() );
254 geo_ = GeometryImpl( grid(), type(), coords );
255 }
256 return Geometry( geo_ );
257 }
258
260 EntitySeed seed () const { return typename EntitySeed::Implementation( hostEntity().seed() ); }
267 const Grid &grid () const { assert( grid_ ); return *grid_; }
268
269 const HostEntity &hostEntity () const
270 {
271 return hostEntity_;
272 }
273
279 void initialize ( const HostEntity &hostEntity ) { hostEntity_ = hostEntity; }
280
288 template< class HostIndexSet >
289 typename HostIndexSet::IndexType
290 index ( const HostIndexSet &indexSet ) const
291 {
292 return indexSet.template index< codimension >( hostEntity() );
293 }
294
304 template< class HostIndexSet >
305 typename HostIndexSet::IndexType
306 subIndex ( const HostIndexSet &indexSet, int i, unsigned int cd ) const
307 {
308 return indexSet.subIndex( hostEntity(), i, cd );
309 }
310
318 template< class HostIndexSet >
319 bool isContained ( const HostIndexSet &indexSet ) const
320 {
321 return indexSet.contains( hostEntity() );
322 }
323
331 template< class HostIdSet >
332 typename HostIdSet::IdType id ( const HostIdSet &idSet ) const
333 {
334 return idSet.template id< codimension >( hostEntity() );
335 }
338 private:
339 HostEntity hostEntity_;
340 const Grid *grid_;
341 mutable GeometryImpl geo_;
342 };
343
344
345
346 // EntityBase (fake)
347 // -----------------
348
356 template< int codim, class Grid >
357 class EntityBase< codim, Grid, true >
358 {
359 typedef typename std::remove_const< Grid >::type::Traits Traits;
360
361 public:
366 static const int codimension = codim;
368 static const int dimension = Traits::dimension;
370 static const int mydimension = dimension - codimension;
372 static const int dimensionworld = Traits::dimensionworld;
373
375 static const bool fake = true;
382 typedef typename Traits::ctype ctype;
383
385 typedef typename Traits::template Codim< codimension >::Geometry Geometry;
388 private:
389 typedef typename Traits::HostGrid HostGrid;
390 typedef typename Traits::CoordFunction CoordFunction;
391
392 public:
397 typedef typename HostGrid::template Codim< codimension >::Entity HostEntity;
398
400 typedef typename Traits::template Codim< codimension >::EntitySeed EntitySeed;
401
403 typedef typename HostGrid::template Codim< 0 >::Entity HostElement;
406 typedef typename Traits::template Codim< codimension >::GeometryImpl GeometryImpl;
407
408 private:
409 typedef typename HostGrid::template Codim< 0 >::Geometry HostGeometry;
410
412
413 public:
418 : hostElement_()
419 , subEntity_(-1)
420 , grid_(nullptr)
421 , geo_()
422 {}
423
424 EntityBase(const Grid& grid, const HostElement& hostElement, unsigned int subEntity)
425 : hostElement_(hostElement)
426 , subEntity_(subEntity)
427 , grid_(&grid)
428 {}
429
430 EntityBase ( const Grid &grid, const EntitySeed &seed )
431 : hostElement_( grid.hostGrid().entity( grid.getRealImplementation(seed).hostElementSeed() ) )
432 , subEntity_( grid.getRealImplementation(seed).subEntity() )
433 , grid_( &grid )
434 {}
435
436 EntityBase ( const EntityBase &other )
437 : hostElement_( other.hostElement_ )
438 , subEntity_( other.subEntity_ )
439 , grid_(other.grid_)
440 , geo_( other.geo_ )
441 {}
442
444 : hostElement_( std::move( other.hostElement_ ) )
445 , subEntity_( std::move( other.subEntity_ ) )
446 , grid_( std::move( other.grid_ ) )
447 , geo_( std::move( other.geo_ ) )
448 {}
449
450 /*
451 * This method is required by constructors in the `Entity` class
452 * below, however it cannot do anything useful for fake
453 * entities.
454 */
455 EntityBase(const Grid& grid, const HostEntity& hostEntity)
456 {
457 DUNE_THROW(Dune::Exception, "GeometryGrid: Cannot create fake entity of codim " << codimension << " from real host entity.");
458 }
459
462 const EntityBase &operator= ( const EntityBase &other )
463 {
464 hostElement_ = other.hostElement_;
465 subEntity_ = other.subEntity_;
466 grid_ = other.grid_;
467 geo_ = other.geo_;
468 return *this;
469 }
470
471 const EntityBase &operator= ( EntityBase&& other )
472 {
473 hostElement_ = std::move( other.hostElement_ );
474 subEntity_ = std::move( other.subEntity_ );
475 grid_ = std::move( other.grid_ );
476 geo_ = std::move( other.geo_ );
477 return *this;
478 }
479
481 bool equals ( const EntityBase &other) const
482 {
483 const bool thisEnd = (subEntity() < 0);
484 const bool otherEnd = (other.subEntity() < 0);
485 if( thisEnd || otherEnd )
486 return thisEnd && otherEnd;
487
488 const int lvl = level();
489 if( lvl != other.level() )
490 return false;
491
492 const typename Traits::HostGrid::Traits::LevelIndexSet &indexSet
493 = grid().hostGrid().levelIndexSet( lvl );
494
495 const HostElement &thisElement = hostElement();
496 assert( indexSet.contains( thisElement ) );
497 const HostElement &otherElement = other.hostElement();
498 assert( indexSet.contains( otherElement ) );
499
500 const int thisIndex = indexSet.subIndex( thisElement, subEntity(), codimension );
501 const int otherIndex = indexSet.subIndex( otherElement, other.subEntity(), codimension );
502 return (thisIndex == otherIndex);
503 }
504
512 GeometryType type () const
513 {
514 const ReferenceElement< ctype, dimension > &refElement
515 = ReferenceElements< ctype, dimension >::general( hostElement().type() );
516 return refElement.type( subEntity_, codimension );
517 }
518
520 int level () const
521 {
522 return hostElement().level();
523 }
524
527 {
528 const ReferenceElement< ctype, dimension > &refElement
529 = ReferenceElements< ctype, dimension >::general( hostElement().type() );
530
531 PartitionType type = vertexPartitionType( refElement, 0 );
532 if( (type != BorderEntity) && (type != FrontEntity) )
533 return type;
534
535 const int numVertices = refElement.size( subEntity_, codimension, dimension );
536 for( int i = 1; i < numVertices; ++i )
537 {
538 PartitionType vtxType = vertexPartitionType( refElement, i );
539 if( (vtxType != BorderEntity) && (vtxType != FrontEntity) )
540 return vtxType;
541 if( type != vtxType )
542 return OverlapEntity;
543 }
544 assert( (type == BorderEntity) || (type == FrontEntity) );
545 return type;
546 }
547
563 {
564 if( !geo_ )
565 {
566 CoordVector coords( hostElement(), subEntity_, grid().coordFunction() );
567 geo_ = GeometryImpl( grid(), type(), coords );
568 }
569 return Geometry( geo_ );
570 }
571
573 EntitySeed seed () const { return typename EntitySeed::Implementation( hostElement().seed(), subEntity_ ); }
579 const Grid &grid () const { assert( grid_ ); return *grid_; }
580
581 const HostEntity &hostEntity () const
582 {
583 DUNE_THROW( NotImplemented, "HostGrid has no entities of codimension " << codimension << "." );
584 }
585
586 const HostElement &hostElement () const
587 {
588 return hostElement_;
589 }
590
591 int subEntity () const { return subEntity_; }
592
600 void initialize ( const HostElement &hostElement ) { hostElement_ = hostElement; }
601
609 template< class HostIndexSet >
610 typename HostIndexSet::IndexType index ( const HostIndexSet &indexSet ) const
611 {
612 return indexSet.subIndex( hostElement(), subEntity_, codimension );
613 }
614
624 template< class HostIndexSet >
625 typename HostIndexSet::IndexType
626 subIndex ( const HostIndexSet &indexSet, int i, unsigned int cd ) const
627 {
628 const ReferenceElement< ctype, dimension > &refElement
629 = ReferenceElements< ctype, dimension >::general( hostElement().type() );
630 const int j = refElement.subEntity( subEntity_, codimension, i, codimension+cd );
631 return indexSet.subIndex( hostElement(), j, codimension+cd );
632 }
633
641 template< class HostIndexSet >
642 bool isContained ( const HostIndexSet &indexSet ) const
643 {
644 return indexSet.contains( hostElement() );
645 }
646
654 template< class HostIdSet >
655 typename HostIdSet::IdType id ( const HostIdSet &idSet ) const
656 {
657 return idSet.subId( hostElement(), subEntity_, codimension );
658 }
661 private:
663 vertexPartitionType ( const ReferenceElement< ctype, dimension > &refElement, int i ) const
664 {
665 const int j = refElement.subEntity( subEntity_, codimension, i, dimension );
666 return hostElement().template subEntity< dimension >( j ).partitionType();
667 }
668
669 private:
670 HostElement hostElement_;
671 unsigned int subEntity_;
672 const Grid *grid_;
673 mutable GeometryImpl geo_;
674 };
675
676
677
678 // Entity
679 // ------
680
681 template< int codim, int dim, class Grid >
682 class Entity
683 : public EntityBase< codim, Grid >
684 {
686
687 public:
688 typedef typename Base::HostEntity HostEntity;
689 typedef typename Base::HostElement HostElement;
690 typedef typename Base::GeometryImpl GeometryImpl;
691 typedef typename Base::EntitySeed EntitySeed;
692
693 Entity () : Base() {}
694
695 Entity ( const Grid &grid, const EntitySeed &seed ) : Base( grid, seed ) {}
696
697 Entity ( const Grid &grid, const HostEntity &hostEntity ) : Base( grid, hostEntity ) {}
698 Entity ( const Grid &grid, HostEntity&& hostEntity ) : Base( grid, std::move( hostEntity ) ) {}
699
700 Entity ( const Grid &grid, const HostElement &hostEntity, int i ) : Base( grid, hostEntity, i ) {}
701
702 };
703
704
705
706 // Entity for codimension 0
707 // ------------------------
708
709 template< int dim, class Grid >
710 class Entity< 0, dim, Grid >
711 : public EntityBase< 0, Grid >
712 {
714
715 typedef typename std::remove_const< Grid >::type::Traits Traits;
716
717 typedef typename Traits::HostGrid HostGrid;
718
719 public:
724 static const int codimension = Base::codimension;
726 static const int dimension = Base::dimension;
728 static const int mydimension = Base::mydimension;
730 static const int dimensionworld = Base::dimensionworld;
731
733 static const bool fake = Base::fake;
740 typedef typename Traits::template Codim< codimension >::LocalGeometry LocalGeometry;
741
743
745 typedef typename Traits::HierarchicIterator HierarchicIterator;
747 typedef typename Traits::LeafIntersectionIterator LeafIntersectionIterator;
749 typedef typename Traits::LevelIntersectionIterator LevelIntersectionIterator;
750
753 typedef typename Base::HostEntity HostEntity;
754 typedef typename Base::HostElement HostElement;
755 typedef typename Base::GeometryImpl GeometryImpl;
756 typedef typename Base::EntitySeed EntitySeed;
757
758 using Base::grid;
759 using Base::hostEntity;
760
761 Entity () : Base() {}
762
763 Entity ( const Grid &grid, const HostEntity &hostEntity ) : Base( grid, hostEntity ) {}
764 Entity ( const Grid &grid, HostEntity&& hostEntity ) : Base( grid, std::move( hostEntity ) ) {}
765 Entity ( const GeometryImpl &geo, const HostEntity& hostEntity ) : Base( geo, hostEntity ) {}
766 Entity ( const GeometryImpl &geo, HostEntity &&hostEntity ) : Base( geo, std::move( hostEntity ) ) {}
767
768 Entity ( const Grid &grid, const EntitySeed &seed ) : Base( grid, seed ) {}
769
770 Entity ( const Grid &grid, const HostEntity &hostEntity, int i ) : Base( grid, hostEntity )
771 {
772 assert( i == 0 );
773 }
774
775 template< int codim >
776 int count () const
777 {
778 return hostEntity().template count< codim >();
779 }
780
781 unsigned int subEntities (unsigned int codim) const
782 {
783 return hostEntity().subEntities(codim);
784 }
785
786 template< int codim >
787 typename Grid::template Codim< codim >::Entity
788 subEntity ( int i ) const
789 {
790 typedef typename Traits::template Codim< codim >::EntityImpl EntityImpl;
791 return EntityImpl( grid(), hostEntity(), i );
792 }
793
795 {
797 return LevelIntersectionIteratorImpl( *this, hostEntity().ilevelbegin() );
798 }
799
801 {
803 return LevelIntersectionIteratorImpl( *this, hostEntity().ilevelend() );
804 }
805
807 {
809 return LeafIntersectionIteratorImpl( *this, hostEntity().ileafbegin() );
810 }
811
813 {
815 return LeafIntersectionIteratorImpl( *this, hostEntity().ileafend() );
816 }
817
819 {
820 return hostEntity().hasBoundaryIntersections();
821 }
822
823 bool isLeaf () const
824 {
825 return hostEntity().isLeaf();
826 }
827
829 {
830 return Entity( grid(), hostEntity().father() );
831 }
832
833 bool hasFather () const
834 {
835 return hostEntity().hasFather();
836 }
837
839 {
840 return hostEntity().geometryInFather();
841 }
842
843 HierarchicIterator hbegin ( int maxLevel ) const
844 {
845 typedef GeoGrid::HierarchicIterator< Grid > HierarchicIteratorImpl;
846 return HierarchicIteratorImpl( grid(), hostEntity().hbegin( maxLevel ) );
847 }
848
849 HierarchicIterator hend ( int maxLevel ) const
850 {
851 typedef GeoGrid::HierarchicIterator< Grid > HierarchicIteratorImpl;
852 return HierarchicIteratorImpl( grid(), hostEntity().hend( maxLevel ) );
853 }
854
855 bool isRegular () const
856 {
857 return hostEntity().isRegular();
858 }
859
860 bool isNew () const
861 {
862 return hostEntity().isNew();
863 }
864
865 bool mightVanish () const
866 {
867 return hostEntity().mightVanish();
868 }
869 };
870
871 } // namespace GeoGrid
872
873} // namespace Dune
874
875#endif // #ifndef DUNE_GEOGRID_ENTITY_HH
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:28
@ FrontEntity
on boundary between overlap and ghost
Definition gridenums.hh:32
@ BorderEntity
on boundary between interior and overlap
Definition gridenums.hh:30
@ OverlapEntity
all entities lying in the overlap zone
Definition gridenums.hh:31
STL namespace.
Include standard header files.
Definition agrid.hh:60
Wrapper class for entities.
Definition common/entity.hh:62
EntitySeedImp Implementation
Export the implementation type.
Definition common/entityseed.hh:31
Grid abstract base class.
Definition common/grid.hh:373
Definition cornerstorage.hh:20
actual implementation of the entity
Definition geometrygrid/entity.hh:32
DUNE-conform implementation of the entity.
Definition geometrygrid/entity.hh:684
Entity(const Grid &grid, const EntitySeed &seed)
Definition geometrygrid/entity.hh:695
Entity(const Grid &grid, const HostEntity &hostEntity)
Definition geometrygrid/entity.hh:697
Entity(const Grid &grid, HostEntity &&hostEntity)
Definition geometrygrid/entity.hh:698
Base::HostEntity HostEntity
Definition geometrygrid/entity.hh:688
Base::HostElement HostElement
Definition geometrygrid/entity.hh:689
Entity()
Definition geometrygrid/entity.hh:693
Base::GeometryImpl GeometryImpl
Definition geometrygrid/entity.hh:690
Base::EntitySeed EntitySeed
Definition geometrygrid/entity.hh:691
Entity(const Grid &grid, const HostElement &hostEntity, int i)
Definition geometrygrid/entity.hh:700
Definition iterator.hh:394
Definition geometrygrid/intersectioniterator.hh:19
GeometryType type() const
obtain the name of the corresponding reference element
Definition geometrygrid/entity.hh:218
EntityBase(const Grid &grid, const HostElement &hostElement, int i)
Definition geometrygrid/entity.hh:145
bool equals(const EntityBase &other) const
compare two entities
Definition geometrygrid/entity.hh:205
EntityBase(const Grid &grid, HostEntity &&hostEntity)
Definition geometrygrid/entity.hh:168
EntityBase(EntityBase &&other)
Definition geometrygrid/entity.hh:180
EntityBase()
Definition geometrygrid/entity.hh:134
Traits::ctype ctype
coordinate type of the grid
Definition geometrygrid/entity.hh:99
const HostEntity & hostEntity() const
Definition geometrygrid/entity.hh:269
EntityBase(const GeometryImpl &geo, HostEntity &&hostEntity)
Definition geometrygrid/entity.hh:157
Geometry geometry() const
Definition geometrygrid/entity.hh:249
void initialize(const HostEntity &hostEntity)
initiliaze an entity
Definition geometrygrid/entity.hh:279
EntitySeed seed() const
return EntitySeed of host grid entity
Definition geometrygrid/entity.hh:260
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity's id from a host IdSet
Definition geometrygrid/entity.hh:332
Traits::template Codim< codim >::GeometryImpl GeometryImpl
Definition geometrygrid/entity.hh:123
EntityBase(const GeometryImpl &geo, const HostEntity &hostEntity)
Definition geometrygrid/entity.hh:151
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition geometrygrid/entity.hh:102
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition geometrygrid/entity.hh:114
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition geometrygrid/entity.hh:117
EntityBase(const EntityBase &other)
Definition geometrygrid/entity.hh:174
EntityBase(const Grid &grid, const HostEntity &hostEntity)
Definition geometrygrid/entity.hh:163
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity's index from a host IndexSet
Definition geometrygrid/entity.hh:290
const Grid & grid() const
Definition geometrygrid/entity.hh:267
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition geometrygrid/entity.hh:140
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition geometrygrid/entity.hh:120
PartitionType partitionType() const
obtain the partition type of this entity
Definition geometrygrid/entity.hh:230
int level() const
obtain the level of this entity
Definition geometrygrid/entity.hh:224
HostIndexSet::IndexType subIndex(const HostIndexSet &indexSet, int i, unsigned int cd) const
obtain the index of a subentity from a host IndexSet
Definition geometrygrid/entity.hh:306
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition geometrygrid/entity.hh:319
EntityBase(const EntityBase &other)
Definition geometrygrid/entity.hh:436
int level() const
obtain the level of this entity
Definition geometrygrid/entity.hh:520
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition geometrygrid/entity.hh:403
EntityBase(EntityBase &&other)
Definition geometrygrid/entity.hh:443
const HostEntity & hostEntity() const
Definition geometrygrid/entity.hh:581
PartitionType partitionType() const
obtain the partition type of this entity
Definition geometrygrid/entity.hh:526
bool equals(const EntityBase &other) const
compare two entities
Definition geometrygrid/entity.hh:481
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity's index from a host IndexSet
Definition geometrygrid/entity.hh:610
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition geometrygrid/entity.hh:400
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition geometrygrid/entity.hh:385
EntityBase(const Grid &grid, const HostElement &hostElement, unsigned int subEntity)
Definition geometrygrid/entity.hh:424
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity's id from a host IdSet
Definition geometrygrid/entity.hh:655
EntitySeed seed() const
return EntitySeed of host grid entity
Definition geometrygrid/entity.hh:573
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition geometrygrid/entity.hh:430
HostIndexSet::IndexType subIndex(const HostIndexSet &indexSet, int i, unsigned int cd) const
obtain the index of a subentity from a host IndexSet
Definition geometrygrid/entity.hh:626
Traits::template Codim< codimension >::GeometryImpl GeometryImpl
Definition geometrygrid/entity.hh:406
EntityBase(const Grid &grid, const HostEntity &hostEntity)
Definition geometrygrid/entity.hh:455
void initialize(const HostElement &hostElement)
initiliaze an entity
Definition geometrygrid/entity.hh:600
const HostElement & hostElement() const
Definition geometrygrid/entity.hh:586
Geometry geometry() const
Definition geometrygrid/entity.hh:562
const Grid & grid() const
Definition geometrygrid/entity.hh:579
EntityBase()
Definition geometrygrid/entity.hh:417
Traits::ctype ctype
coordinate type of the grid
Definition geometrygrid/entity.hh:382
int subEntity() const
Definition geometrygrid/entity.hh:591
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition geometrygrid/entity.hh:642
GeometryType type() const
obtain the name of the corresponding reference element
Definition geometrygrid/entity.hh:512
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition geometrygrid/entity.hh:397
Dune::Entity< 0, dim, Grid, Dune::GeoGrid::Entity > EntityFacade
Definition geometrygrid/entity.hh:742
bool hasBoundaryIntersections() const
Definition geometrygrid/entity.hh:818
LevelIntersectionIterator ilevelend() const
Definition geometrygrid/entity.hh:800
bool isLeaf() const
Definition geometrygrid/entity.hh:823
bool isRegular() const
Definition geometrygrid/entity.hh:855
HierarchicIterator hbegin(int maxLevel) const
Definition geometrygrid/entity.hh:843
HierarchicIterator hend(int maxLevel) const
Definition geometrygrid/entity.hh:849
Entity(const GeometryImpl &geo, HostEntity &&hostEntity)
Definition geometrygrid/entity.hh:766
Traits::HierarchicIterator HierarchicIterator
type of hierarchic iterator
Definition geometrygrid/entity.hh:745
Entity(const Grid &grid, const HostEntity &hostEntity, int i)
Definition geometrygrid/entity.hh:770
Entity(const Grid &grid, const EntitySeed &seed)
Definition geometrygrid/entity.hh:768
bool hasFather() const
Definition geometrygrid/entity.hh:833
Traits::LeafIntersectionIterator LeafIntersectionIterator
type of leaf intersection iterator
Definition geometrygrid/entity.hh:747
Grid::template Codim< codim >::Entity subEntity(int i) const
Definition geometrygrid/entity.hh:788
Entity(const Grid &grid, const HostEntity &hostEntity)
Definition geometrygrid/entity.hh:763
Traits::LevelIntersectionIterator LevelIntersectionIterator
type of level intersection iterator
Definition geometrygrid/entity.hh:749
Entity()
Definition geometrygrid/entity.hh:761
LeafIntersectionIterator ileafend() const
Definition geometrygrid/entity.hh:812
Entity(const GeometryImpl &geo, const HostEntity &hostEntity)
Definition geometrygrid/entity.hh:765
Base::HostEntity HostEntity
Definition geometrygrid/entity.hh:753
int count() const
Definition geometrygrid/entity.hh:776
LeafIntersectionIterator ileafbegin() const
Definition geometrygrid/entity.hh:806
bool isNew() const
Definition geometrygrid/entity.hh:860
LevelIntersectionIterator ilevelbegin() const
Definition geometrygrid/entity.hh:794
Base::EntitySeed EntitySeed
Definition geometrygrid/entity.hh:756
Base::HostElement HostElement
Definition geometrygrid/entity.hh:754
unsigned int subEntities(unsigned int codim) const
Definition geometrygrid/entity.hh:781
bool mightVanish() const
Definition geometrygrid/entity.hh:865
LocalGeometry geometryInFather() const
Definition geometrygrid/entity.hh:838
Entity(const Grid &grid, HostEntity &&hostEntity)
Definition geometrygrid/entity.hh:764
Traits::template Codim< codimension >::LocalGeometry LocalGeometry
type of corresponding local geometry
Definition geometrygrid/entity.hh:740
EntityFacade father() const
Definition geometrygrid/entity.hh:828
Base::GeometryImpl GeometryImpl
Definition geometrygrid/entity.hh:755
Different resources needed by all grid implementations.