Loading [MathJax]/extensions/tex2jax.js

dune-mmesh (1.4)

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_MMESH_INTERFACE_ENTITY_HH
4#define DUNE_MMESH_INTERFACE_ENTITY_HH
5
10// Dune includes
11#include <dune/grid/common/grid.hh>
14
15namespace Dune
16{
17 // External forward declarations
18 template<class Grid>
19 struct HostGridAccess;
20
21
22 //**********************************************************************
23 //
24 // --MMeshInterfaceGridEntity
25 // --Entity
26 //
30 template<int codim, int dim, class GridImp>
32#ifndef DOXYGEN_SHOULD_SKIP_THIS
33 : public EntityDefaultImplementation <codim,dim,GridImp,MMeshInterfaceGridEntity>
34#endif /* DOXYGEN_SHOULD_SKIP_THIS */
35 {
36 template <class GridImp_>
37 friend class MMeshInterfaceGridLeafIndexSet;
38
39 template <class GridImp_>
40 friend class MMeshInterfaceGridLocalIdSet;
41
42 template <class GridImp_>
43 friend class MMeshInterfaceGridGlobalIdSet;
44
45 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
46
47 private:
48 typedef typename GridImp::ctype ctype;
49
50 // equivalent entity in the host grid
51 typedef typename GridImp::template MMeshInterfaceEntity<codim> MMeshInterfaceEntity;
52
54 using IdType = MMeshImpl::MultiId;
55
56 public:
57 typedef typename GridImp::template Codim<codim>::Geometry Geometry;
58
60 typedef typename GridImp::template Codim<codim>::EntitySeed EntitySeed;
61
63 : grid_(nullptr)
64 {}
65
66 MMeshInterfaceGridEntity(const GridImp* grid, const MMeshInterfaceEntity& hostEntity)
67 : hostEntity_(hostEntity)
68 , grid_(grid)
69 {}
70
71 MMeshInterfaceGridEntity(const GridImp* grid, MMeshInterfaceEntity&& hostEntity)
72 : hostEntity_(std::move(hostEntity))
73 , grid_(grid)
74 {}
75
76 MMeshInterfaceGridEntity(const MMeshInterfaceGridEntity& original)
77 : hostEntity_(original.hostEntity_)
78 , grid_(original.grid_)
79 {}
80
81 MMeshInterfaceGridEntity(MMeshInterfaceGridEntity&& original)
82 : hostEntity_(std::move(original.hostEntity_))
83 , grid_(original.grid_)
84 {}
85
86 MMeshInterfaceGridEntity& operator=(const MMeshInterfaceGridEntity& original)
87 {
88 if (this != &original)
89 {
90 grid_ = original.grid_;
91 hostEntity_ = original.hostEntity_;
92 }
93 return *this;
94 }
95
96 MMeshInterfaceGridEntity& operator=(MMeshInterfaceGridEntity&& original)
97 {
98 if (this != &original)
99 {
100 grid_ = original.grid_;
101 hostEntity_ = std::move(original.hostEntity_);
102 }
103 return *this;
104 }
105
106 // Comparator for vertices
107 template <int cc = codim>
108 std::enable_if_t< cc == dim, bool >
109 equals(const MMeshInterfaceGridEntity& other) const
110 {
111 return hostEntity_ == other.hostEntity_;
112 }
113
114 // Comparator for edges
115 template <int cc = codim>
116 std::enable_if_t< cc == 1 && dim == 2, bool >
117 equals(const MMeshInterfaceGridEntity& other) const
118 {
119 const auto& vh1 = hostEntity_.first->vertex(hostEntity_.second);
120 const auto& vh2 = hostEntity_.first->vertex(hostEntity_.third);
121 const auto& hostOther_ = other.hostEntity_;
122 const auto& vo1 = hostOther_.first->vertex(hostOther_.second);
123 const auto& vo2 = hostOther_.first->vertex(hostOther_.third);
124
125 return ( (vh1 == vo1) && ( vh2 == vo2 ) ) || ( (vh1 == vo2) && ( vh2 == vo1 ) );
126 }
127
129 bool hasConnectedComponent () const {
130 return false;
131 }
132
135 {
136 return EntitySeed( hostEntity_ );
137 }
138
140 int level () const {
141 // we only have one level
142 return 0;
143 }
144
146 PartitionType partitionType () const
147 {
148 return grid().getMMesh().partitionHelper().partitionType( grid().entity(hostEntity_) );
149 }
150
152 unsigned int subEntities (unsigned int cc) const
153 {
154 if( dim == 1 )
155 return (cc == 0) ? 0 : 2;
156
157 if( dim == 2 )
158 return (cc == 0) ? 0 : 3;
159 }
160
163 template <int cc>
164 std::enable_if_t< cc == codim, typename GridImp::template Codim<cc>::Entity >
165 subEntity (std::size_t i) const {
166 return *this;
167 }
168
171 template <int cc>
172 std::enable_if_t< cc == codim+1, typename GridImp::template Codim<cc>::Entity >
173 subEntity (std::size_t i) const {
174 DUNE_THROW(NotImplemented, "subEntity<1> for codim 1 entity");
175 return typename GridImp::template Codim<cc>::Entity();
176 }
177
179 Geometry geometry () const
180 {
181 return Geometry( hostEntity_ );
182 }
183
185 GeometryType type () const
186 {
187 return GeometryTypes::simplex(dim-codim);
188 }
189
191 bool isInterface() const
192 {
193 return true;
194 }
195
197 bool isTip() const
198 {
199 if constexpr ( codim == dim )
200 {
201 if constexpr ( dim == 2 )
202 return false;
203 else
204 {
205 const auto& hostgrid = grid().getHostGrid();
206
207 int count = 0;
208 auto circulator = hostgrid.incident_edges( hostEntity_ );
209 for ( std::size_t i = 0; i < CGAL::circulator_size(circulator); ++i, ++circulator )
210 {
211 // at boundary
212 if (hostgrid.is_infinite(circulator))
213 return false;
214
215 if (grid().isInterface(*circulator))
216 count++;
217 }
218
219 return (count == 1);
220 }
221 }
222 else
223 DUNE_THROW( NotImplemented, "isTip() for codim != dim" );
224 };
225
227 int boundaryFlag() const
228 {
229 if constexpr ( codim == dim )
230 return hostEntity_->info().boundaryFlag;
231 else
232 DUNE_THROW( NotImplemented, "boundaryFlag() for codim != dim" );
233 }
234
236 std::size_t insertionLevel() const
237 {
238 if constexpr ( codim == dim )
239 return hostEntity_->info().insertionLevel;
240 else
241 DUNE_THROW( NotImplemented, "boundaryFlag() for codim != dim" );
242 }
243
245 auto incidentVerticesBegin ( bool includeInfinite ) const
246 {
247 if constexpr ( codim == dim )
248 {
250 return MMeshIncidentVerticesIterator<GridImp>( Impl( grid_, hostEntity_, includeInfinite) );
251 }
252 else
253 DUNE_THROW( NotImplemented, "incidentVerticesBegin() for codim != dim" );
254 }
255
257 auto incidentVerticesEnd ( bool includeInfinite ) const
258 {
259 if constexpr ( codim == dim )
260 {
262 return MMeshIncidentVerticesIterator<GridImp>( Impl( grid_, hostEntity_, includeInfinite, true ) );
263 }
264 else
265 DUNE_THROW( NotImplemented, "incidentVerticesEnd() for codim != dim" );
266 }
267
270 {
271 if constexpr ( codim == dim )
272 {
274 return MMeshIncidentInterfaceVerticesIterator<GridImp>( Impl( grid_, hostEntity_ ) );
275 }
276 else
277 DUNE_THROW( NotImplemented, "incidentInterfaceVerticesBegin() for codim != dim" );
278 }
279
282 {
283 if constexpr ( codim == dim )
284 {
286 return MMeshIncidentInterfaceVerticesIterator<GridImp>( Impl( grid_, hostEntity_, true ) );
287 }
288 else
289 DUNE_THROW( NotImplemented, "incidentInterfaceVerticesEnd() for codim != dim" );
290 }
291
294 {
295 if constexpr ( codim == dim )
296 {
298 return MMeshIncidentInterfaceElementsIterator<GridImp>( Impl( grid_, hostEntity_ ) );
299 }
300 else if constexpr ( codim == dim-1 )
301 {
303 return MMeshEdgeIncidentInterfaceElementsIterator<GridImp>( Impl( grid_, hostEntity_ ) );
304 }
305 else
306 DUNE_THROW( NotImplemented, "incidentInterfaceElementsBegin() for codim <= dim-1" );
307 }
308
311 {
312 if constexpr ( codim == dim )
313 {
315 return MMeshIncidentInterfaceElementsIterator<GridImp>( Impl( grid_, hostEntity_, true ) );
316 }
317 else if constexpr ( codim == dim-1 )
318 {
320 return MMeshEdgeIncidentInterfaceElementsIterator<GridImp>( Impl( grid_, hostEntity_, true ) );
321 }
322 else
323 DUNE_THROW( NotImplemented, "incidentInterfaceElementsEnd() for codim != dim" );
324 }
325
327 const MMeshInterfaceEntity& hostEntity () const
328 {
329 return hostEntity_;
330 }
331
333 IdType id() const
334 {
335 if constexpr ( codim == dim )
336 return hostEntity_->info().id;
337 else
338 return grid().globalIdSet().id( *this );
339 }
340
342 const GridImp& grid () const
343 {
344 return *grid_;
345 }
346
347 private:
349 MMeshInterfaceEntity hostEntity_;
350
352 const GridImp* grid_;
353 };
354
355
356 //***********************
357 //
358 // --MMeshInterfaceGridEntity
359 //
360 //***********************
368 template<int dim, class GridImp>
369 class MMeshInterfaceGridEntity<0,dim,GridImp>
370#ifndef DOXYGEN_SHOULD_SKIP_THIS
371 : public EntityDefaultImplementation<0,dim,GridImp, MMeshInterfaceGridEntity>
372#endif /* DOXYGEN_SHOULD_SKIP_THIS */
373 {
374 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
375
376 typedef Entity< 0, dim, GridImp, MMeshInterfaceGridEntity > EntityType;
377
378 public:
379 // equivalent entity in the host grid
380 typedef typename GridImp::template MMeshInterfaceEntity<0> MMeshInterfaceEntity;
381
382 typedef typename GridImp::template MMeshInterfaceEntity<dim> MMeshInterfaceVertex;
383
384 typedef typename GridImp::template Codim<0>::Geometry Geometry;
385
386 typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;
387
390
393
395 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
396
398 typedef typename GridImp::ConnectedComponent ConnectedComponent;
399
401 using IdType = MMeshImpl::MultiId;
402
403 // type of global coordinate
404 typedef typename Geometry::GlobalCoordinate GlobalCoordinate;
405
406 // type of local coordinate
407 typedef typename Geometry::LocalCoordinate LocalCoordinate;
408
410 using VertexStorage = std::array<GlobalCoordinate, dim+1>;
411
413 : grid_(nullptr), isLeaf_(true)
414 {}
415
416 MMeshInterfaceGridEntity(const GridImp* grid, const MMeshInterfaceEntity& hostEntity)
417 : hostEntity_(hostEntity), grid_(grid), isLeaf_(true)
418 {
419 if (grid->canBeMirrored(hostEntity_))
420 {
421 const auto mirrored = grid_->mirrorHostEntity( hostEntity_ );
422 if ( hostEntity_.first->info().insertionIndex > mirrored.first->info().insertionIndex )
423 hostEntity_ = mirrored;
424 }
425 }
426
427 MMeshInterfaceGridEntity(const GridImp* grid, MMeshInterfaceEntity&& hostEntity)
428 : hostEntity_(std::move(hostEntity)), grid_(grid), isLeaf_(true)
429 {
430 if (grid->canBeMirrored(hostEntity_))
431 {
432 const auto mirrored = grid_->mirrorHostEntity( hostEntity_ );
433 if ( hostEntity_.first->info().insertionIndex > mirrored.first->info().insertionIndex )
434 hostEntity_ = mirrored;
435 }
436 }
437
438 MMeshInterfaceGridEntity(const GridImp* grid, const MMeshInterfaceEntity& hostEntity, const IdType& id)
439 : hostEntity_(hostEntity), id_(id), grid_(grid), isLeaf_(false)
440 {}
441
442 MMeshInterfaceGridEntity(const GridImp* grid, const VertexStorage& vertex)
443 : id_( /*caching id*/ IdType({ std::size_t(-3), std::size_t(-2) }) ), grid_(grid), isLeaf_(false), vertex_(vertex)
444 {}
445
446 MMeshInterfaceGridEntity(const MMeshInterfaceGridEntity& original)
447 : hostEntity_(original.hostEntity_), id_(original.id_)
448 , grid_(original.grid_), isLeaf_(original.isLeaf_), vertex_(original.vertex_)
449 {}
450
451 MMeshInterfaceGridEntity(MMeshInterfaceGridEntity&& original)
452 : hostEntity_(std::move(original.hostEntity_)), id_(original.id_)
453 , grid_(original.grid_), isLeaf_(original.isLeaf_), vertex_(original.vertex_)
454 {}
455
456 MMeshInterfaceGridEntity& operator=(const MMeshInterfaceGridEntity& original)
457 {
458 if (this != &original)
459 {
460 grid_ = original.grid_;
461 hostEntity_ = original.hostEntity_;
462 isLeaf_ = original.isLeaf_;
463 id_ = original.id_;
464 vertex_ = original.vertex_;
465 }
466 return *this;
467 }
468
469 MMeshInterfaceGridEntity& operator=(MMeshInterfaceGridEntity&& original)
470 {
471 if (this != &original)
472 {
473 grid_ = original.grid_;
474 hostEntity_ = std::move(original.hostEntity_);
475 isLeaf_ = original.isLeaf_;
476 id_ = original.id_;
477 vertex_ = original.vertex_;
478 }
479 return *this;
480 }
481
482 // Comparator for edges
483 template <int d = dim>
484 std::enable_if_t< d == 1, bool >
485 equals(const MMeshInterfaceGridEntity& other) const
486 {
487 return hostEntity_ == other.hostEntity_;
488 }
489
490 // Comparator for facets
491 template <int d = dim>
492 std::enable_if_t< d == 2, bool >
493 equals(const MMeshInterfaceGridEntity& other) const
494 {
495 return hostEntity_ == other.hostEntity_;
496 }
497
499 bool operator==(const MMeshInterfaceGridEntity& other) const
500 {
501 return this->equals(other);
502 }
503
505 bool operator<(const MMeshInterfaceGridEntity& other) const
506 {
507 return hostEntity_ < other.hostEntity_;
508 }
509
512 {
513 return grid_->getConnectedComponent( *this );
514 }
515
518 {
519 return grid_->hasConnectedComponent( *this );
520 }
521
523 auto father () const
524 {
525 DUNE_THROW( InvalidStateException, "MMesh entities do no have a father, but a connectedComponent instead!" );
526 return *this;
527 }
528
530 bool hasFather () const {
531 return false;
532 }
533
534 void bindFather( const EntityType& father ) const
535 {
536 father_ = &father;
537 }
538
540 LocalGeometry geometryInFather() const
541 {
542 if constexpr( dim != 1 )
543 DUNE_THROW(NotImplemented, "geometryInFather() for dim != 1");
544 else
545 {
546 assert( father_ != nullptr );
547
548 auto thisPoints = this->vertex_;
549
550 if( isLeaf_ )
551 for ( int i = 0; i < 2; ++i )
552 thisPoints[i] = geometry().corner(i);
553
554 std::array< LocalCoordinate, 2 > local;
555 for ( int i = 0; i < 2; ++i )
556 local[i] = father_->impl().geometry().local( thisPoints[i] );
557
558 return LocalGeometry( local );
559 }
560 }
561
563 const bool isNew () const
564 {
565 return hasConnectedComponent();
566 }
567
569 void setIsNew ( bool isNew ) const
570 {}
571
573 const bool mightVanish () const
574 {
575 return hostEntity_.first->info().mightVanish;
576 }
577
579 void setWillVanish ( bool mightVanish ) const
580 {
581 hostEntity_.first->info().mightVanish = mightVanish;
582 }
583
585 void mark ( int refCount ) const
586 {
587 hostEntity_.first->info().mark = refCount;
588 }
589
591 int getMark () const
592 {
593 return hostEntity_.first->info().mark;
594 }
595
598 {
599 return EntitySeed(hostEntity_);
600 }
601
603 int level () const
604 {
605 // we only have one level
606 return 0;
607 }
608
610 PartitionType partitionType () const
611 {
612 return grid().getMMesh().partitionHelper().partitionType( grid().entity(hostEntity_) );
613 }
614
616 Geometry geometry () const
617 {
618 if (isLeaf_)
619 return Geometry( hostEntity_ );
620 else
621 return Geometry( this->vertex_ );
622 }
623
625 std::size_t subEntities (std::size_t cc) const
626 {
627 if( dim == 1 )
628 return (cc == 0) ? 1 : 2;
629
630 if( dim == 2 )
631 return (cc == 0) ? 1 : 3;
632 }
633
637 template <int cc>
638 std::enable_if_t< cc == 0, typename GridImp::template Codim<cc>::Entity >
639 subEntity (std::size_t i) const {
640 return *this;
641 }
642
646 template <int cc>
647 std::enable_if_t< cc == dim, typename GridImp::template Codim<cc>::Entity >
648 subEntity (std::size_t i) const {
649 assert( i < subEntities( cc ) );
650
651 auto cgalIndex = MMeshInterfaceImpl::computeCGALIndices<MMeshInterfaceEntity, dim>( hostEntity_ );
653 grid_, hostEntity_.first->vertex( cgalIndex[i] )
654 );
655 }
656
660 template <int cc>
661 std::enable_if_t< cc == 1 && dim == 2, typename GridImp::template Codim<cc>::Entity >
662 subEntity (std::size_t i) const {
663 assert( i < subEntities( cc ) );
664
665 auto cgalIndex = MMeshInterfaceImpl::computeCGALIndices<MMeshInterfaceEntity, dim>( hostEntity_ );
666 auto cell = hostEntity_.first;
667
668 int v1 = cgalIndex[i==2 ? 1 : 0];
669 int v2 = cgalIndex[i==0 ? 1 : 2];
670
672 grid_, CGAL::Triple<decltype(cell), int, int>( cell, v1, v2 )
673 );
674 }
675
679 grid_,
680 hostEntity_);
681 }
682
686 grid_,
687 hostEntity_,
688 true);
689 }
690
693 return ileafbegin();
694 }
695
697 return ileafend();
698 }
699
703 grid_,
704 *this,
705 maxlevel);
706 }
707
711 grid_,
712 *this,
713 maxlevel,
714 true);
715 }
716
718 bool isLeaf() const {
719 return isLeaf_ && !isNew();
720 }
721
723 bool wasRefined () const
724 {
725 return false;
726 }
727
729 bool mightBeCoarsened () const
730 {
731 return false;
732 }
733
735 GeometryType type () const
736 {
737 return GeometryTypes::simplex(dim);
738 }
739
741 const MMeshInterfaceEntity& hostEntity () const
742 {
743 return hostEntity_;
744 }
745
747 const GridImp& grid () const
748 {
749 return *grid_;
750 }
751
753 IdType id() const
754 {
755 // cache id
756 if (id_ == IdType())
757 {
758 typename IdType::VT idlist( dim+1 );
759 for( std::size_t i = 0; i < this->subEntities(dim); ++i )
760 if (grid_->canBeMirrored(hostEntity_))
761 idlist[i] = this->subEntity<dim>(i).impl().hostEntity()->info().id;
762 else
763 idlist[i] = -i;
764 std::sort( idlist.begin(), idlist.end() );
765 id_ = IdType( idlist );
766 }
767
768 return id_;
769 }
770
771 private:
773 MMeshInterfaceEntity hostEntity_;
774
776 mutable IdType id_;
777
779 const GridImp* grid_;
780
782 bool isLeaf_;
783
784 protected:
787
788 mutable const EntityType* father_;
789
790 }; // end of MMeshInterfaceGridEntity codim = 0
791
792} // namespace Dune
793
794#endif
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition: hierarchiciterator.hh:24
const GridImp & grid() const
returns the host entity
Definition: entity.hh:747
bool isLeaf() const
returns true if Entity has no children
Definition: entity.hh:718
const bool isNew() const
returns true if this entity is new after adaptation
Definition: entity.hh:563
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition: entity.hh:395
MMeshInterfaceGridHierarchicIterator< GridImp > hend(int maxlevel) const
Reference to one past the last hierarchic entity.
Definition: entity.hh:709
GridImp::ConnectedComponent ConnectedComponent
The type of the connected component.
Definition: entity.hh:398
std::enable_if_t< cc==dim, typename GridImp::template Codim< cc >::Entity > subEntity(std::size_t i) const
Provide access to sub entity i of given codimension. Entities are numbered 0 ... subEntities(cc)-1.
Definition: entity.hh:648
LocalGeometry geometryInFather() const
Geometry of this entity in bounded father entity ( assumption: this \subset father )
Definition: entity.hh:540
std::size_t subEntities(std::size_t cc) const
Return the number of subEntities of codimension cc.
Definition: entity.hh:625
MMeshInterfaceGridLeafIntersectionIterator< GridImp > ileafbegin() const
First leaf intersection.
Definition: entity.hh:677
const ConnectedComponent & connectedComponent() const
returns the connected component
Definition: entity.hh:511
void setIsNew(bool isNew) const
set if this entity is new after adaptation
Definition: entity.hh:569
bool wasRefined() const
returns if grid was refined
Definition: entity.hh:723
int level() const
Level of this element.
Definition: entity.hh:603
EntitySeed seed() const
Create EntitySeed.
Definition: entity.hh:597
bool operator<(const MMeshInterfaceGridEntity &other) const
returns true if host entities are equal
Definition: entity.hh:505
MMeshInterfaceGridLeafIntersectionIterator< GridImp > ilevelbegin() const
We only have one level.
Definition: entity.hh:692
bool operator==(const MMeshInterfaceGridEntity &other) const
returns true if host entities are equal
Definition: entity.hh:499
std::enable_if_t< cc==1 &&dim==2, typename GridImp::template Codim< cc >::Entity > subEntity(std::size_t i) const
Provide access to sub entity i of given codimension. Entities are numbered 0 ... subEntities(cc)-1.
Definition: entity.hh:662
bool mightBeCoarsened() const
returns if grid might be coarsened
Definition: entity.hh:729
MMeshInterfaceGridLeafIntersectionIterator< GridImp > ileafend() const
Reference to one past the last leaf intersection.
Definition: entity.hh:684
MMeshInterfaceGridHierarchicIterator< GridImp > hbegin(int maxlevel) const
First hierarchic entity, i.e. this entity, because we only have one level.
Definition: entity.hh:701
bool hasFather() const
returns true if father entity exists
Definition: entity.hh:530
Geometry geometry() const
Geometry of this entity.
Definition: entity.hh:616
bool hasConnectedComponent() const
returns true if a connected component exists
Definition: entity.hh:517
const MMeshInterfaceEntity & hostEntity() const
returns the host entity
Definition: entity.hh:741
std::array< GlobalCoordinate, dim+1 > VertexStorage
define the type used for storage the vertices of a caching entity
Definition: entity.hh:410
void mark(int refCount) const
mark entity for refine or coarse
Definition: entity.hh:585
MMeshImpl::MultiId IdType
define the type used for persistent indices
Definition: entity.hh:401
const bool mightVanish() const
returns true if this entity will vanish after adaptation
Definition: entity.hh:573
void setWillVanish(bool mightVanish) const
set if this entity will vanish after adaptation
Definition: entity.hh:579
int getMark() const
get mark of entity
Definition: entity.hh:591
GeometryType type() const
returns the geometry type
Definition: entity.hh:735
IdType id() const
return cached id
Definition: entity.hh:753
auto father() const
returns the father entity
Definition: entity.hh:523
PartitionType partitionType() const
The partition type for parallel computing.
Definition: entity.hh:610
std::enable_if_t< cc==0, typename GridImp::template Codim< cc >::Entity > subEntity(std::size_t i) const
Provide access to sub entity i of given codimension. Entities are numbered 0 ... subEntities(cc)-1.
Definition: entity.hh:639
VertexStorage vertex_
the vertices of the host entity object of this entity (for caching entity)
Definition: entity.hh:786
The implementation of entities in a MMesh interface grid.
Definition: entity.hh:35
int level() const
level of this element
Definition: entity.hh:140
GridImp::template Codim< codim >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition: entity.hh:60
std::enable_if_t< cc==codim, typename GridImp::template Codim< cc >::Entity > subEntity(std::size_t i) const
Provide access to sub entity i for cc == dim.
Definition: entity.hh:165
GeometryType type() const
returns the geometry type
Definition: entity.hh:185
unsigned int subEntities(unsigned int cc) const
Return the number of subEntities of codimension codim.
Definition: entity.hh:152
bool hasConnectedComponent() const
returns true if connected component entity exists
Definition: entity.hh:129
auto incidentInterfaceVerticesBegin() const
First incident vertex.
Definition: entity.hh:269
auto incidentInterfaceVerticesEnd() const
Last incident vertex.
Definition: entity.hh:281
auto incidentInterfaceElementsEnd() const
Last incident element.
Definition: entity.hh:310
const GridImp & grid() const
returns the grid
Definition: entity.hh:342
std::enable_if_t< cc==codim+1, typename GridImp::template Codim< cc >::Entity > subEntity(std::size_t i) const
Provide access to sub entity i for cc == dim-1.
Definition: entity.hh:173
EntitySeed seed() const
Return entity seed.
Definition: entity.hh:134
bool isTip() const
Return if this vertex is a tip.
Definition: entity.hh:197
IdType id() const
Return id.
Definition: entity.hh:333
const MMeshInterfaceEntity & hostEntity() const
Return reference to the host entity.
Definition: entity.hh:327
bool isInterface() const
returns that entity is part of the interface
Definition: entity.hh:191
std::size_t insertionLevel() const
Return the insertion level of the vertex.
Definition: entity.hh:236
int boundaryFlag() const
Return boundary flag (-1 = not set, 0 = can be removed, 1 = important for domain boundary)
Definition: entity.hh:227
auto incidentVerticesBegin(bool includeInfinite) const
First incident vertex.
Definition: entity.hh:245
PartitionType partitionType() const
The partition type for parallel computing.
Definition: entity.hh:146
auto incidentInterfaceElementsBegin() const
First incident element.
Definition: entity.hh:293
Geometry geometry() const
geometry of this entity
Definition: entity.hh:179
auto incidentVerticesEnd(bool includeInfinite) const
Last incident vertex.
Definition: entity.hh:257
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition: hierarchiciterator.hh:24
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition: intersectioniterator.hh:30
EntityIterator< Grid::dimension, Grid, MMeshIncidentVerticesIteratorImp< Grid, Grid::dimensionworld > > MMeshIncidentVerticesIterator
The Incident Facets Iterator alias.
Definition: incidentiterator.hh:45
Some common helper methods.
The MMeshIncidentIterator class.
EntityIterator< 0, Grid, MMeshEdgeIncidentInterfaceElementsIteratorImp< Grid, Grid::dimension > > MMeshEdgeIncidentInterfaceElementsIterator
The Incident Interface Elements Iterator alias.
Definition: incidentiterator.hh:321
EntityIterator< Grid::dimension, Grid, MMeshIncidentInterfaceVerticesIteratorImp< Grid, Grid::dimension > > MMeshIncidentInterfaceVerticesIterator
The Incident Interface Vertices Iterator alias.
Definition: incidentiterator.hh:26
EntityIterator< 0, Grid, MMeshIncidentInterfaceElementsIteratorImp< Grid, Grid::dimension > > MMeshIncidentInterfaceElementsIterator
The Incident Interface Elements Iterator alias.
Definition: incidentiterator.hh:170
STL namespace.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 13, 22:42, 2025)