dune-grid  2.11
geometrygrid/entity.hh
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 // vi: set et ts=4 sw=2 sts=2:
5 #ifndef DUNE_GEOGRID_ENTITY_HH
6 #define DUNE_GEOGRID_ENTITY_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 std::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;
117 
119  typedef typename Traits::template Codim< codimension >::EntitySeed EntitySeed;
120 
122  typedef typename HostGrid::template Codim< 0 >::Entity HostElement;
125  typedef typename Traits::template Codim< codim >::GeometryImpl GeometryImpl;
126 
127  private:
128  typedef typename HostGrid::template Codim< codimension >::Geometry HostGeometry;
129 
131 
132  public:
137  : hostEntity_()
138  , grid_( nullptr )
139  , geo_()
140  {}
141 
142  EntityBase ( const Grid &grid, const EntitySeed &seed )
143  : hostEntity_( grid.hostGrid().entity( seed.impl().hostEntitySeed() ) )
144  , grid_( &grid )
145  {}
146 
147  EntityBase ( const Grid &grid, const HostElement &hostElement, int i )
148  : hostEntity_( hostElement.template subEntity<codim>(i) )
149  , grid_( &grid )
150  {}
151 
152 
153  EntityBase ( const GeometryImpl &geo, const HostEntity &hostEntity )
154  : hostEntity_( hostEntity )
155  , grid_( &geo.grid() )
156  , geo_( geo )
157  {}
158 
159  EntityBase ( const GeometryImpl &geo, HostEntity&& hostEntity )
160  : hostEntity_( std::move( hostEntity ) )
161  , grid_( &geo.grid() )
162  , geo_( geo )
163  {}
164 
165  EntityBase ( const Grid &grid, const HostEntity& hostEntity )
166  : hostEntity_( hostEntity )
167  , grid_( &grid )
168  {}
169 
170  EntityBase ( const Grid &grid, HostEntity&& hostEntity )
171  : hostEntity_( std::move( hostEntity ) )
172  , grid_( &grid )
173  {}
174 
175 
176  EntityBase ( const EntityBase &other )
177  : hostEntity_( other.hostEntity_ )
178  , grid_( other.grid_ )
179  , geo_( other.geo_ )
180  {}
181 
182  EntityBase ( EntityBase&& other )
183  : hostEntity_( std::move( other.hostEntity_ ) )
184  , grid_( other.grid_ )
185  , geo_( std::move( other.geo_ ) )
186  {}
187 
190  const EntityBase &operator= ( const EntityBase &other )
191  {
192  hostEntity_ = other.hostEntity_;
193  grid_ = other.grid_;
194  geo_ = other.geo_;
195  return *this;
196  }
197 
198  const EntityBase &operator= ( EntityBase&& other )
199  {
200  hostEntity_ = std::move( other.hostEntity_ );
201  grid_ = std::move( other.grid_ );
202  geo_ = std::move( other.geo_ );
203  return *this;
204  }
205 
207  bool equals ( const EntityBase &other) const
208  {
209  return hostEntity_ == other.hostEntity_;
210  }
211 
212  public:
221  {
222  return hostEntity().type();
223  }
224 
226  int level () const
227  {
228  return hostEntity().level();
229  }
230 
233  {
234  return hostEntity().partitionType();
235  }
236 
252  {
253  if( !geo_ )
254  {
255  CoordVector coords( hostEntity(), grid().coordFunction() );
256  geo_ = GeometryImpl( grid(), type(), coords );
257  }
258  return Geometry( geo_ );
259  }
260 
261  unsigned int subEntities ( unsigned int cc ) const
262  {
263  return hostEntity().subEntities( cc );
264  }
265 
267  EntitySeed seed () const { return typename EntitySeed::Implementation( hostEntity().seed() ); }
274  const Grid &grid () const { assert( grid_ ); return *grid_; }
275 
276  const HostEntity &hostEntity () const
277  {
278  return hostEntity_;
279  }
280 
286  void initialize ( const HostEntity &hostEntity ) { hostEntity_ = hostEntity; }
287 
295  template< class HostIndexSet >
296  typename HostIndexSet::IndexType
297  index ( const HostIndexSet &indexSet ) const
298  {
299  return indexSet.template index< codimension >( hostEntity() );
300  }
301 
311  template< class HostIndexSet >
312  typename HostIndexSet::IndexType
313  subIndex ( const HostIndexSet &indexSet, int i, unsigned int cd ) const
314  {
315  return indexSet.subIndex( hostEntity(), i, cd );
316  }
317 
325  template< class HostIndexSet >
326  bool isContained ( const HostIndexSet &indexSet ) const
327  {
328  return indexSet.contains( hostEntity() );
329  }
330 
338  template< class HostIdSet >
339  typename HostIdSet::IdType id ( const HostIdSet &idSet ) const
340  {
341  return idSet.template id< codimension >( hostEntity() );
342  }
345  private:
346  HostEntity hostEntity_;
347  const Grid *grid_;
348  mutable GeometryImpl geo_;
349  };
350 
351 
352 
353  // EntityBase (fake)
354  // -----------------
355 
363  template< int codim, class Grid >
364  class EntityBase< codim, Grid, true >
365  {
366  typedef typename std::remove_const< Grid >::type::Traits Traits;
367 
368  public:
372  static const int codimension = codim;
375  static const int dimension = Traits::dimension;
377  static const int mydimension = dimension - codimension;
379  static const int dimensionworld = Traits::dimensionworld;
380 
382  static const bool fake = true;
388  typedef typename Traits::ctype ctype;
390 
392  typedef typename Traits::template Codim< codimension >::Geometry Geometry;
395  private:
396  typedef typename Traits::HostGrid HostGrid;
397  typedef typename Traits::CoordFunction CoordFunction;
398 
399  public:
403  typedef typename HostGrid::template Codim< codimension >::Entity HostEntity;
405 
407  typedef typename Traits::template Codim< codimension >::EntitySeed EntitySeed;
408 
410  typedef typename HostGrid::template Codim< 0 >::Entity HostElement;
413  typedef typename Traits::template Codim< codimension >::GeometryImpl GeometryImpl;
414 
415  private:
416  typedef typename HostGrid::template Codim< 0 >::Geometry HostGeometry;
417 
419 
420  public:
425  : hostElement_()
426  , subEntity_(-1)
427  , grid_(nullptr)
428  , geo_()
429  {}
430 
431  EntityBase(const Grid& grid, const HostElement& hostElement, unsigned int subEntity)
432  : hostElement_(hostElement)
433  , subEntity_(subEntity)
434  , grid_(&grid)
435  {}
436 
437  EntityBase ( const Grid &grid, const EntitySeed &seed )
438  : hostElement_( grid.hostGrid().entity( seed.impl().hostElementSeed() ) )
439  , subEntity_( seed.impl().subEntity() )
440  , grid_( &grid )
441  {}
442 
443  EntityBase ( const EntityBase &other )
444  : hostElement_( other.hostElement_ )
445  , subEntity_( other.subEntity_ )
446  , grid_(other.grid_)
447  , geo_( other.geo_ )
448  {}
449 
450  EntityBase ( EntityBase &&other )
451  : hostElement_( std::move( other.hostElement_ ) )
452  , subEntity_( std::move( other.subEntity_ ) )
453  , grid_( std::move( other.grid_ ) )
454  , geo_( std::move( other.geo_ ) )
455  {}
456 
457  /*
458  * This method is required by constructors in the `Entity` class
459  * below, however it cannot do anything useful for fake
460  * entities.
461  */
462  EntityBase(const Grid& grid, const HostEntity& hostEntity)
463  {
464  DUNE_THROW(Dune::Exception, "GeometryGrid: Cannot create fake entity of codim " << codimension << " from real host entity.");
465  }
466 
469  const EntityBase &operator= ( const EntityBase &other )
470  {
471  hostElement_ = other.hostElement_;
472  subEntity_ = other.subEntity_;
473  grid_ = other.grid_;
474  geo_ = other.geo_;
475  return *this;
476  }
477 
478  const EntityBase &operator= ( EntityBase&& other )
479  {
480  hostElement_ = std::move( other.hostElement_ );
481  subEntity_ = std::move( other.subEntity_ );
482  grid_ = std::move( other.grid_ );
483  geo_ = std::move( other.geo_ );
484  return *this;
485  }
486 
488  bool equals ( const EntityBase &other) const
489  {
490  const bool thisEnd = (subEntity() < 0);
491  const bool otherEnd = (other.subEntity() < 0);
492  if( thisEnd || otherEnd )
493  return thisEnd && otherEnd;
494 
495  const int lvl = level();
496  if( lvl != other.level() )
497  return false;
498 
499  const typename Traits::HostGrid::Traits::LevelIndexSet &indexSet
500  = grid().hostGrid().levelIndexSet( lvl );
501 
502  const HostElement &thisElement = hostElement();
503  assert( indexSet.contains( thisElement ) );
504  const HostElement &otherElement = other.hostElement();
505  assert( indexSet.contains( otherElement ) );
506 
507  const int thisIndex = indexSet.subIndex( thisElement, subEntity(), codimension );
508  const int otherIndex = indexSet.subIndex( otherElement, other.subEntity(), codimension );
509  return (thisIndex == otherIndex);
510  }
511 
520  {
521  auto refElement = referenceElement< ctype, dimension >( hostElement().type() );
522  return refElement.type( subEntity_, codimension );
523  }
524 
526  int level () const
527  {
528  return hostElement().level();
529  }
530 
533  {
534  auto refElement = referenceElement< ctype, dimension >( hostElement().type() );
535 
536  PartitionType type = vertexPartitionType( refElement, 0 );
537  if( (type != BorderEntity) && (type != FrontEntity) )
538  return type;
539 
540  const int numVertices = refElement.size( subEntity_, codimension, dimension );
541  for( int i = 1; i < numVertices; ++i )
542  {
543  PartitionType vtxType = vertexPartitionType( refElement, i );
544  if( (vtxType != BorderEntity) && (vtxType != FrontEntity) )
545  return vtxType;
546  if( type != vtxType )
547  return OverlapEntity;
548  }
549  assert( (type == BorderEntity) || (type == FrontEntity) );
550  return type;
551  }
552 
568  {
569  if( !geo_ )
570  {
571  CoordVector coords( hostElement(), subEntity_, grid().coordFunction() );
572  geo_ = GeometryImpl( grid(), type(), coords );
573  }
574  return Geometry( geo_ );
575  }
576 
577  unsigned int subEntities ( unsigned int cc ) const
578  {
579  auto refElement = referenceElement< ctype, dimension >( hostElement().type() );
580  return refElement.size( subEntity_, codimension, cc );
581  }
582 
584  EntitySeed seed () const { return typename EntitySeed::Implementation( hostElement().seed(), subEntity_ ); }
590  const Grid &grid () const { assert( grid_ ); return *grid_; }
591 
592  const HostEntity &hostEntity () const
593  {
594  DUNE_THROW( NotImplemented, "HostGrid has no entities of codimension " << codimension << "." );
595  }
596 
597  const HostElement &hostElement () const
598  {
599  return hostElement_;
600  }
601 
602  int subEntity () const { return subEntity_; }
603 
611  void initialize ( const HostElement &hostElement ) { hostElement_ = hostElement; }
612 
620  template< class HostIndexSet >
621  typename HostIndexSet::IndexType index ( const HostIndexSet &indexSet ) const
622  {
623  return indexSet.subIndex( hostElement(), subEntity_, codimension );
624  }
625 
635  template< class HostIndexSet >
636  typename HostIndexSet::IndexType
637  subIndex ( const HostIndexSet &indexSet, int i, unsigned int cd ) const
638  {
639  auto refElement = referenceElement< ctype, dimension >( hostElement().type() );
640  const int j = refElement.subEntity( subEntity_, codimension, i, codimension+cd );
641  return indexSet.subIndex( hostElement(), j, codimension+cd );
642  }
643 
651  template< class HostIndexSet >
652  bool isContained ( const HostIndexSet &indexSet ) const
653  {
654  return indexSet.contains( hostElement() );
655  }
656 
664  template< class HostIdSet >
665  typename HostIdSet::IdType id ( const HostIdSet &idSet ) const
666  {
667  return idSet.subId( hostElement(), subEntity_, codimension );
668  }
671  private:
673  vertexPartitionType ( typename Dune::ReferenceElements< ctype, dimension >::ReferenceElement refElement, int i ) const
674  {
675  const int j = refElement.subEntity( subEntity_, codimension, i, dimension );
676  return hostElement().template subEntity< dimension >( j ).partitionType();
677  }
678 
679  private:
680  HostElement hostElement_;
681  unsigned int subEntity_;
682  const Grid *grid_;
683  mutable GeometryImpl geo_;
684  };
685 
686 
687 
688  // Entity
689  // ------
690 
691  template< int codim, int dim, class Grid >
692  class Entity
693  : public EntityBase< codim, Grid >
694  {
695  typedef EntityBase< codim, Grid > Base;
696 
697  public:
698  typedef typename Base::HostEntity HostEntity;
699  typedef typename Base::HostElement HostElement;
700  typedef typename Base::GeometryImpl GeometryImpl;
701  typedef typename Base::EntitySeed EntitySeed;
702 
703  Entity () : Base() {}
704 
705  Entity ( const Grid &grid, const EntitySeed &seed ) : Base( grid, seed ) {}
706 
707  Entity ( const Grid &grid, const HostEntity &hostEntity ) : Base( grid, hostEntity ) {}
708  Entity ( const Grid &grid, HostEntity&& hostEntity ) : Base( grid, std::move( hostEntity ) ) {}
709 
710  Entity ( const Grid &grid, const HostElement &hostEntity, int i ) : Base( grid, hostEntity, i ) {}
711 
712  };
713 
714 
715 
716  // Entity for codimension 0
717  // ------------------------
718 
719  template< int dim, class Grid >
720  class Entity< 0, dim, Grid >
721  : public EntityBase< 0, Grid >
722  {
723  typedef EntityBase< 0, Grid > Base;
724 
725  typedef typename std::remove_const< Grid >::type::Traits Traits;
726 
727  typedef typename Traits::HostGrid HostGrid;
728 
729  public:
733  static const int codimension = Base::codimension;
736  static const int dimension = Base::dimension;
738  static const int mydimension = Base::mydimension;
740  static const int dimensionworld = Base::dimensionworld;
741 
743  static const bool fake = Base::fake;
749  typedef typename Traits::template Codim< codimension >::LocalGeometry LocalGeometry;
751 
753 
755  typedef typename Traits::HierarchicIterator HierarchicIterator;
757  typedef typename Traits::LeafIntersectionIterator LeafIntersectionIterator;
759  typedef typename Traits::LevelIntersectionIterator LevelIntersectionIterator;
760 
763  typedef typename Base::HostEntity HostEntity;
764  typedef typename Base::HostElement HostElement;
765  typedef typename Base::GeometryImpl GeometryImpl;
766  typedef typename Base::EntitySeed EntitySeed;
767 
768  using Base::grid;
769  using Base::hostEntity;
770 
771  Entity () : Base() {}
772 
773  Entity ( const Grid &g, const HostEntity &hostE ) : Base( g, hostE ) {}
774  Entity ( const Grid &g, HostEntity&& hostE ) : Base( g, std::move( hostE ) ) {}
775  Entity ( const GeometryImpl &geo, const HostEntity& hostE ) : Base( geo, hostE ) {}
776  Entity ( const GeometryImpl &geo, HostEntity &&hostE ) : Base( geo, std::move( hostE ) ) {}
777 
778  Entity ( const Grid &g, const EntitySeed &seed ) : Base( g, seed ) {}
779 
780  Entity ( const Grid &g, const HostEntity &hostE, int i ) : Base( g, hostE )
781  {
782  assert( i == 0 );
783  }
784 
785  template< int codim >
786  typename Grid::template Codim< codim >::Entity
787  subEntity ( int i ) const
788  {
789  typedef typename Traits::template Codim< codim >::EntityImpl EntityImpl;
790  return EntityImpl( grid(), hostEntity(), i );
791  }
792 
794  {
796  return LevelIntersectionIteratorImpl( *this, hostEntity().ilevelbegin() );
797  }
798 
800  {
802  return LevelIntersectionIteratorImpl( *this, hostEntity().ilevelend() );
803  }
804 
806  {
808  return LeafIntersectionIteratorImpl( *this, hostEntity().ileafbegin() );
809  }
810 
812  {
814  return LeafIntersectionIteratorImpl( *this, hostEntity().ileafend() );
815  }
816 
818  {
819  return hostEntity().hasBoundaryIntersections();
820  }
821 
822  bool isLeaf () const
823  {
824  return hostEntity().isLeaf();
825  }
826 
828  {
829  return Entity( grid(), hostEntity().father() );
830  }
831 
832  bool hasFather () const
833  {
834  return hostEntity().hasFather();
835  }
836 
838  {
839  return hostEntity().geometryInFather();
840  }
841 
842  HierarchicIterator hbegin ( int maxLevel ) const
843  {
844  typedef GeoGrid::HierarchicIterator< Grid > HierarchicIteratorImpl;
845  return HierarchicIteratorImpl( grid(), hostEntity().hbegin( maxLevel ) );
846  }
847 
848  HierarchicIterator hend ( int maxLevel ) const
849  {
850  typedef GeoGrid::HierarchicIterator< Grid > HierarchicIteratorImpl;
851  return HierarchicIteratorImpl( grid(), hostEntity().hend( maxLevel ) );
852  }
853 
854  bool isRegular () const
855  {
856  return hostEntity().isRegular();
857  }
858 
859  bool isNew () const
860  {
861  return hostEntity().isNew();
862  }
863 
864  bool mightVanish () const
865  {
866  return hostEntity().mightVanish();
867  }
868  };
869 
870  } // namespace GeoGrid
871 
872 } // namespace Dune
873 
874 #endif // #ifndef DUNE_GEOGRID_ENTITY_HH
HierarchicIterator hend(int maxLevel) const
Definition: geometrygrid/entity.hh:848
EntityBase(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:170
Entity(const Grid &g, const HostEntity &hostE)
Definition: geometrygrid/entity.hh:773
EntitySeed seed() const
return EntitySeed of host grid entity
Definition: geometrygrid/entity.hh:584
GeometryType type() const
obtain the name of the corresponding reference element
Definition: geometrygrid/entity.hh:519
EntityBase(const EntityBase &other)
Definition: geometrygrid/entity.hh:176
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:30
const Grid & grid() const
Definition: geometrygrid/entity.hh:274
int level() const
obtain the level of this entity
Definition: geometrygrid/entity.hh:526
concept Entity
Model of a grid entity.
Definition: concepts/entity.hh:119
Entity(const Grid &g, const HostEntity &hostE, int i)
Definition: geometrygrid/entity.hh:780
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:142
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition: geometrygrid/entity.hh:104
Base::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:700
on boundary between interior and overlap
Definition: gridenums.hh:32
const HostElement & hostElement() const
Definition: geometrygrid/entity.hh:597
on boundary between overlap and ghost
Definition: gridenums.hh:34
EntityFacade father() const
Definition: geometrygrid/entity.hh:827
bool hasBoundaryIntersections() const
Definition: geometrygrid/entity.hh:817
Geometry geometry() const
Definition: geometrygrid/entity.hh:567
Base::EntitySeed EntitySeed
Definition: geometrygrid/entity.hh:701
const Grid & grid() const
Definition: geometrygrid/entity.hh:590
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition: geometrygrid/entity.hh:392
unsigned int subEntities(unsigned int cc) const
Definition: geometrygrid/entity.hh:577
EntityBase()
Definition: geometrygrid/entity.hh:136
EntityBase()
Definition: geometrygrid/entity.hh:424
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition: geometrygrid/entity.hh:326
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity&#39;s id from a host IdSet
Definition: geometrygrid/entity.hh:339
LocalGeometry geometryInFather() const
Definition: geometrygrid/entity.hh:837
Entity(const Grid &g, HostEntity &&hostE)
Definition: geometrygrid/entity.hh:774
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:375
Base::HostElement HostElement
Definition: geometrygrid/entity.hh:699
Entity(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:707
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:637
Base::EntitySeed EntitySeed
Definition: geometrygrid/entity.hh:766
EntityBase(EntityBase &&other)
Definition: geometrygrid/entity.hh:450
GeometryType type() const
obtain the name of the corresponding reference element
Definition: geometrygrid/entity.hh:220
PartitionType partitionType() const
obtain the partition type of this entity
Definition: geometrygrid/entity.hh:232
int subEntity() const
Definition: geometrygrid/entity.hh:602
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition: geometrygrid/entity.hh:410
concept Geometry
Model of a geometry object.
Definition: concepts/geometry.hh:29
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:313
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity&#39;s id from a host IdSet
Definition: geometrygrid/entity.hh:665
bool isRegular() const
Definition: geometrygrid/entity.hh:854
EntityBase(const GeometryImpl &geo, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:153
Entity()
Definition: geometrygrid/entity.hh:771
Different resources needed by all grid implementations.
EntityBase(EntityBase &&other)
Definition: geometrygrid/entity.hh:182
void initialize(const HostEntity &hostEntity)
initialize an entity
Definition: geometrygrid/entity.hh:286
LeafIntersectionIterator ileafbegin() const
Definition: geometrygrid/entity.hh:805
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:437
EntitySeedImp Implementation
type of underlying implementation
Definition: common/entityseed.hh:37
Entity(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:705
Traits::ctype ctype
coordinate type of the grid
Definition: geometrygrid/entity.hh:389
PartitionType partitionType() const
obtain the partition type of this entity
Definition: geometrygrid/entity.hh:532
HierarchicIterator hbegin(int maxLevel) const
Definition: geometrygrid/entity.hh:842
Base::HostEntity HostEntity
Definition: geometrygrid/entity.hh:698
bool equals(const EntityBase &other) const
compare two entities
Definition: geometrygrid/entity.hh:488
Base::HostEntity HostEntity
Definition: geometrygrid/entity.hh:763
Entity(const GeometryImpl &geo, HostEntity &&hostE)
Definition: geometrygrid/entity.hh:776
STL namespace.
EntitySeed seed() const
return EntitySeed of host grid entity
Definition: geometrygrid/entity.hh:267
Entity(const GeometryImpl &geo, const HostEntity &hostE)
Definition: geometrygrid/entity.hh:775
bool hasFather() const
Definition: geometrygrid/entity.hh:832
Definition: geometrygrid/entity.hh:57
EntityBase(const EntityBase &other)
Definition: geometrygrid/entity.hh:443
Base::HostElement HostElement
Definition: geometrygrid/entity.hh:764
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition: geometrygrid/entity.hh:404
LevelIntersectionIterator ilevelend() const
Definition: geometrygrid/entity.hh:799
Entity(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:708
Entity()
Definition: geometrygrid/entity.hh:703
int level() const
obtain the level of this entity
Definition: geometrygrid/entity.hh:226
LeafIntersectionIterator ileafend() const
Definition: geometrygrid/entity.hh:811
Traits::template Codim< codimension >::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:413
all entities lying in the overlap zone
Definition: gridenums.hh:33
EntityBase(const GeometryImpl &geo, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:159
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition: geometrygrid/entity.hh:116
Include standard header files.
Definition: agrid.hh:59
Traits::LevelIntersectionIterator LevelIntersectionIterator
type of level intersection iterator
Definition: geometrygrid/entity.hh:759
LevelIntersectionIterator ilevelbegin() const
Definition: geometrygrid/entity.hh:793
concept ReferenceElement
Definition: concepts/geometry.hh:18
Traits::ctype ctype
coordinate type of the grid
Definition: geometrygrid/entity.hh:101
Entity(const Grid &grid, const HostElement &hostEntity, int i)
Definition: geometrygrid/entity.hh:710
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition: geometrygrid/entity.hh:122
Base::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:765
const HostEntity & hostEntity() const
Definition: geometrygrid/entity.hh:592
EntityBase(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:165
bool mightVanish() const
Definition: geometrygrid/entity.hh:864
bool isNew() const
Definition: geometrygrid/entity.hh:859
Definition: cornerstorage.hh:22
Traits::template Codim< codim >::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:125
Entity(const Grid &g, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:778
Traits::LeafIntersectionIterator LeafIntersectionIterator
type of leaf intersection iterator
Definition: geometrygrid/entity.hh:757
bool equals(const EntityBase &other) const
compare two entities
Definition: geometrygrid/entity.hh:207
Grid::template Codim< codim >::Entity subEntity(int i) const
Definition: geometrygrid/entity.hh:787
Dune::Entity< 0, dim, Grid, Dune::GeoGrid::Entity > EntityFacade
Definition: geometrygrid/entity.hh:752
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity&#39;s index from a host IndexSet
Definition: geometrygrid/entity.hh:297
DUNE-conform implementation of the entityThis class merely changes the template parameters of the ent...
Definition: geometrygrid/entity.hh:49
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition: geometrygrid/entity.hh:652
Wrapper class for entities.
Definition: common/entity.hh:65
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition: geometrygrid/entity.hh:119
GeometryType
Type representing VTK&#39;s entity geometry types.
Definition: common.hh:132
EntityBase(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:462
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity&#39;s index from a host IndexSet
Definition: geometrygrid/entity.hh:621
Traits::template Codim< codimension >::LocalGeometry LocalGeometry
type of corresponding local geometry
Definition: geometrygrid/entity.hh:750
unsigned int subEntities(unsigned int cc) const
Definition: geometrygrid/entity.hh:261
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition: geometrygrid/entity.hh:407
const HostEntity & hostEntity() const
Definition: geometrygrid/entity.hh:276
Definition: geometrygrid/entity.hh:60
concept EntitySeed
Model of an entity seed.
Definition: concepts/entity.hh:25
actual implementation of the entity
Definition: geometrygrid/entity.hh:34
void initialize(const HostElement &hostElement)
initialize an entity
Definition: geometrygrid/entity.hh:611
bool isLeaf() const
Definition: geometrygrid/entity.hh:822
EntityBase(const Grid &grid, const HostElement &hostElement, int i)
Definition: geometrygrid/entity.hh:147
Geometry geometry() const
Definition: geometrygrid/entity.hh:251
Traits::HierarchicIterator HierarchicIterator
type of hierarchic iterator
Definition: geometrygrid/entity.hh:755
EntityBase(const Grid &grid, const HostElement &hostElement, unsigned int subEntity)
Definition: geometrygrid/entity.hh:431