dune-foamgrid  2.7-git
foamgridentity.hh
Go to the documentation of this file.
1 // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set ts=8 sw=4 et sts=4:
3 #ifndef DUNE_FOAMGRID_ENTITY_HH
4 #define DUNE_FOAMGRID_ENTITY_HH
5 
10 #include <memory>
11 #include <array>
12 
13 #include <dune/common/version.hh>
14 
15 #include <dune/geometry/type.hh>
16 #include <dune/grid/common/gridenums.hh>
17 #include <dune/grid/common/grid.hh>
18 
21 
22 namespace Dune {
23 
24 
25 // Forward declarations
26 
27 template<int codim, int dimentity, class GridImp>
28 class FoamGridEntity;
29 
30 template<int codim, class GridImp>
31 class FoamGridEntityPointer;
32 
33 template<int codim, PartitionIteratorType pitype, class GridImp>
34 class FoamGridLevelIterator;
35 
36 template<class GridImp>
37 class FoamGridLevelIntersectionIterator;
38 
39 template<class GridImp>
40 class FoamGridLeafIntersectionIterator;
41 
42 template<class GridImp>
43 class FoamGridHierarchicIterator;
44 
45 
51 template<int codim, int dimgrid, class GridImp>
53  public EntityDefaultImplementation <codim, dimgrid, GridImp, FoamGridEntity>
54 {
55  template <class GridImp_>
56  friend class FoamGridLevelIndexSet;
57 
58  template <class GridImp_>
59  friend class FoamGridLeafIndexSet;
60 
61  template <class GridImp_>
62  friend class FoamGridLocalIdSet;
63 
64  template <class GridImp_>
65  friend class FoamGridGlobalIdSet;
66 
67  friend class FoamGridEntityPointer<codim,GridImp>;
68 
69 
70  private:
71 
72  typedef typename GridImp::ctype ctype;
73 
74  enum{dimworld = GridImp::dimensionworld};
75 
76  public:
77 
78  typedef typename GridImp::template Codim<codim>::Geometry Geometry;
79 
81  typedef typename GridImp::template Codim<codim>::EntitySeed EntitySeed;
82 
83 
84 
87  target_(target)
88  {}
89 
91  FoamGridEntity(const FoamGridEntity& original) :
92  target_(original.target_)
93  {}
94 
97  target_(nullptr)
98  {}
99 
100 
103  {
104  if (this != &original)
105  {
106  target_ = original.target_;
107  }
108  return *this;
109  }
110 
111 
113  int level () const {
114  return target_->level();
115  }
116 
117 
120  PartitionType partitionType () const {
121  return target_->partitionType();
122  }
123 
124 
128  template<int cc> int count () const{
129  return target_->template count<cc>();
130  }
131 
132 
135  {
136  // we currently only support simplices
137  std::array<FieldVector<ctype, dimworld>, dimgrid-codim+1> coordinates;
138  assert(dimgrid-codim+1 == target_->corners() && "Target entity is not a simplex!");
139  for (int i=0; i<target_->corners(); i++)
140  coordinates[i] = target_->corner(i);
141 
143  }
144 
146  EntitySeed seed () const
147  {
148  return EntitySeed(*this);
149  }
150 
151  const FoamGridEntityImp<dimgrid-codim, dimgrid, dimworld, ctype>* target_;
152 
153 
156  {
157  target_ = target;
158  }
159 
162  {
163  return target_ == other.target_;
164  }
165 
167  GeometryType type () const { return target_->type(); }
168 };
169 
170 
171 
172 
180 template<class GridImp>
181 class FoamGridEntity<0, 2, GridImp> :
182  public EntityDefaultImplementation<0, 2, GridImp, FoamGridEntity>
183 {
184 
185  enum {dimworld = GridImp::dimensionworld};
186  enum {dimgrid = GridImp::dimension};
187 
188  private:
189 
190  typedef typename GridImp::ctype ctype;
191 
192  public:
193 
194  typedef typename GridImp::template Codim<0>::Geometry Geometry;
195 
196  typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;
197 
200 
203 
206 
208  typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
209 
210  template<int codim>
211  struct Codim
212  {
213  typedef typename GridImp::Traits::template Codim<codim>::Entity Entity;
214  };
215 
216  typedef typename GridImp::Traits::template Codim<0>::Entity Entity;
217 
218 
221  target_(hostEntity)
222  {}
223 
224 
226  FoamGridEntity(const FoamGridEntity& original) :
227  target_(original.target_)
228  {}
229 
232  target_(nullptr)
233  {}
234 
237  {
238  if (this != &original)
239  {
240  target_ = original.target_;
241  }
242  return *this;
243  }
244 
245 
247  int level () const
248  {
249  return target_->level_;
250  }
251 
252 
254  PartitionType partitionType () const {
255  return InteriorEntity;
256  }
257 
258 
261  {
262  // we currently only support simplices
263  std::array<FieldVector<ctype, dimworld>, dimgrid+1> coordinates;
264  assert(dimgrid+1 == target_->corners() && "Target entity is not a simplex!");
265  for (int i=0; i<target_->corners(); i++)
266  coordinates[i] = target_->vertex_[i]->pos_;
267 
269  }
270 
272  EntitySeed seed () const
273  {
274  return EntitySeed(*this);
275  }
276 
277 
280  template<int cc>
281  int count () const
282  {
283  static_assert(0<=cc && cc<=2, "Only codimensions with 0 <= cc <= 2 are valid!");
284  return (cc==0) ? 1 : 3;
285  }
286 
289  unsigned int count (unsigned int codim) const
290  {
291  assert(0<=codim && codim<=2);
292  return (codim==0) ? 1 : 3;
293  }
294 
299  unsigned int subEntities (unsigned int codim) const
300  {
301  assert(0<=codim && codim<=2);
302  return (codim==0) ? 1 : 3;
303  }
304 
307  int subId (int i, unsigned int codim) const {
308  assert(0<=codim && codim<=dimgrid);
309  switch (codim) {
310  case 0:
311  return target_->id_;
312  case 1:
313  return target_->facet_[i]->id_;
314  case 2:
315  return target_->vertex_[i]->id_;
316  }
317  DUNE_THROW(GridError, "Non-existing codimension requested!");
318  }
319 
321  template<int codim>
322  typename std::enable_if<codim==0, typename Codim<0>::Entity>::type
323  subEntity (int i) const
324  {
325  assert(i==0);
327  }
328 
330  template<int codim>
331  typename std::enable_if<codim==1, typename Codim<1>::Entity>::type
332  subEntity (int i) const
333  {
334  assert(i==0 || i==1 || i==2);
335  return typename Codim<1>::Entity(FoamGridEntity<1, dimgrid, GridImp>(this->target_->facet_[i]));
336  }
337 
339  template<int codim>
340  typename std::enable_if<codim==2, typename Codim<2>::Entity>::type
341  subEntity (int i) const
342  {
343  assert(i==0 || i==1 || i==2);
344  return typename Codim<2>::Entity(FoamGridEntity<2, dimgrid, GridImp>(this->target_->vertex_[i]));
345  }
346 
350  }
351 
352 
356  }
357 
358 
361  if(isLeaf())
363  else
365  }
366 
367 
371  }
372 
373 
375  bool isLeaf() const {
376  return target_->isLeaf();
377  }
378 
380  bool hasFather() const {
381  return level()>0;
382  }
383 
384  bool isNew() const
385  {
386  return target_->isNew();
387  }
388 
389  bool mightVanish() const
390  {
391  return target_->mightVanish();
392  }
393 
396  Entity father () const {
398  }
399 
411  // Check whether there really is a father
412  if(father==nullptr)
413  DUNE_THROW(GridError, "There is no father Element.");
414 
415  // Sanity check
416  if(target_->type().isTriangle()){
417  // Lookup the coordinates within the father
418  // As in the refinement routine the children
419  // are number as follows:
420  // First come the ones located in the corner
421  // ascending with the corner index.
422  // Their first corner (origin in the reference simplex)
423  // is always the corner that is also a corner of the father.
424  // For the element with all corners on the edge midpoints of
425  // the father, the corner are numbered according to the edge indices
426  // of the father.
427  ctype mapping[4][3][2] ={
428  { {0.0,0.0}, {0.5,0.0}, {0.0,0.5} },
429  { {1.0,0.0}, {0.5,0.5}, {0.5,0.0} },
430  { {0.0,1.0}, {0.0,0.5}, {0.5,0.5} },
431  { {0.5,0.0}, {0.5,0.5}, {0.0,0.5} }
432  };
433 
434  std::array<FieldVector<ctype, dimgrid>, 3> coordinates;
435 
436  for(int corner=0; corner <3; ++corner)
437  for(int entry=0; entry <2; ++entry)
438  coordinates[corner][entry]=
439  mapping[target_->refinementIndex_][corner][entry];
440 
441  // return LocalGeomety by value
443  coordinates));
444  }else{
445  DUNE_THROW(NotImplemented, "geometryInFather only supported for triangles!");
446  }
447 
448  }
449 
450 
456  {
458 
459  // Load sons of old target onto the iterator stack
460  if (level()<=maxLevel && !isLeaf())
461  for (std::size_t i=0; i<target_->nSons(); i++)
462  it.elemStack.push(target_->sons_[i]);
463 
464  it.virtualEntity_.impl().setToTarget((it.elemStack.empty())
465  ? nullptr : it.elemStack.top());
466 
467  return it;
468  }
469 
470 
473  {
475  }
476 
477 
478  // /////////////////////////////////////////
479  // Internal stuff
480  // /////////////////////////////////////////
481 
482 
485  {
486  target_ = target;
487  }
488 
491  {
492  return target_ == other.target_;
493  }
494 
496  GeometryType type () const { return target_->type(); }
497 
500 
501 }; // end of FoamGridEntity codim = 0, dimgrid = 2
502 
503 
504 template<class GridImp>
505 class FoamGridEntity<0, 1, GridImp> :
506  public EntityDefaultImplementation<0, 1, GridImp, FoamGridEntity>
507 {
508 
509  enum {dimworld = GridImp::dimensionworld};
510  enum {dimgrid = GridImp::dimension};
511 
512  private:
513 
514  typedef typename GridImp::ctype ctype;
515 
516  public:
517 
518  typedef typename GridImp::template Codim<0>::Geometry Geometry;
519 
520  typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;
521 
524 
527 
530 
532  typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
533 
534  template<int codim>
535  struct Codim
536  {
537  typedef typename GridImp::Traits::template Codim<codim>::Entity Entity;
538  };
539 
540  typedef typename GridImp::Traits::template Codim<0>::Entity Entity;
541 
544  target_(hostEntity)
545  {}
546 
547 
549  FoamGridEntity(const FoamGridEntity& original) :
550  target_(original.target_)
551  {}
552 
555  target_(nullptr)
556  {}
557 
560  {
561  if (this != &original)
562  {
563  target_ = original.target_;
564  }
565  return *this;
566  }
567 
568 
570  int level () const
571  {
572  return target_->level_;
573  }
574 
575 
577  PartitionType partitionType () const {
578  return InteriorEntity;
579  }
580 
581 
584  {
585  // we currently only support simplices
586  std::array<FieldVector<ctype, dimworld>, dimgrid+1> coordinates;
587  assert(dimgrid+1 == target_->corners() && "Target entity is not a simplex!");
588  for (int i=0; i<target_->corners(); i++)
589  coordinates[i] = target_->corner(i);
590 
592  }
593 
595  EntitySeed seed () const
596  {
597  return EntitySeed(*this);
598  }
599 
600 
603  template<int cc>
604  int count () const
605  {
606  static_assert(0<=cc && cc<=1, "Only codimensions with 0 <= cc <= 1 are valid!");
607  return (cc==0) ? 1 : 2;
608  }
609 
612  unsigned int count (unsigned int codim) const
613  {
614  assert(0<=codim && codim<=1);
615  return (codim==0) ? 1 : 2;
616  }
617 
622  unsigned int subEntities (unsigned int codim) const
623  {
624  assert(0<=codim && codim<=1);
625  return (codim==0) ? 1 : 2;
626  }
627 
630  int subId (int i,unsigned int codim) const {
631  assert(0<=codim && codim<=1);
632  switch (codim) {
633  case 0:
634  return target_->id_;
635  case 1:
636  return target_->vertex_[i]->id_;
637  }
638  DUNE_THROW(GridError, "Non-existing codimension requested!");
639  }
640 
642  template<int codim>
643  typename std::enable_if<codim==0, typename Codim<0>::Entity>::type
644  subEntity (int i) const
645  {
646  assert(i==0);
648  }
649 
651  template<int codim>
652  typename std::enable_if<codim==1, typename Codim<1>::Entity>::type
653  subEntity (int i) const
654  {
655  assert(i==0 || i==1);
656  return typename Codim<1>::Entity(FoamGridEntity<1, dimgrid, GridImp>(this->target_->vertex_[i]));
657  }
658 
662  }
663 
664 
668  }
669 
670 
673  if(isLeaf())
675  else
677  }
678 
679 
683  }
684 
685 
687  bool isLeaf() const {
688  return target_->isLeaf();
689  }
690 
692  bool hasFather() const {
693  return level()>0;
694  }
695 
696  bool isNew() const
697  {
698  return target_->isNew();
699  }
700 
701  bool mightVanish() const
702  {
703  return target_->mightVanish();
704  }
705 
708  Entity father () const {
710  }
711 
723  // Check whether there really is a father
724  if(father==nullptr)
725  DUNE_THROW(GridError, "There is no father Element.");
726 
727  // Sanity check
728  if(target_->type().isLine()){
729  // Lookup the coordinates within the father
730  // As in the refinement routine the children
731  // are number as follows:
732  // First come the ones located in the corner
733  // ascending with the corner index.
734  // Their first corner (origin in the reference simplex)
735  // is always the corner that is also a corner of the father.
736  // For the element with all corners on the edge midpoints of
737  // the father, the corner are numbered according to the edge indices
738  // of the father.
739  ctype mapping[2][2] = {{0.0, 0.5}, {0.5, 1.0}};
740 
741  std::array<FieldVector<ctype, dimgrid>, 2> coordinates;
742 
743  for(int corner=0; corner <2; ++corner)
744  coordinates[corner][0] = mapping[target_->refinementIndex_][corner];
745 
746  // return LocalGeomety by value
748  }
749  else
750  {
751  DUNE_THROW(NotImplemented, "geometryInFather only supported for lines!");
752  }
753  }
754 
755 
761  {
763 
764  // Load sons of old target onto the iterator stack
765  if (level()<=maxLevel && !isLeaf())
766  for (std::size_t i=0; i<target_->nSons(); i++)
767  it.elemStack.push(target_->sons_[i]);
768 
769  it.virtualEntity_.impl().setToTarget((it.elemStack.empty())
770  ? nullptr : it.elemStack.top());
771 
772  return it;
773  }
774 
775 
778  {
780  }
781 
782 
783  // /////////////////////////////////////////
784  // Internal stuff
785  // /////////////////////////////////////////
786 
787 
790  {
791  target_ = target;
792  }
793 
796  {
797  return target_ == other.target_;
798  }
799 
801  GeometryType type () const { return target_->type(); }
802 
805 
806 }; // end of FoamGridEntity codim = 0, dimgrid = 1
807 
808 } // namespace Dune
809 
810 
811 #endif
The FoamGridGeometry class.
Definition: dgffoam.cc:6
Element specialization of FoamGridEntityImp. Element is a grid entity of topological codimension 0 an...
Definition: foamgridelements.hh:18
The implementation of entities in a FoamGrid.
Definition: foamgridentity.hh:54
friend class FoamGridGlobalIdSet
Definition: foamgridentity.hh:65
Geometry geometry() const
geometry of this entity
Definition: foamgridentity.hh:134
FoamGridEntity & operator=(const FoamGridEntity &original)
Definition: foamgridentity.hh:102
GridImp::template Codim< codim >::Geometry Geometry
Definition: foamgridentity.hh:78
void setToTarget(const FoamGridEntityImp< dimgrid-codim, dimgrid, dimworld, ctype > *target)
Definition: foamgridentity.hh:155
int level() const
level of this element
Definition: foamgridentity.hh:113
bool equals(const Dune::FoamGridEntity< codim, dimgrid, GridImp > &other) const
equality
Definition: foamgridentity.hh:161
int count() const
Definition: foamgridentity.hh:128
FoamGridEntity(const FoamGridEntity &original)
Copy constructor.
Definition: foamgridentity.hh:91
PartitionType partitionType() const
The partition type for parallel computing.
Definition: foamgridentity.hh:120
EntitySeed seed() const
Create EntitySeed.
Definition: foamgridentity.hh:146
FoamGridEntity()
Default constructor.
Definition: foamgridentity.hh:96
friend class FoamGridLocalIdSet
Definition: foamgridentity.hh:62
const FoamGridEntityImp< dimgrid-codim, dimgrid, dimworld, ctype > * target_
Definition: foamgridentity.hh:151
GeometryType type() const
return the entity's type
Definition: foamgridentity.hh:167
GridImp::template Codim< codim >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition: foamgridentity.hh:81
FoamGridEntity(const FoamGridEntityImp< dimgrid-codim, dimgrid, dimworld, ctype > *target)
Constructor for an entity in a given grid level.
Definition: foamgridentity.hh:86
Definition: foamgridentitypointer.hh:20
Definition: foamgridintersectioniterators.hh:239
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition: foamgridintersectioniterators.hh:28
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition: foamgridhierarchiciterator.hh:24
FoamGridLevelIntersectionIterator< GridImp > ilevelbegin() const
First level intersection.
Definition: foamgridentity.hh:348
unsigned int subEntities(unsigned int codim) const
Definition: foamgridentity.hh:299
PartitionType partitionType() const
The partition type for parallel computing.
Definition: foamgridentity.hh:254
FoamGridLevelIntersectionIterator< GridImp > ilevelend() const
Reference to one past the last neighbor.
Definition: foamgridentity.hh:354
FoamGridEntity(const FoamGridEntityImp< dimgrid, dimgrid, dimworld, ctype > *hostEntity)
Constructor for an entity in a given grid level.
Definition: foamgridentity.hh:220
FoamGridHierarchicIterator< GridImp > HierarchicIterator
Iterator over descendants of the entity.
Definition: foamgridentity.hh:205
FoamGridLeafIntersectionIterator< GridImp > ileafend() const
Reference to one past the last leaf intersection.
Definition: foamgridentity.hh:369
bool equals(const Dune::FoamGridEntity< 0, dimgrid, GridImp > &other) const
equality
Definition: foamgridentity.hh:490
std::enable_if< codim==0, typename Codim< 0 >::Entity >::type subEntity(int i) const
Access to codim 0 subentities.
Definition: foamgridentity.hh:323
GridImp::template Codim< 0 >::Geometry Geometry
Definition: foamgridentity.hh:194
int subId(int i, unsigned int codim) const
Return index of sub entity with codim = cc and local number i.
Definition: foamgridentity.hh:307
FoamGridHierarchicIterator< GridImp > hend(int maxLevel) const
Returns iterator to one past the last son.
Definition: foamgridentity.hh:472
FoamGridHierarchicIterator< GridImp > hbegin(int maxLevel) const
Inter-level access to son elements on higher levels<=maxlevel. This is provided for sparsely stored n...
Definition: foamgridentity.hh:455
Geometry geometry() const
Geometry of this entity.
Definition: foamgridentity.hh:260
const FoamGridEntityImp< dimgrid, dimgrid,dimworld, ctype > * target_
pointer to the implementation
Definition: foamgridentity.hh:499
FoamGridLeafIntersectionIterator< GridImp > LeafIntersectionIterator
The Iterator over intersections on the leaf level.
Definition: foamgridentity.hh:202
FoamGridLeafIntersectionIterator< GridImp > ileafbegin() const
First leaf intersection.
Definition: foamgridentity.hh:360
GridImp::Traits::template Codim< 0 >::Entity Entity
Definition: foamgridentity.hh:216
bool hasFather() const
Return true if this element has a father element.
Definition: foamgridentity.hh:380
void setToTarget(const FoamGridEntityImp< dimgrid, dimgrid, dimworld, ctype > *target)
Make this class point to a new FoamGridEntityImp object.
Definition: foamgridentity.hh:484
std::enable_if< codim==1, typename Codim< 1 >::Entity >::type subEntity(int i) const
Access to codim 1 subentities.
Definition: foamgridentity.hh:332
FoamGridEntity()
Default constructor.
Definition: foamgridentity.hh:231
std::enable_if< codim==2, typename Codim< 2 >::Entity >::type subEntity(int i) const
Access to codim 2 subentities.
Definition: foamgridentity.hh:341
unsigned int count(unsigned int codim) const
Return the number of subEntities of codimension cc.
Definition: foamgridentity.hh:289
FoamGridEntity(const FoamGridEntity &original)
Copy constructor.
Definition: foamgridentity.hh:226
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
Definition: foamgridentity.hh:196
bool mightVanish() const
Definition: foamgridentity.hh:389
Entity father() const
Definition: foamgridentity.hh:396
LocalGeometry geometryInFather() const
Location of this element relative to the reference element element of the father. This is sufficient ...
Definition: foamgridentity.hh:409
bool isNew() const
Definition: foamgridentity.hh:384
EntitySeed seed() const
Create EntitySeed.
Definition: foamgridentity.hh:272
FoamGridEntity & operator=(const FoamGridEntity &original)
Definition: foamgridentity.hh:236
int count() const
Return the number of subEntities of codimension cc.
Definition: foamgridentity.hh:281
int level() const
Level of this element.
Definition: foamgridentity.hh:247
bool isLeaf() const
returns true if Entity has NO children
Definition: foamgridentity.hh:375
GeometryType type() const
return the entity's type
Definition: foamgridentity.hh:496
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition: foamgridentity.hh:208
FoamGridLevelIntersectionIterator< GridImp > LevelIntersectionIterator
The Iterator over intersections on this level.
Definition: foamgridentity.hh:199
GridImp::Traits::template Codim< codim >::Entity Entity
Definition: foamgridentity.hh:213
const FoamGridEntityImp< dimgrid, dimgrid,dimworld, ctype > * target_
pointer to the implementation
Definition: foamgridentity.hh:804
void setToTarget(const FoamGridEntityImp< dimgrid, dimgrid, dimworld, ctype > *target)
Make this class point to a new FoamGridEntityImp object.
Definition: foamgridentity.hh:789
FoamGridHierarchicIterator< GridImp > HierarchicIterator
Iterator over descendants of the entity.
Definition: foamgridentity.hh:529
FoamGridLeafIntersectionIterator< GridImp > ileafbegin() const
First leaf intersection.
Definition: foamgridentity.hh:672
bool isNew() const
Definition: foamgridentity.hh:696
GridImp::Traits::template Codim< 0 >::Entity Entity
Definition: foamgridentity.hh:540
int count() const
Return the number of subEntities of codimension cc.
Definition: foamgridentity.hh:604
FoamGridLeafIntersectionIterator< GridImp > LeafIntersectionIterator
The Iterator over intersections on the leaf level.
Definition: foamgridentity.hh:526
FoamGridHierarchicIterator< GridImp > hend(int maxLevel) const
Returns iterator to one past the last son.
Definition: foamgridentity.hh:777
GridImp::template Codim< 0 >::Geometry Geometry
Definition: foamgridentity.hh:518
bool hasFather() const
Return true if this element has a father element.
Definition: foamgridentity.hh:692
Entity father() const
Definition: foamgridentity.hh:708
FoamGridLevelIntersectionIterator< GridImp > ilevelbegin() const
First level intersection.
Definition: foamgridentity.hh:660
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition: foamgridentity.hh:532
bool mightVanish() const
Definition: foamgridentity.hh:701
Geometry geometry() const
Geometry of this entity.
Definition: foamgridentity.hh:583
int subId(int i, unsigned int codim) const
Return index of sub entity with codim = cc and local number i.
Definition: foamgridentity.hh:630
std::enable_if< codim==1, typename Codim< 1 >::Entity >::type subEntity(int i) const
Access to codim 1 subentities.
Definition: foamgridentity.hh:653
FoamGridEntity(const FoamGridEntity &original)
Copy constructor.
Definition: foamgridentity.hh:549
FoamGridHierarchicIterator< GridImp > hbegin(int maxLevel) const
Inter-level access to son elements on higher levels<=maxlevel. This is provided for sparsely stored n...
Definition: foamgridentity.hh:760
FoamGridEntity(const FoamGridEntityImp< dimgrid, dimgrid, dimworld, ctype > *hostEntity)
Constructor for an entity in a given grid level.
Definition: foamgridentity.hh:543
FoamGridLevelIntersectionIterator< GridImp > ilevelend() const
Reference to one past the last neighbor.
Definition: foamgridentity.hh:666
std::enable_if< codim==0, typename Codim< 0 >::Entity >::type subEntity(int i) const
Access to codim 0 subentities.
Definition: foamgridentity.hh:644
bool isLeaf() const
returns true if Entity has NO children
Definition: foamgridentity.hh:687
LocalGeometry geometryInFather() const
Location of this element relative to the reference element element of the father. This is sufficient ...
Definition: foamgridentity.hh:721
int level() const
Level of this element.
Definition: foamgridentity.hh:570
FoamGridLeafIntersectionIterator< GridImp > ileafend() const
Reference to one past the last leaf intersection.
Definition: foamgridentity.hh:681
bool equals(const Dune::FoamGridEntity< 0, dimgrid, GridImp > &other) const
equality
Definition: foamgridentity.hh:795
EntitySeed seed() const
Create EntitySeed.
Definition: foamgridentity.hh:595
GeometryType type() const
return the entity's type
Definition: foamgridentity.hh:801
unsigned int count(unsigned int codim) const
Return the number of subEntities of codimension cc.
Definition: foamgridentity.hh:612
FoamGridEntity & operator=(const FoamGridEntity &original)
Definition: foamgridentity.hh:559
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
Definition: foamgridentity.hh:520
unsigned int subEntities(unsigned int codim) const
Definition: foamgridentity.hh:622
PartitionType partitionType() const
The partition type for parallel computing.
Definition: foamgridentity.hh:577
FoamGridLevelIntersectionIterator< GridImp > LevelIntersectionIterator
The Iterator over intersections on this level.
Definition: foamgridentity.hh:523
FoamGridEntity()
Default constructor.
Definition: foamgridentity.hh:554
GridImp::Traits::template Codim< codim >::Entity Entity
Definition: foamgridentity.hh:537
Definition: foamgridgeometry.hh:21
Definition: foamgridindexsets.hh:26
Definition: foamgridindexsets.hh:200