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 
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 
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:
365  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;
381  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:
396  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 
443  EntityBase ( EntityBase &&other )
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 
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  {
685  typedef EntityBase< codim, Grid > Base;
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  {
713  typedef EntityBase< 0, Grid > Base;
714 
715  typedef typename std::remove_const< Grid >::type::Traits Traits;
716 
717  typedef typename Traits::HostGrid HostGrid;
718 
719  public:
723  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;
739  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
grid.hh
Different resources needed by all grid implementations.
Dune::GeoGrid::IntersectionIterator
Definition: geometrygrid/entity.hh:58
Dune::GeoGrid::Entity< 0, dim, Grid >::subEntity
Grid::template Codim< codim >::Entity subEntity(int i) const
Definition: geometrygrid/entity.hh:788
Dune::GeoGrid::EntityBase< codim, Grid, false >::hostEntity
const HostEntity & hostEntity() const
Definition: geometrygrid/entity.hh:269
Dune::GeoGrid::Entity< 0, dim, Grid >::HostEntity
Base::HostEntity HostEntity
Definition: geometrygrid/entity.hh:753
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntityBase
EntityBase(EntityBase &&other)
Definition: geometrygrid/entity.hh:180
Dune::GeoGrid::EntityBase< codim, Grid, true >::EntityBase
EntityBase(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:455
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntityBase
EntityBase(const GeometryImpl &geo, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:157
Dune::GeoGrid::EntityBase< codim, Grid, false >::HostEntity
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition: geometrygrid/entity.hh:114
Dune::GeoGrid::Entity< 0, dim, Grid >::ileafend
LeafIntersectionIterator ileafend() const
Definition: geometrygrid/entity.hh:812
Dune::GeoGrid::EntityBase< codim, Grid, true >::type
GeometryType type() const
obtain the name of the corresponding reference element
Definition: geometrygrid/entity.hh:512
Dune::GeoGrid::EntityBase< codim, Grid, false >::initialize
void initialize(const HostEntity &hostEntity)
initiliaze an entity
Definition: geometrygrid/entity.hh:279
Dune::GeoGrid::Entity< 0, dim, Grid >::isRegular
bool isRegular() const
Definition: geometrygrid/entity.hh:855
Dune::GeoGrid::Entity
DUNE-conform implementation of the entity.
Definition: geometrygrid/entity.hh:47
Dune::GeoGrid::EntityBase< codim, Grid, true >::GeometryImpl
Traits::template Codim< codimension >::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:406
Dune
Include standard header files.
Definition: agrid.hh:59
Dune::GeoGrid::EntityBase< codim, Grid, true >::geometry
Geometry geometry() const
Definition: geometrygrid/entity.hh:562
Dune::GeoGrid::EntityBase< codim, Grid, true >::ctype
Traits::ctype ctype
coordinate type of the grid
Definition: geometrygrid/entity.hh:382
Dune::GeoGrid::Entity< 0, dim, Grid >::Entity
Entity()
Definition: geometrygrid/entity.hh:761
Dune::GeoGrid::EntityBase< codim, Grid, true >::EntityBase
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:430
Dune::GeoGrid::Entity< 0, dim, Grid >::Entity
Entity(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:763
Dune::GeoGrid::Entity< 0, dim, Grid >::geometryInFather
LocalGeometry geometryInFather() const
Definition: geometrygrid/entity.hh:838
capabilities.hh
Dune::GeoGrid::EntityBase< codim, Grid, false >::level
int level() const
obtain the level of this entity
Definition: geometrygrid/entity.hh:224
Dune::GeoGrid::EntityBase< codim, Grid, true >::hostElement
const HostElement & hostElement() const
Definition: geometrygrid/entity.hh:586
Dune::GeoGrid::EntityBase< codim, Grid, false >::grid
const Grid & grid() const
Definition: geometrygrid/entity.hh:267
Dune::GeoGrid::Entity< 0, dim, Grid >::subEntities
unsigned int subEntities(unsigned int codim) const
Definition: geometrygrid/entity.hh:781
Dune::GeoGrid::EntityBase< codim, Grid, true >::Geometry
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition: geometrygrid/entity.hh:385
Dune::EntitySeed::Implementation
EntitySeedImp Implementation
Export the implementation type.
Definition: common/entityseed.hh:31
Dune::GeoGrid::Entity::Entity
Entity(const Grid &grid, const HostElement &hostEntity, int i)
Definition: geometrygrid/entity.hh:700
Dune::GeoGrid::Entity< 0, dim, Grid >::Entity
Entity(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:768
Dune::GeoGrid::Entity< 0, dim, Grid >::hend
HierarchicIterator hend(int maxLevel) const
Definition: geometrygrid/entity.hh:849
Dune::GeoGrid::EntityBase< codim, Grid, true >::EntitySeed
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition: geometrygrid/entity.hh:400
Dune::GeoGrid::EntityBase< codim, Grid, false >::Geometry
Traits::template Codim< codimension >::Geometry Geometry
type of corresponding geometry
Definition: geometrygrid/entity.hh:102
Dune::PartitionType
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:28
Dune::VTK::GeometryType
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
cornerstorage.hh
Dune::GeoGrid::EntityBase< codim, Grid, false >::id
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity's id from a host IdSet
Definition: geometrygrid/entity.hh:332
Dune::GeoGrid::Entity< 0, dim, Grid >::GeometryImpl
Base::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:755
Dune::GeoGrid::Entity< 0, dim, Grid >::EntityFacade
Dune::Entity< 0, dim, Grid, Dune::GeoGrid::Entity > EntityFacade
Definition: geometrygrid/entity.hh:742
Dune::OverlapEntity
all entities lying in the overlap zone
Definition: gridenums.hh:31
Dune::GeoGrid::Entity< 0, dim, Grid >::hasFather
bool hasFather() const
Definition: geometrygrid/entity.hh:833
Dune::GeoGrid::Entity< 0, dim, Grid >::ilevelend
LevelIntersectionIterator ilevelend() const
Definition: geometrygrid/entity.hh:800
Dune::GeoGrid::Entity< 0, dim, Grid >::count
int count() const
Definition: geometrygrid/entity.hh:776
Dune::GeoGrid::EntityBase< codim, Grid, true >::EntityBase
EntityBase(const EntityBase &other)
Definition: geometrygrid/entity.hh:436
Dune::GeoGrid::Entity< 0, dim, Grid >::Entity
Entity(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:764
Dune::Entity
Wrapper class for entities.
Definition: common/entity.hh:61
Dune::GeoGrid::EntityBase< codim, Grid, true >::id
HostIdSet::IdType id(const HostIdSet &idSet) const
obtain the entity's id from a host IdSet
Definition: geometrygrid/entity.hh:655
Dune::GeoGrid::EntityBase< codim, Grid, false >::index
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity's index from a host IndexSet
Definition: geometrygrid/entity.hh:290
Dune::GeoGrid::EntityBase< codim, Grid, true >::HostEntity
HostGrid::template Codim< codimension >::Entity HostEntity
type of corresponding host entity
Definition: geometrygrid/entity.hh:397
Dune::GeoGrid::Entity< 0, dim, Grid >::HierarchicIterator
Traits::HierarchicIterator HierarchicIterator
type of hierarchic iterator
Definition: geometrygrid/entity.hh:745
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntitySeed
Traits::template Codim< codimension >::EntitySeed EntitySeed
type of corresponding entity seed
Definition: geometrygrid/entity.hh:117
Dune::GeoGrid::Entity< 0, dim, Grid >::isNew
bool isNew() const
Definition: geometrygrid/entity.hh:860
Dune::GeoGrid::EntityBase< codim, Grid, false >::isContained
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition: geometrygrid/entity.hh:319
Dune::GeoGrid::EntityBase< codim, Grid, true >::hostEntity
const HostEntity & hostEntity() const
Definition: geometrygrid/entity.hh:581
Dune::GeoGrid::CoordVector
Definition: cornerstorage.hh:20
Dune::GeoGrid::Entity< 0, dim, Grid >::HostElement
Base::HostElement HostElement
Definition: geometrygrid/entity.hh:754
Dune::GeoGrid::Entity< 0, dim, Grid >::Entity
Entity(const GeometryImpl &geo, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:766
Dune::GeoGrid::Entity< 0, dim, Grid >::father
EntityFacade father() const
Definition: geometrygrid/entity.hh:828
Dune::GeoGrid::Entity< 0, dim, Grid >::Entity
Entity(const Grid &grid, const HostEntity &hostEntity, int i)
Definition: geometrygrid/entity.hh:770
Dune::GeoGrid::Entity< 0, dim, Grid >::LeafIntersectionIterator
Traits::LeafIntersectionIterator LeafIntersectionIterator
type of leaf intersection iterator
Definition: geometrygrid/entity.hh:747
Dune::GeoGrid::Entity< 0, dim, Grid >::mightVanish
bool mightVanish() const
Definition: geometrygrid/entity.hh:865
Dune::GeoGrid::EntityBase< codim, Grid, true >::seed
EntitySeed seed() const
return EntitySeed of host grid entity
Definition: geometrygrid/entity.hh:573
Dune::GeoGrid::Entity< 0, dim, Grid >::isLeaf
bool isLeaf() const
Definition: geometrygrid/entity.hh:823
Dune::Grid
Grid abstract base class.
Definition: common/grid.hh:373
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntityBase
EntityBase(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:163
Dune::GeoGrid::EntityBase< codim, Grid, true >::level
int level() const
obtain the level of this entity
Definition: geometrygrid/entity.hh:520
Dune::GeoGrid::EntityBase< codim, Grid, true >::EntityBase
EntityBase(const Grid &grid, const HostElement &hostElement, unsigned int subEntity)
Definition: geometrygrid/entity.hh:424
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntityBase
EntityBase(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:168
Dune::GeoGrid::Entity< 0, dim, Grid >::LocalGeometry
Traits::template Codim< codimension >::LocalGeometry LocalGeometry
type of corresponding local geometry
Definition: geometrygrid/entity.hh:740
Dune::GeoGrid::EntityBase< codim, Grid, true >::partitionType
PartitionType partitionType() const
obtain the partition type of this entity
Definition: geometrygrid/entity.hh:526
Dune::GeoGrid::EntityBase< codim, Grid, false >::seed
EntitySeed seed() const
return EntitySeed of host grid entity
Definition: geometrygrid/entity.hh:260
Dune::GeoGrid::Entity< 0, dim, Grid >::hasBoundaryIntersections
bool hasBoundaryIntersections() const
Definition: geometrygrid/entity.hh:818
Dune::GeoGrid::EntityBase< codim, Grid, true >::isContained
bool isContained(const HostIndexSet &indexSet) const
check whether the entity is contained in a host index set
Definition: geometrygrid/entity.hh:642
Dune::GeoGrid::EntityBase< codim, Grid, true >::equals
bool equals(const EntityBase &other) const
compare two entities
Definition: geometrygrid/entity.hh:481
Dune::GeoGrid::EntityBase< codim, Grid, false >::partitionType
PartitionType partitionType() const
obtain the partition type of this entity
Definition: geometrygrid/entity.hh:230
Dune::GeoGrid::Entity::Entity
Entity(const Grid &grid, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:697
Dune::FrontEntity
on boundary between overlap and ghost
Definition: gridenums.hh:32
Dune::GeoGrid::EntityBase< codim, Grid, false >::subIndex
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
Dune::GeoGrid::EntityBase
actual implementation of the entity
Definition: geometrygrid/entity.hh:32
Dune::GeoGrid::Entity< 0, dim, Grid >::LevelIntersectionIterator
Traits::LevelIntersectionIterator LevelIntersectionIterator
type of level intersection iterator
Definition: geometrygrid/entity.hh:749
Dune::GeoGrid::Entity< 0, dim, Grid >::ileafbegin
LeafIntersectionIterator ileafbegin() const
Definition: geometrygrid/entity.hh:806
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntityBase
EntityBase(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:140
Dune::GeoGrid::Entity::Entity
Entity(const Grid &grid, HostEntity &&hostEntity)
Definition: geometrygrid/entity.hh:698
Dune::GeoGrid::Entity::GeometryImpl
Base::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:690
Dune::GeoGrid::EntityBase< codim, Grid, true >::grid
const Grid & grid() const
Definition: geometrygrid/entity.hh:579
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntityBase
EntityBase()
Definition: geometrygrid/entity.hh:134
Dune::GeoGrid::Entity::Entity
Entity()
Definition: geometrygrid/entity.hh:693
Dune::BorderEntity
on boundary between interior and overlap
Definition: gridenums.hh:30
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntityBase
EntityBase(const GeometryImpl &geo, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:151
Dune::GeoGrid::EntityBase< codim, Grid, false >::geometry
Geometry geometry() const
Definition: geometrygrid/entity.hh:249
Dune::GeoGrid::Entity::HostEntity
Base::HostEntity HostEntity
Definition: geometrygrid/entity.hh:688
Dune::GeoGrid::Entity< 0, dim, Grid >::hbegin
HierarchicIterator hbegin(int maxLevel) const
Definition: geometrygrid/entity.hh:843
Dune::GeoGrid::EntityBase< codim, Grid, true >::EntityBase
EntityBase()
Definition: geometrygrid/entity.hh:417
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntityBase
EntityBase(const EntityBase &other)
Definition: geometrygrid/entity.hh:174
Dune::GeoGrid::EntityBase< codim, Grid, true >::EntityBase
EntityBase(EntityBase &&other)
Definition: geometrygrid/entity.hh:443
Dune::GeoGrid::Entity::Entity
Entity(const Grid &grid, const EntitySeed &seed)
Definition: geometrygrid/entity.hh:695
Dune::GeoGrid::EntityBase< codim, Grid, true >::subIndex
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
Dune::GeoGrid::EntityBase< codim, Grid, false >::equals
bool equals(const EntityBase &other) const
compare two entities
Definition: geometrygrid/entity.hh:205
Dune::GeoGrid::Entity< 0, dim, Grid >::EntitySeed
Base::EntitySeed EntitySeed
Definition: geometrygrid/entity.hh:756
Dune::GeoGrid::Entity< 0, dim, Grid >::ilevelbegin
LevelIntersectionIterator ilevelbegin() const
Definition: geometrygrid/entity.hh:794
Dune::GeoGrid::EntityBase< codim, Grid, false >::type
GeometryType type() const
obtain the name of the corresponding reference element
Definition: geometrygrid/entity.hh:218
Dune::GeoGrid::EntityBase< codim, Grid, false >::ctype
Traits::ctype ctype
coordinate type of the grid
Definition: geometrygrid/entity.hh:99
Dune::GeoGrid::EntityBase< codim, Grid, false >::GeometryImpl
Traits::template Codim< codim >::GeometryImpl GeometryImpl
Definition: geometrygrid/entity.hh:123
Dune::GeoGrid::EntityBase< codim, Grid, false >::HostElement
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition: geometrygrid/entity.hh:120
Dune::GeoGrid::EntityBase< codim, Grid, true >::subEntity
int subEntity() const
Definition: geometrygrid/entity.hh:591
Dune::GeoGrid::EntityBase< codim, Grid, true >::initialize
void initialize(const HostElement &hostElement)
initiliaze an entity
Definition: geometrygrid/entity.hh:600
Dune::GeoGrid::HierarchicIterator
Definition: geometrygrid/entity.hh:55
Dune::GeoGrid::Entity::EntitySeed
Base::EntitySeed EntitySeed
Definition: geometrygrid/entity.hh:691
Dune::GeoGrid::EntityBase< codim, Grid, true >::HostElement
HostGrid::template Codim< 0 >::Entity HostElement
type of host elements, i.e., of host entities of codimension 0
Definition: geometrygrid/entity.hh:403
Dune::GeoGrid::Entity< 0, dim, Grid >::Entity
Entity(const GeometryImpl &geo, const HostEntity &hostEntity)
Definition: geometrygrid/entity.hh:765
Dune::GeoGrid::EntityBase< codim, Grid, false >::EntityBase
EntityBase(const Grid &grid, const HostElement &hostElement, int i)
Definition: geometrygrid/entity.hh:145
Dune::GeoGrid::Entity::HostElement
Base::HostElement HostElement
Definition: geometrygrid/entity.hh:689
Dune::GeoGrid::EntityBase< codim, Grid, true >::index
HostIndexSet::IndexType index(const HostIndexSet &indexSet) const
obtain the entity's index from a host IndexSet
Definition: geometrygrid/entity.hh:610