dune-grid  2.6-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 
12 namespace 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) >
32  class EntityBase;
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:
81  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 
98  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:
113  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 
180  EntityBase ( EntityBase&& other )
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:
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 
249  Geometry geometry () const
250  {
251  if( !geo_ )
252  {
253  CoordVector coords( hostEntity(), grid().coordFunction() );
254  geo_ = GeometryImpl( grid(), type(), coords );
255  }
256  return Geometry( geo_ );
257  }
258 
259  unsigned int subEntities ( unsigned int cc ) const
260  {
261  return hostEntity().subEntities( cc );
262  }
263 
265  EntitySeed seed () const { return typename EntitySeed::Implementation( hostEntity().seed() ); }
272  const Grid &grid () const { assert( grid_ ); return *grid_; }
273 
274  const HostEntity &hostEntity () const
275  {
276  return hostEntity_;
277  }
278 
284  void initialize ( const HostEntity &hostEntity ) { hostEntity_ = hostEntity; }
285 
293  template< class HostIndexSet >
294  typename HostIndexSet::IndexType
295  index ( const HostIndexSet &indexSet ) const
296  {
297  return indexSet.template index< codimension >( hostEntity() );
298  }
299 
309  template< class HostIndexSet >
310  typename HostIndexSet::IndexType
311  subIndex ( const HostIndexSet &indexSet, int i, unsigned int cd ) const
312  {
313  return indexSet.subIndex( hostEntity(), i, cd );
314  }
315 
323  template< class HostIndexSet >
324  bool isContained ( const HostIndexSet &indexSet ) const
325  {
326  return indexSet.contains( hostEntity() );
327  }
328 
336  template< class HostIdSet >
337  typename HostIdSet::IdType id ( const HostIdSet &idSet ) const
338  {
339  return idSet.template id< codimension >( hostEntity() );
340  }
343  private:
344  HostEntity hostEntity_;
345  const Grid *grid_;
346  mutable GeometryImpl geo_;
347  };
348 
349 
350 
351  // EntityBase (fake)
352  // -----------------
353 
361  template< int codim, class Grid >
362  class EntityBase< codim, Grid, true >
363  {
364  typedef typename std::remove_const< Grid >::type::Traits Traits;
365 
366  public:
370  static const int codimension = codim;
373  static const int dimension = Traits::dimension;
375  static const int mydimension = dimension - codimension;
377  static const int dimensionworld = Traits::dimensionworld;
378 
380  static const bool fake = true;
386  typedef typename Traits::ctype ctype;
388 
390  typedef typename Traits::template Codim< codimension >::Geometry Geometry;
393  private:
394  typedef typename Traits::HostGrid HostGrid;
395  typedef typename Traits::CoordFunction CoordFunction;
396 
397  public:
401  typedef typename HostGrid::template Codim< codimension >::Entity HostEntity;
403 
405  typedef typename Traits::template Codim< codimension >::EntitySeed EntitySeed;
406 
408  typedef typename HostGrid::template Codim< 0 >::Entity HostElement;
411  typedef typename Traits::template Codim< codimension >::GeometryImpl GeometryImpl;
412 
413  private:
414  typedef typename HostGrid::template Codim< 0 >::Geometry HostGeometry;
415 
417 
418  public:
423  : hostElement_()
424  , subEntity_(-1)
425  , grid_(nullptr)
426  , geo_()
427  {}
428 
429  EntityBase(const Grid& grid, const HostElement& hostElement, unsigned int subEntity)
430  : hostElement_(hostElement)
431  , subEntity_(subEntity)
432  , grid_(&grid)
433  {}
434 
435  EntityBase ( const Grid &grid, const EntitySeed &seed )
436  : hostElement_( grid.hostGrid().entity( grid.getRealImplementation(seed).hostElementSeed() ) )
437  , subEntity_( grid.getRealImplementation(seed).subEntity() )
438  , grid_( &grid )
439  {}
440 
441  EntityBase ( const EntityBase &other )
442  : hostElement_( other.hostElement_ )
443  , subEntity_( other.subEntity_ )
444  , grid_(other.grid_)
445  , geo_( other.geo_ )
446  {}
447 
448  EntityBase ( EntityBase &&other )
449  : hostElement_( std::move( other.hostElement_ ) )
450  , subEntity_( std::move( other.subEntity_ ) )
451  , grid_( std::move( other.grid_ ) )
452  , geo_( std::move( other.geo_ ) )
453  {}
454 
455  /*
456  * This method is required by constructors in the `Entity` class
457  * below, however it cannot do anything useful for fake
458  * entities.
459  */
460  EntityBase(const Grid& grid, const HostEntity& hostEntity)
461  {
462  DUNE_THROW(Dune::Exception, "GeometryGrid: Cannot create fake entity of codim " << codimension << " from real host entity.");
463  }
464 
467  const EntityBase &operator= ( const EntityBase &other )
468  {
469  hostElement_ = other.hostElement_;
470  subEntity_ = other.subEntity_;
471  grid_ = other.grid_;
472  geo_ = other.geo_;
473  return *this;
474  }
475 
476  const EntityBase &operator= ( EntityBase&& other )
477  {
478  hostElement_ = std::move( other.hostElement_ );
479  subEntity_ = std::move( other.subEntity_ );
480  grid_ = std::move( other.grid_ );
481  geo_ = std::move( other.geo_ );
482  return *this;
483  }
484 
486  bool equals ( const EntityBase &other) const
487  {
488  const bool thisEnd = (subEntity() < 0);
489  const bool otherEnd = (other.subEntity() < 0);
490  if( thisEnd || otherEnd )
491  return thisEnd && otherEnd;
492 
493  const int lvl = level();
494  if( lvl != other.level() )
495  return false;
496 
497  const typename Traits::HostGrid::Traits::LevelIndexSet &indexSet
498  = grid().hostGrid().levelIndexSet( lvl );
499 
500  const HostElement &thisElement = hostElement();
501  assert( indexSet.contains( thisElement ) );
502  const HostElement &otherElement = other.hostElement();
503  assert( indexSet.contains( otherElement ) );
504 
505  const int thisIndex = indexSet.subIndex( thisElement, subEntity(), codimension );
506  const int otherIndex = indexSet.subIndex( otherElement, other.subEntity(), codimension );
507  return (thisIndex == otherIndex);
508  }
509 
518  {
519  auto refElement = referenceElement< ctype, dimension >( hostElement().type() );
520  return refElement.type( subEntity_, codimension );
521  }
522 
524  int level () const
525  {
526  return hostElement().level();
527  }
528 
531  {
532  auto refElement = referenceElement< ctype, dimension >( hostElement().type() );
533 
534  PartitionType type = vertexPartitionType( refElement, 0 );
535  if( (type != BorderEntity) && (type != FrontEntity) )
536  return type;
537 
538  const int numVertices = refElement.size( subEntity_, codimension, dimension );
539  for( int i = 1; i < numVertices; ++i )
540  {
541  PartitionType vtxType = vertexPartitionType( refElement, i );
542  if( (vtxType != BorderEntity) && (vtxType != FrontEntity) )
543  return vtxType;
544  if( type != vtxType )
545  return OverlapEntity;
546  }
547  assert( (type == BorderEntity) || (type == FrontEntity) );
548  return type;
549  }
550 
565  Geometry geometry () const
566  {
567  if( !geo_ )
568  {
569  CoordVector coords( hostElement(), subEntity_, grid().coordFunction() );
570  geo_ = GeometryImpl( grid(), type(), coords );
571  }
572  return Geometry( geo_ );
573  }
574 
575  unsigned int subEntities ( unsigned int cc ) const
576  {
577  auto refElement = referenceElement< ctype, dimension >( hostElement().type() );
578  return refElement.size( subEntity_, codimension, cc );
579  }
580 
582  EntitySeed seed () const { return typename EntitySeed::Implementation( hostElement().seed(), subEntity_ ); }
588  const Grid &grid () const { assert( grid_ ); return *grid_; }
589 
590  const HostEntity &hostEntity () const
591  {
592  DUNE_THROW( NotImplemented, "HostGrid has no entities of codimension " << codimension << "." );
593  }
594 
595  const HostElement &hostElement () const
596  {
597  return hostElement_;
598  }
599 
600  int subEntity () const { return subEntity_; }
601 
609  void initialize ( const HostElement &hostElement ) { hostElement_ = hostElement; }
610 
618  template< class HostIndexSet >
619  typename HostIndexSet::IndexType index ( const HostIndexSet &indexSet ) const
620  {
621  return indexSet.subIndex( hostElement(), subEntity_, codimension );
622  }
623 
633  template< class HostIndexSet >
634  typename HostIndexSet::IndexType
635  subIndex ( const HostIndexSet &indexSet, int i, unsigned int cd ) const
636  {
637  auto refElement = referenceElement< ctype, dimension >( hostElement().type() );
638  const int j = refElement.subEntity( subEntity_, codimension, i, codimension+cd );
639  return indexSet.subIndex( hostElement(), j, codimension+cd );
640  }
641 
649  template< class HostIndexSet >
650  bool isContained ( const HostIndexSet &indexSet ) const
651  {
652  return indexSet.contains( hostElement() );
653  }
654 
662  template< class HostIdSet >
663  typename HostIdSet::IdType id ( const HostIdSet &idSet ) const
664  {
665  return idSet.subId( hostElement(), subEntity_, codimension );
666  }
669  private:
671  vertexPartitionType ( Dune::Transitional::ReferenceElement< ctype, Dim<dimension> > refElement, int i ) const
672  {
673  const int j = refElement.subEntity( subEntity_, codimension, i, dimension );
674  return hostElement().template subEntity< dimension >( j ).partitionType();
675  }
676 
677  private:
678  HostElement hostElement_;
679  unsigned int subEntity_;
680  const Grid *grid_;
681  mutable GeometryImpl geo_;
682  };
683 
684 
685 
686  // Entity
687  // ------
688 
689  template< int codim, int dim, class Grid >
690  class Entity
691  : public EntityBase< codim, Grid >
692  {
693  typedef EntityBase< codim, Grid > Base;
694 
695  public:
696  typedef typename Base::HostEntity HostEntity;
697  typedef typename Base::HostElement HostElement;
698  typedef typename Base::GeometryImpl GeometryImpl;
699  typedef typename Base::EntitySeed EntitySeed;
700 
701  Entity () : Base() {}
702 
703  Entity ( const Grid &grid, const EntitySeed &seed ) : Base( grid, seed ) {}
704 
705  Entity ( const Grid &grid, const HostEntity &hostEntity ) : Base( grid, hostEntity ) {}
706  Entity ( const Grid &grid, HostEntity&& hostEntity ) : Base( grid, std::move( hostEntity ) ) {}
707 
708  Entity ( const Grid &grid, const HostElement &hostEntity, int i ) : Base( grid, hostEntity, i ) {}
709 
710  };
711 
712 
713 
714  // Entity for codimension 0
715  // ------------------------
716 
717  template< int dim, class Grid >
718  class Entity< 0, dim, Grid >
719  : public EntityBase< 0, Grid >
720  {
721  typedef EntityBase< 0, Grid > Base;
722 
723  typedef typename std::remove_const< Grid >::type::Traits Traits;
724 
725  typedef typename Traits::HostGrid HostGrid;
726 
727  public:
731  static const int codimension = Base::codimension;
734  static const int dimension = Base::dimension;
736  static const int mydimension = Base::mydimension;
738  static const int dimensionworld = Base::dimensionworld;
739 
741  static const bool fake = Base::fake;
747  typedef typename Traits::template Codim< codimension >::LocalGeometry LocalGeometry;
749 
751 
753  typedef typename Traits::HierarchicIterator HierarchicIterator;
755  typedef typename Traits::LeafIntersectionIterator LeafIntersectionIterator;
757  typedef typename Traits::LevelIntersectionIterator LevelIntersectionIterator;
758 
761  typedef typename Base::HostEntity HostEntity;
762  typedef typename Base::HostElement HostElement;
763  typedef typename Base::GeometryImpl GeometryImpl;
764  typedef typename Base::EntitySeed EntitySeed;
765 
766  using Base::grid;
767  using Base::hostEntity;
768 
769  Entity () : Base() {}
770 
771  Entity ( const Grid &grid, const HostEntity &hostEntity ) : Base( grid, hostEntity ) {}
772  Entity ( const Grid &grid, HostEntity&& hostEntity ) : Base( grid, std::move( hostEntity ) ) {}
773  Entity ( const GeometryImpl &geo, const HostEntity& hostEntity ) : Base( geo, hostEntity ) {}
774  Entity ( const GeometryImpl &geo, HostEntity &&hostEntity ) : Base( geo, std::move( hostEntity ) ) {}
775 
776  Entity ( const Grid &grid, const EntitySeed &seed ) : Base( grid, seed ) {}
777 
778  Entity ( const Grid &grid, const HostEntity &hostEntity, int i ) : Base( grid, hostEntity )
779  {
780  assert( i == 0 );
781  }
782 
783  template< int codim >
784  typename Grid::template Codim< codim >::Entity
785  subEntity ( int i ) const
786  {
787  typedef typename Traits::template Codim< codim >::EntityImpl EntityImpl;
788  return EntityImpl( grid(), hostEntity(), i );
789  }
790 
791  LevelIntersectionIterator ilevelbegin () const
792  {
794  return LevelIntersectionIteratorImpl( *this, hostEntity().ilevelbegin() );
795  }
796 
797  LevelIntersectionIterator ilevelend () const
798  {
800  return LevelIntersectionIteratorImpl( *this, hostEntity().ilevelend() );
801  }
802 
803  LeafIntersectionIterator ileafbegin () const
804  {
806  return LeafIntersectionIteratorImpl( *this, hostEntity().ileafbegin() );
807  }
808 
809  LeafIntersectionIterator ileafend () const
810  {
812  return LeafIntersectionIteratorImpl( *this, hostEntity().ileafend() );
813  }
814 
816  {
817  return hostEntity().hasBoundaryIntersections();
818  }
819 
820  bool isLeaf () const
821  {
822  return hostEntity().isLeaf();
823  }
824 
825  EntityFacade father () const
826  {
827  return Entity( grid(), hostEntity().father() );
828  }
829 
830  bool hasFather () const
831  {
832  return hostEntity().hasFather();
833  }
834 
835  LocalGeometry geometryInFather () const
836  {
837  return hostEntity().geometryInFather();
838  }
839 
840  HierarchicIterator hbegin ( int maxLevel ) const
841  {
842  typedef GeoGrid::HierarchicIterator< Grid > HierarchicIteratorImpl;
843  return HierarchicIteratorImpl( grid(), hostEntity().hbegin( maxLevel ) );
844  }
845 
846  HierarchicIterator hend ( int maxLevel ) const
847  {
848  typedef GeoGrid::HierarchicIterator< Grid > HierarchicIteratorImpl;
849  return HierarchicIteratorImpl( grid(), hostEntity().hend( maxLevel ) );
850  }
851 
852  bool isRegular () const
853  {
854  return hostEntity().isRegular();
855  }
856 
857  bool isNew () const
858  {
859  return hostEntity().isNew();
860  }
861 
862  bool mightVanish () const
863  {
864  return hostEntity().mightVanish();
865  }
866  };
867 
868  } // namespace GeoGrid
869 
870 } // namespace Dune
871 
872 #endif // #ifndef DUNE_GEOGRID_ENTITY_HH
Geometry geometry() const
Definition: geometrygrid/entity.hh:249
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:435
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity&#39;s id from a host IdSet
Definition: geometrygrid/entity.hh:663
Base::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:763
Traits::LevelIntersectionIterator LevelIntersectionIterator
type of level intersection iterator
Definition: geometrygrid/entity.hh:757
Entity(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:706
HierarchicIterator hbegin(int maxLevel) const
Definition: geometrygrid/entity.hh:840
int subEntity() const
Definition: geometrygrid/entity.hh:600
HierarchicIterator hend(int maxLevel) const
Definition: geometrygrid/entity.hh:846
Entity(const GeometryImpl &geo, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:773
LeafIntersectionIterator ileafend() const
Definition: geometrygrid/entity.hh:809
Base::EntitySeed EntitySeed
Definition: geometrygrid/entity.hh:699
EntityBase(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:460
Definition: geometrygrid/entity.hh:58
actual implementation of the entity
Definition: geometrygrid/entity.hh:32
GeometryType type() const
obtain the name of the corresponding reference element
Definition: geometrygrid/entity.hh:218
Traits::template Codim< codimension >::LocalGeometry LocalGeometry
type of corresponding local geometry
Definition: geometrygrid/entity.hh:748
LevelIntersectionIterator ilevelbegin() const
Definition: geometrygrid/entity.hh:791
bool hasBoundaryIntersections() const
Definition: geometrygrid/entity.hh:815
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition: geometrygrid/entity.hh:650
Traits::template Codim< codimension >::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:411
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition: geometrygrid/entity.hh:102
STL namespace.
Entity(const Grid &grid, const HostElement &hostEntity, int i)
Definition: geometrygrid/entity.hh:708
const Grid & grid() const
Definition: geometrygrid/entity.hh:588
bool mightVanish() const
Definition: geometrygrid/entity.hh:862
EntityBase(EntityBase &&other)
Definition: geometrygrid/entity.hh:448
Grid abstract base classThis class is the base class for all grid implementations. Although no virtual functions are used we call it abstract since its methods do not contain an implementation but forward to the methods of the derived class via the Barton-Nackman trick.
Definition: common/grid.hh:373
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity&#39;s id from a host IdSet
Definition: geometrygrid/entity.hh:337
Geometry geometry() const
Definition: geometrygrid/entity.hh:565
unsigned int subEntities(unsigned int cc) const
Definition: geometrygrid/entity.hh:575
Definition: geometrygrid/entity.hh:55
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:635
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:311
Dune::Entity< 0, dim, Grid, Dune::GeoGrid::Entity > EntityFacade
Definition: geometrygrid/entity.hh:750
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity&#39;s index from a host IndexSet
Definition: geometrygrid/entity.hh:295
bool isRegular() const
Definition: geometrygrid/entity.hh:852
Wrapper class for entities.
Definition: common/entity.hh:63
PartitionType partitionType() const
obtain the partition type of this entity
Definition: geometrygrid/entity.hh:530
const HostEntity & hostEntity() const
Definition: geometrygrid/entity.hh:590
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition: geometrygrid/entity.hh:120
Entity(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:772
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:140
Grid::template Codim< codim >::Entity subEntity(int i) const
Definition: geometrygrid/entity.hh:785
EntityBase(const GeometryImpl &geo, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:151
Base::HostElement HostElement
Definition: geometrygrid/entity.hh:762
LocalGeometry geometryInFather() const
Definition: geometrygrid/entity.hh:835
Entity(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:776
Definition: cornerstorage.hh:20
EntitySeed seed() const
return EntitySeed of host grid entity
Definition: geometrygrid/entity.hh:582
Entity(const Grid &grid, const HostEntity &hostEntity, int i)
Definition: geometrygrid/entity.hh:778
GeometryType
Type representing VTK&#39;s entity geometry types.
Definition: common.hh:178
EntityBase()
Definition: geometrygrid/entity.hh:134
Entity(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:771
LeafIntersectionIterator ileafbegin() const
Definition: geometrygrid/entity.hh:803
EntityBase()
Definition: geometrygrid/entity.hh:422
all entities lying in the overlap zone
Definition: gridenums.hh:31
GeometryType type() const
obtain the name of the corresponding reference element
Definition: geometrygrid/entity.hh:517
bool hasFather() const
Definition: geometrygrid/entity.hh:830
bool isLeaf() const
Definition: geometrygrid/entity.hh:820
EntityBase(const Grid &grid, const HostElement &hostElement, int i)
Definition: geometrygrid/entity.hh:145
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition: geometrygrid/entity.hh:408
Entity(const GeometryImpl &geo, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:774
void initialize(const HostElement &hostElement)
initiliaze an entity
Definition: geometrygrid/entity.hh:609
Entity()
Definition: geometrygrid/entity.hh:701
unsigned int subEntities(unsigned int cc) const
Definition: geometrygrid/entity.hh:259
EntityBase(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:168
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition: geometrygrid/entity.hh:405
EntitySeedImp Implementation
type of underlying implementation
Definition: common/entityseed.hh:35
int level() const
obtain the level of this entity
Definition: geometrygrid/entity.hh:524
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:28
EntityBase(const GeometryImpl &geo, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:157
on boundary between overlap and ghost
Definition: gridenums.hh:32
EntityBase(const Grid &grid, const HostElement &hostElement, unsigned int subEntity)
Definition: geometrygrid/entity.hh:429
EntityBase(const EntityBase &other)
Definition: geometrygrid/entity.hh:441
LevelIntersectionIterator ilevelend() const
Definition: geometrygrid/entity.hh:797
Entity(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:705
Base::HostEntity HostEntity
Definition: geometrygrid/entity.hh:761
const HostEntity & hostEntity() const
Definition: geometrygrid/entity.hh:274
Traits::LeafIntersectionIterator LeafIntersectionIterator
type of leaf intersection iterator
Definition: geometrygrid/entity.hh:755
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition: geometrygrid/entity.hh:117
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity&#39;s index from a host IndexSet
Definition: geometrygrid/entity.hh:619
EntityBase(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:163
bool isNew() const
Definition: geometrygrid/entity.hh:857
bool equals(const EntityBase &other) const
compare two entities
Definition: geometrygrid/entity.hh:486
EntityBase(const EntityBase &other)
Definition: geometrygrid/entity.hh:174
Entity(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:703
Different resources needed by all grid implementations.
PartitionType partitionType() const
obtain the partition type of this entity
Definition: geometrygrid/entity.hh:230
Base::EntitySeed EntitySeed
Definition: geometrygrid/entity.hh:764
DUNE-conform implementation of the entityThis class merely changes the template parameters of the ent...
Definition: geometrygrid/entity.hh:47
Traits::ctype ctype
coordinate type of the grid
Definition: geometrygrid/entity.hh:387
EntityBase(EntityBase &&other)
Definition: geometrygrid/entity.hh:180
Entity()
Definition: geometrygrid/entity.hh:769
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition: geometrygrid/entity.hh:324
Traits::template Codim< codim >::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:123
void initialize(const HostEntity &hostEntity)
initiliaze an entity
Definition: geometrygrid/entity.hh:284
int level() const
obtain the level of this entity
Definition: geometrygrid/entity.hh:224
Base::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:698
const Grid & grid() const
Definition: geometrygrid/entity.hh:272
Traits::HierarchicIterator HierarchicIterator
type of hierarchic iterator
Definition: geometrygrid/entity.hh:753
const HostElement & hostElement() const
Definition: geometrygrid/entity.hh:595
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition: geometrygrid/entity.hh:114
on boundary between interior and overlap
Definition: gridenums.hh:30
EntitySeed seed() const
return EntitySeed of host grid entity
Definition: geometrygrid/entity.hh:265
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition: geometrygrid/entity.hh:390
Base::HostElement HostElement
Definition: geometrygrid/entity.hh:697
Base::HostEntity HostEntity
Definition: geometrygrid/entity.hh:696
Traits::ctype ctype
coordinate type of the grid
Definition: geometrygrid/entity.hh:99
Include standard header files.
Definition: agrid.hh:58
bool equals(const EntityBase &other) const
compare two entities
Definition: geometrygrid/entity.hh:205
EntityFacade father() const
Definition: geometrygrid/entity.hh:825
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition: geometrygrid/entity.hh:402