dune-grid  2.4.1-rc2
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/common/nullptr.hh>
7 
8 #include <dune/geometry/referenceelements.hh>
9 
10 #include <dune/grid/common/grid.hh>
13 
14 namespace Dune
15 {
16 
17  namespace GeoGrid
18  {
19 
20  // Internal Forward Declarations
21  // -----------------------------
22 
33  template< int codim, class Grid, bool fake = !(Capabilities::hasHostEntity< Grid, codim >::v) >
34  class EntityBase;
35 
48  template< int codim, int dim, class Grid >
49  class Entity;
50 
51 
52 
53  // External Forward Declarations
54  // -----------------------------
55 
56  template< class Grid >
58 
59  template< class Grid, class HostIntersectionIterator >
61 
62 
63 
64  // EntityBase (real)
65  // -----------------
66 
74  template< int codim, class Grid >
75  class EntityBase< codim, Grid, false >
76  {
77  typedef typename remove_const< Grid >::type::Traits Traits;
78 
79  public:
83  static const int codimension = codim;
86  static const int dimension = Traits::dimension;
88  static const int mydimension = dimension - codimension;
90  static const int dimensionworld = Traits::dimensionworld;
91 
93  static const bool fake = false;
94 
100  typedef typename Traits::ctype ctype;
102 
104  typedef typename Traits::template Codim< codimension >::Geometry Geometry;
107  private:
108  typedef typename Traits::HostGrid HostGrid;
109  typedef typename Traits::CoordFunction CoordFunction;
110 
111  public:
115  typedef typename HostGrid::template Codim< codimension >::Entity HostEntity;
118  typedef typename HostGrid::template Codim< codimension >::EntityPointer HostEntityPointer;
119 
121  typedef typename Traits::template Codim< codimension >::EntitySeed EntitySeed;
122 
124  typedef typename HostGrid::template Codim< 0 >::Entity HostElement;
127  typedef typename Traits::template Codim< codim >::GeometryImpl GeometryImpl;
128 
129  private:
130  typedef typename HostGrid::template Codim< codimension >::Geometry HostGeometry;
131 
133 
134  public:
139  : hostEntity_()
140  , grid_( nullptr )
141  , geo_()
142  {}
143 
144  EntityBase ( const Grid &grid, const EntitySeed &seed )
145  : hostEntity_( grid.hostGrid().entity( grid.getRealImplementation(seed).hostEntitySeed() ) )
146  , grid_( &grid )
147  {}
148 
149  EntityBase ( const Grid &grid, const HostElement &hostElement, int i )
150  : hostEntity_( hostElement.template subEntity<codim>(i) )
151  , grid_( &grid )
152  {}
153 
154 
155  EntityBase ( const GeometryImpl &geo, const HostEntity &hostEntity )
156  : hostEntity_( hostEntity )
157  , grid_( &geo.grid() )
158  , geo_( geo )
159  {}
160 
161  EntityBase ( const GeometryImpl &geo, HostEntity&& hostEntity )
162  : hostEntity_( std::move( hostEntity ) )
163  , grid_( &geo.grid() )
164  , geo_( geo )
165  {}
166 
167  EntityBase ( const Grid &grid, const HostEntity& hostEntity )
168  : hostEntity_( hostEntity )
169  , grid_( &grid )
170  {}
171 
172  EntityBase ( const Grid &grid, HostEntity&& hostEntity )
173  : hostEntity_( std::move( hostEntity ) )
174  , grid_( &grid )
175  {}
176 
177 
178  EntityBase ( const EntityBase &other )
179  : hostEntity_( other.hostEntity_ )
180  , grid_( other.grid_ )
181  , geo_( other.geo_ )
182  {}
183 
184  EntityBase ( EntityBase&& other )
185  : hostEntity_( std::move( other.hostEntity_ ) )
186  , grid_( other.grid_ )
187  , geo_( std::move( other.geo_ ) )
188  {}
189 
192  const EntityBase &operator= ( const EntityBase &other )
193  {
194  hostEntity_ = other.hostEntity_;
195  grid_ = other.grid_;
196  geo_ = other.geo_;
197  return *this;
198  }
199 
200  const EntityBase &operator= ( EntityBase&& other )
201  {
202  hostEntity_ = std::move( other.hostEntity_ );
203  grid_ = std::move( other.grid_ );
204  geo_ = std::move( other.geo_ );
205  return *this;
206  }
207 
209  bool equals ( const EntityBase &other) const
210  {
211  return hostEntity_ == other.hostEntity_;
212  }
213 
214  public:
223  {
224  return hostEntity().type();
225  }
226 
228  int level () const
229  {
230  return hostEntity().level();
231  }
232 
235  {
236  return hostEntity().partitionType();
237  }
238 
253  Geometry geometry () const
254  {
255  if( !geo_ )
256  {
257  CoordVector coords( hostEntity(), grid().coordFunction() );
258  geo_ = GeometryImpl( grid(), type(), coords );
259  }
260  return Geometry( geo_ );
261  }
262 
264  EntitySeed seed () const { return typename EntitySeed::Implementation( hostEntity().seed() ); }
271  const Grid &grid () const { assert( grid_ ); return *grid_; }
272 
273  const HostEntity &hostEntity () const
274  {
275  return hostEntity_;
276  }
277 
283  void initialize ( const HostEntity &hostEntity ) { hostEntity_ = hostEntity; }
284 
292  template< class HostIndexSet >
293  typename HostIndexSet::IndexType
294  index ( const HostIndexSet &indexSet ) const
295  {
296  return indexSet.template index< codimension >( hostEntity() );
297  }
298 
308  template< class HostIndexSet >
309  typename HostIndexSet::IndexType
310  subIndex ( const HostIndexSet &indexSet, int i, unsigned int cd ) const
311  {
312  return indexSet.subIndex( hostEntity(), i, cd );
313  }
314 
322  template< class HostIndexSet >
323  bool isContained ( const HostIndexSet &indexSet ) const
324  {
325  return indexSet.contains( hostEntity() );
326  }
327 
335  template< class HostIdSet >
336  typename HostIdSet::IdType id ( const HostIdSet &idSet ) const
337  {
338  return idSet.template id< codimension >( hostEntity() );
339  }
342  private:
343  HostEntity hostEntity_;
344  const Grid *grid_;
345  mutable GeometryImpl geo_;
346  };
347 
348 
349 
350  // EntityBase (fake)
351  // -----------------
352 
360  template< int codim, class Grid >
361  class EntityBase< codim, Grid, true >
362  {
363  typedef typename remove_const< Grid >::type::Traits Traits;
364 
365  public:
369  static const int codimension = codim;
372  static const int dimension = Traits::dimension;
374  static const int mydimension = dimension - codimension;
376  static const int dimensionworld = Traits::dimensionworld;
377 
379  static const bool fake = true;
385  typedef typename Traits::ctype ctype;
387 
389  typedef typename Traits::template Codim< codimension >::Geometry Geometry;
392  private:
393  typedef typename Traits::HostGrid HostGrid;
394  typedef typename Traits::CoordFunction CoordFunction;
395 
396  public:
400  typedef typename HostGrid::template Codim< codimension >::Entity HostEntity;
403  typedef typename HostGrid::template Codim< codimension >::EntityPointer HostEntityPointer;
404 
406  typedef typename Traits::template Codim< codimension >::EntitySeed EntitySeed;
407 
409  typedef typename HostGrid::template Codim< 0 >::Entity HostElement;
412  typedef typename Traits::template Codim< codimension >::GeometryImpl GeometryImpl;
413 
414  private:
415  typedef typename HostGrid::template Codim< 0 >::Geometry HostGeometry;
416  typedef typename HostGrid::template Codim< dimension >::EntityPointer HostVertexPointer;
417 
419 
420  public:
424  EntityBase () : geo_(), hostElement_(), subEntity_( -1 ) {}
425 
426 
427  EntityBase ( const Grid &grid, const EntitySeed &seed )
428  : hostElement_( grid.hostGrid().entity( grid.getRealImplementation(seed).hostElementSeed() ) )
429  , grid_( &grid )
430  , subEntity_( grid.getRealImplementation(seed).subEntity() )
431  {}
432 
433  EntityBase ( const EntityBase &other )
434  : geo_( other.geo_ ),
435  hostElement_( other.hostElement_ ),
436  subEntity_( other.subEntity_ )
437  {}
438 
439  EntityBase ( EntityBase &&other )
440  : geo_( std::move( other.geo_ ) ),
441  hostElement_( std::move( other.hostElement_ ) ),
442  subEntity_( std::move( other.subEntity_ ) )
443  {}
444 
447  const EntityBase &operator= ( const EntityBase &other )
448  {
449  geo_ = other.geo_;
450  hostElement_ = other.hostElement_;
451  subEntity_ = other.subEntity_;
452  return *this;
453  }
454 
455  const EntityBase &operator= ( EntityBase&& other )
456  {
457  geo_ = std::move( other.geo_ );
458  hostElement_ = std::move( other.hostElement_ );
459  subEntity_ = std::move( other.subEntity_ );
460  return *this;
461  }
462 
464  bool equals ( const EntityBase &other) const
465  {
466  const bool thisEnd = (subEntity() < 0);
467  const bool otherEnd = (other.subEntity() < 0);
468  if( thisEnd || otherEnd )
469  return thisEnd && otherEnd;
470 
471  const int lvl = level();
472  if( lvl != other.level() )
473  return false;
474 
475  const typename Traits::HostGrid::Traits::LevelIndexSet &indexSet
476  = grid().hostGrid().levelIndexSet( lvl );
477 
478  const HostElement &thisElement = hostElement();
479  assert( indexSet.contains( thisElement ) );
480  const HostElement &otherElement = other.hostElement();
481  assert( indexSet.contains( otherElement ) );
482 
483  const int thisIndex = indexSet.subIndex( thisElement, subEntity(), codimension );
484  const int otherIndex = indexSet.subIndex( otherElement, other.subEntity(), codimension );
485  return (thisIndex == otherIndex);
486  }
487 
496  {
497  const ReferenceElement< ctype, dimension > &refElement
498  = ReferenceElements< ctype, dimension >::general( hostElement().type() );
499  return refElement.type( subEntity_, codimension );
500  }
501 
503  int level () const
504  {
505  return hostElement().level();
506  }
507 
510  {
512  return InteriorEntity;
513 
514  const ReferenceElement< ctype, dimension > &refElement
515  = ReferenceElements< ctype, dimension >::general( hostElement().type() );
516 
517  PartitionType type = vertexPartitionType( refElement, 0 );
518  if( (type != BorderEntity) && (type != FrontEntity) )
519  return type;
520 
521  const int numVertices = refElement.size( subEntity_, codimension, dimension );
522  for( int i = 1; i < numVertices; ++i )
523  {
524  PartitionType vtxType = vertexPartitionType( refElement, i );
525  if( (vtxType != BorderEntity) && (vtxType != FrontEntity) )
526  return vtxType;
527  if( type != vtxType )
528  return OverlapEntity;
529  }
530  assert( (type == BorderEntity) || (type == FrontEntity) );
531  return type;
532  }
533 
548  Geometry geometry () const
549  {
550  if( !geo_ )
551  {
552  CoordVector coords( hostElement(), subEntity_, grid().coordFunction() );
553  geo_ = GeometryImpl( grid(), type(), coords );
554  }
555  return Geometry( geo_ );
556  }
557 
559  EntitySeed seed () const { return typename EntitySeed::Implementation( hostElement().seed(), subEntity_ ); }
565  const Grid &grid () const { assert( grid_ ); return *grid_; }
566 
567  const HostEntity &hostEntity () const
568  {
569  DUNE_THROW( NotImplemented, "HostGrid has no entities of codimension " << codimension << "." );
570  }
571 
572  const HostElement &hostElement () const
573  {
574  assert( *this );
575  return hostElement_;
576  }
577 
578  int subEntity () const { return subEntity_; }
579 
587  void initialize ( const HostElement &hostElement ) { hostElement_ = hostElement; }
588 
596  template< class HostIndexSet >
597  typename HostIndexSet::IndexType index ( const HostIndexSet &indexSet ) const
598  {
599  return indexSet.subIndex( hostElement(), subEntity_, codimension );
600  }
601 
611  template< class HostIndexSet >
612  typename HostIndexSet::IndexType
613  subIndex ( const HostIndexSet &indexSet, int i, unsigned int cd ) const
614  {
615  const ReferenceElement< ctype, dimension > &refElement
616  = ReferenceElements< ctype, dimension >::general( hostElement().type() );
617  const int j = refElement.subEntity( subEntity_, codimension, i, codimension+cd );
618  return indexSet.subIndex( hostElement(), j, codimension+cd );
619  }
620 
628  template< class HostIndexSet >
629  bool isContained ( const HostIndexSet &indexSet ) const
630  {
631  return indexSet.contains( hostElement() );
632  }
633 
641  template< class HostIdSet >
642  typename HostIdSet::IdType id ( const HostIdSet &idSet ) const
643  {
644  return idSet.subId( hostElement(), subEntity_, codimension );
645  }
648  private:
650  vertexPartitionType ( const ReferenceElement< ctype, dimension > &refElement, int i ) const
651  {
652  const int j = refElement.subEntity( subEntity_, codimension, 0, dimension );
653  return hostElement().template subEntity< dimension >( j )->partitionType();
654  }
655 
656  private:
657  HostElement hostElement_;
658  unsigned int subEntity_;
659  const Grid *grid_;
660  mutable GeometryImpl geo_;
661  };
662 
663 
664 
665  // Entity
666  // ------
667 
668  template< int codim, int dim, class Grid >
669  class Entity
670  : public EntityBase< codim, Grid >
671  {
672  typedef EntityBase< codim, Grid > Base;
673 
674  public:
675  typedef typename Base::HostEntity HostEntity;
676  typedef typename Base::HostElement HostElement;
677  typedef typename Base::GeometryImpl GeometryImpl;
678  typedef typename Base::EntitySeed EntitySeed;
679 
680  Entity () : Base() {}
681 
682  Entity ( const Grid &grid, const EntitySeed &seed ) : Base( grid, seed ) {}
683 
684  Entity ( const Grid &grid, const HostEntity &hostEntity ) : Base( grid, hostEntity ) {}
685  Entity ( const Grid &grid, HostEntity&& hostEntity ) : Base( grid, std::move( hostEntity ) ) {}
686 
687  Entity ( const Grid &grid, const HostElement &hostEntity, int i ) : Base( grid, hostEntity, i ) {}
688 
689  };
690 
691 
692 
693  // Entity for codimension 0
694  // ------------------------
695 
696  template< int dim, class Grid >
697  class Entity< 0, dim, Grid >
698  : public EntityBase< 0, Grid >
699  {
700  typedef EntityBase< 0, Grid > Base;
701 
702  typedef typename remove_const< Grid >::type::Traits Traits;
703 
704  typedef typename Traits::HostGrid HostGrid;
705 
706  public:
710  static const int codimension = Base::codimension;
713  static const int dimension = Base::dimension;
715  static const int mydimension = Base::mydimension;
717  static const int dimensionworld = Base::dimensionworld;
718 
720  static const bool fake = Base::fake;
726  typedef typename Traits::template Codim< codimension >::LocalGeometry LocalGeometry;
729  typedef typename Traits::template Codim< codimension >::EntityPointer EntityPointer;
730 
732 
734  typedef typename Traits::HierarchicIterator HierarchicIterator;
736  typedef typename Traits::LeafIntersectionIterator LeafIntersectionIterator;
738  typedef typename Traits::LevelIntersectionIterator LevelIntersectionIterator;
739 
742  typedef typename Base::HostEntity HostEntity;
743  typedef typename Base::HostElement HostElement;
744  typedef typename Base::GeometryImpl GeometryImpl;
745  typedef typename Base::EntitySeed EntitySeed;
746 
747  using Base::grid;
748  using Base::hostEntity;
749 
750  Entity () : Base() {}
751 
752  Entity ( const Grid &grid, const HostEntity &hostEntity ) : Base( grid, hostEntity ) {}
753  Entity ( const Grid &grid, HostEntity&& hostEntity ) : Base( grid, std::move( hostEntity ) ) {}
754  Entity ( const GeometryImpl &geo, const HostEntity& hostEntity ) : Base( geo, hostEntity ) {}
755  Entity ( const GeometryImpl &geo, HostEntity &&hostEntity ) : Base( geo, std::move( hostEntity ) ) {}
756 
757  Entity ( const Grid &grid, const EntitySeed &seed ) : Base( grid, seed ) {}
758 
759  Entity ( const Grid &grid, const HostEntity &hostEntity, int i ) : Base( grid, hostEntity )
760  {
761  assert( i == 0 );
762  }
763 
764  template< int codim >
765  int count () const
766  {
767  return hostEntity().template count< codim >();
768  }
769 
770  unsigned int subEntities (unsigned int codim) const
771  {
772  return hostEntity().subEntities(codim);
773  }
774 
775  template< int codim >
776  typename Grid::template Codim< codim >::Entity
777  subEntity ( int i ) const
778  {
779  typedef typename Traits::template Codim< codim >::EntityImpl EntityImpl;
780  return EntityImpl( grid(), hostEntity(), i );
781  }
782 
783  LevelIntersectionIterator ilevelbegin () const
784  {
786  return LevelIntersectionIteratorImpl( *this, hostEntity().ilevelbegin() );
787  }
788 
789  LevelIntersectionIterator ilevelend () const
790  {
792  return LevelIntersectionIteratorImpl( *this, hostEntity().ilevelend() );
793  }
794 
795  LeafIntersectionIterator ileafbegin () const
796  {
798  return LeafIntersectionIteratorImpl( *this, hostEntity().ileafbegin() );
799  }
800 
801  LeafIntersectionIterator ileafend () const
802  {
804  return LeafIntersectionIteratorImpl( *this, hostEntity().ileafend() );
805  }
806 
808  {
809  return hostEntity().hasBoundaryIntersections();
810  }
811 
812  bool isLeaf () const
813  {
814  return hostEntity().isLeaf();
815  }
816 
817  EntityFacade father () const
818  {
819  return Entity( grid(), hostEntity().father() );
820  }
821 
822  bool hasFather () const
823  {
824  return hostEntity().hasFather();
825  }
826 
827  LocalGeometry geometryInFather () const
828  {
829  return hostEntity().geometryInFather();
830  }
831 
832  HierarchicIterator hbegin ( int maxLevel ) const
833  {
834  typedef GeoGrid::HierarchicIterator< Grid > HierarchicIteratorImpl;
835  return HierarchicIteratorImpl( grid(), hostEntity().hbegin( maxLevel ) );
836  }
837 
838  HierarchicIterator hend ( int maxLevel ) const
839  {
840  typedef GeoGrid::HierarchicIterator< Grid > HierarchicIteratorImpl;
841  return HierarchicIteratorImpl( grid(), hostEntity().hend( maxLevel ) );
842  }
843 
844  bool isRegular () const
845  {
846  return hostEntity().isRegular();
847  }
848 
849  bool isNew () const
850  {
851  return hostEntity().isNew();
852  }
853 
854  bool mightVanish () const
855  {
856  return hostEntity().mightVanish();
857  }
858  };
859 
860  } // namespace GeoGrid
861 
862 } // namespace Dune
863 
864 #endif // #ifndef DUNE_GEOGRID_ENTITY_HH
Traits::ctype ctype
coordinate type of the grid
Definition: geometrygrid/entity.hh:101
EntityBase(const Grid &grid, const HostElement &hostElement, int i)
Definition: geometrygrid/entity.hh:149
HostGrid::template Codim< codimension >::EntityPointer HostEntityPointer
type of corresponding host entity pointer
Definition: geometrygrid/entity.hh:118
HostGrid::template Codim< codimension >::EntityPointer HostEntityPointer
type of corresponding host entity pointer
Definition: geometrygrid/entity.hh:403
Base::HostElement HostElement
Definition: geometrygrid/entity.hh:743
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity&#39;s id from a host IdSet
Definition: geometrygrid/entity.hh:336
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition: geometrygrid/entity.hh:406
bool hasBoundaryIntersections() const
Definition: geometrygrid/entity.hh:807
int level() const
obtain the level of this entity
Definition: geometrygrid/entity.hh:503
HierarchicIterator hbegin(int maxLevel) const
Definition: geometrygrid/entity.hh:832
EntityBase(const GeometryImpl &geo, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:155
bool hasFather() const
Definition: geometrygrid/entity.hh:822
PartitionType partitionType() const
obtain the partition type of this entity
Definition: geometrygrid/entity.hh:509
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition: geometrygrid/entity.hh:323
Definition: geometrygrid/entity.hh:60
Base::HostElement HostElement
Definition: geometrygrid/entity.hh:676
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity&#39;s index from a host IndexSet
Definition: geometrygrid/entity.hh:597
Base::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:677
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition: geometrygrid/entity.hh:401
const Grid & grid() const
Definition: geometrygrid/entity.hh:271
Definition: cornerstorage.hh:20
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition: geometrygrid/entity.hh:409
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:28
bool equals(const EntityBase &other) const
compare two entities
Definition: geometrygrid/entity.hh:209
GeometryType
Type representing VTK&#39;s entity geometry types.
Definition: common.hh:178
EntityBase()
Definition: geometrygrid/entity.hh:138
on boundary between interior and overlap
Definition: gridenums.hh:30
Entity(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:753
Entity(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:752
const HostEntity & hostEntity() const
Definition: geometrygrid/entity.hh:567
Entity()
Definition: geometrygrid/entity.hh:750
Dune::Entity< 0, dim, Grid, Dune::GeoGrid::Entity > EntityFacade
Definition: geometrygrid/entity.hh:731
Wrapper class for entities.
Definition: common/entity.hh:61
EntityBase(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:172
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:310
Traits::LevelIntersectionIterator LevelIntersectionIterator
type of level intersection iterator
Definition: geometrygrid/entity.hh:738
void initialize(const HostElement &hostElement)
initiliaze an entity
Definition: geometrygrid/entity.hh:587
Traits::template Codim< codim >::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:127
Definition: geometrygrid/entity.hh:57
Entity()
Definition: geometrygrid/entity.hh:680
LeafIntersectionIterator ileafend() const
Definition: geometrygrid/entity.hh:801
const HostEntity & hostEntity() const
Definition: geometrygrid/entity.hh:273
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition: geometrygrid/entity.hh:124
Entity(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:757
Traits::template Codim< codimension >::EntityPointer EntityPointer
type of corresponding entity pointer
Definition: geometrygrid/entity.hh:729
bool isLeaf() const
Definition: geometrygrid/entity.hh:812
GeometryType type() const
obtain the name of the corresponding reference element
Definition: geometrygrid/entity.hh:222
Traits::template Codim< codimension >::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:412
Entity(const Grid &grid, const HostEntity &hostEntity, int i)
Definition: geometrygrid/entity.hh:759
Traits::ctype ctype
coordinate type of the grid
Definition: geometrygrid/entity.hh:386
bool mightVanish() const
Definition: geometrygrid/entity.hh:854
LevelIntersectionIterator ilevelbegin() const
Definition: geometrygrid/entity.hh:783
const HostElement & hostElement() const
Definition: geometrygrid/entity.hh:572
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition: geometrygrid/entity.hh:389
EntityBase(const GeometryImpl &geo, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:161
Entity(const GeometryImpl &geo, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:754
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition: geometrygrid/entity.hh:121
all interior entities
Definition: gridenums.hh:29
Traits::HierarchicIterator HierarchicIterator
type of hierarchic iterator
Definition: geometrygrid/entity.hh:734
EntityBase(const EntityBase &other)
Definition: geometrygrid/entity.hh:433
Geometry geometry() const
Definition: geometrygrid/entity.hh:548
EntityFacade father() const
Definition: geometrygrid/entity.hh:817
Traits::LeafIntersectionIterator LeafIntersectionIterator
type of leaf intersection iterator
Definition: geometrygrid/entity.hh:736
const Grid & grid() const
Definition: geometrygrid/entity.hh:565
Traits::template Codim< codimension >::LocalGeometry LocalGeometry
type of corresponding local geometry
Definition: geometrygrid/entity.hh:727
Entity(const Grid &grid, const HostElement &hostEntity, int i)
Definition: geometrygrid/entity.hh:687
bool isNew() const
Definition: geometrygrid/entity.hh:849
EntityBase(EntityBase &&other)
Definition: geometrygrid/entity.hh:439
static void(*)(*)(*)(*)(*)(*) move(const double *)
Definition: partitiondisplay.cc:122
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:144
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity&#39;s id from a host IdSet
Definition: geometrygrid/entity.hh:642
Base::HostEntity HostEntity
Definition: geometrygrid/entity.hh:742
int count() const
Definition: geometrygrid/entity.hh:765
actual implementation of the entity
Definition: geometrygrid/entity.hh:34
Grid::template Codim< codim >::Entity subEntity(int i) const
Definition: geometrygrid/entity.hh:777
EntityBase(const EntityBase &other)
Definition: geometrygrid/entity.hh:178
GeometryType type() const
obtain the name of the corresponding reference element
Definition: geometrygrid/entity.hh:495
Base::EntitySeed EntitySeed
Definition: geometrygrid/entity.hh:678
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:388
all entities lying in the overlap zone
Definition: gridenums.hh:31
Base::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:744
Base::EntitySeed EntitySeed
Definition: geometrygrid/entity.hh:745
EntitySeed seed() const
return EntitySeed of host grid entity
Definition: geometrygrid/entity.hh:264
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:427
LocalGeometry geometryInFather() const
Definition: geometrygrid/entity.hh:827
EntityBase()
Definition: geometrygrid/entity.hh:424
Include standard header files.
Definition: agrid.hh:59
EntityBase(EntityBase &&other)
Definition: geometrygrid/entity.hh:184
Geometry geometry() const
Definition: geometrygrid/entity.hh:253
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition: geometrygrid/entity.hh:104
STL namespace.
unsigned int subEntities(unsigned int codim) const
Definition: geometrygrid/entity.hh:770
PartitionType partitionType() const
obtain the partition type of this entity
Definition: geometrygrid/entity.hh:234
Entity(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:682
void initialize(const HostEntity &hostEntity)
initiliaze an entity
Definition: geometrygrid/entity.hh:283
EntitySeedImp Implementation
Export the implementation type.
Definition: common/entityseed.hh:31
Base::HostEntity HostEntity
Definition: geometrygrid/entity.hh:675
Entity(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:684
Entity(const GeometryImpl &geo, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:755
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:613
bool isRegular() const
Definition: geometrygrid/entity.hh:844
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition: geometrygrid/entity.hh:629
Entity(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:685
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity&#39;s index from a host IndexSet
Definition: geometrygrid/entity.hh:294
bool equals(const EntityBase &other) const
compare two entities
Definition: geometrygrid/entity.hh:464
EntityBase(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:167
int subEntity() const
Definition: geometrygrid/entity.hh:578
Different resources needed by all grid implementations.
LeafIntersectionIterator ileafbegin() const
Definition: geometrygrid/entity.hh:795
EntitySeed seed() const
return EntitySeed of host grid entity
Definition: geometrygrid/entity.hh:559
HierarchicIterator hend(int maxLevel) const
Definition: geometrygrid/entity.hh:838
DUNE-conform implementation of the entityThis class merely changes the template parameters of the ent...
Definition: geometrygrid/entity.hh:49
int level() const
obtain the level of this entity
Definition: geometrygrid/entity.hh:228
Specialize with &#39;true&#39; if implementation supports parallelism. (default=false)
Definition: common/capabilities.hh:68
on boundary between overlap and ghost
Definition: gridenums.hh:32
LevelIntersectionIterator ilevelend() const
Definition: geometrygrid/entity.hh:789
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition: geometrygrid/entity.hh:116