Loading [MathJax]/jax/output/HTML-CSS/config.js

dune-mmesh (unstable)

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// External forward declarations
17template <class Grid>
18struct HostGridAccess;
19
20//**********************************************************************
21//
22// --MMeshInterfaceGridEntity
23// --Entity
24//
28template <int codim, int dim, class GridImp>
30#ifndef DOXYGEN_SHOULD_SKIP_THIS
31 : public EntityDefaultImplementation<codim, dim, GridImp,
32 MMeshInterfaceGridEntity>
33#endif /* DOXYGEN_SHOULD_SKIP_THIS */
34{
35 template <class GridImp_>
36 friend class MMeshInterfaceGridLeafIndexSet;
37
38 template <class GridImp_>
39 friend class MMeshInterfaceGridLocalIdSet;
40
41 template <class GridImp_>
42 friend class MMeshInterfaceGridGlobalIdSet;
43
44 friend struct HostGridAccess<typename std::remove_const<GridImp>::type>;
45
46 private:
47 typedef typename GridImp::ctype ctype;
48
49 // equivalent entity in the host grid
50 typedef typename GridImp::template MMeshInterfaceEntity<codim>
51 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
62 MMeshInterfaceGridEntity() : grid_(nullptr) {}
63
64 MMeshInterfaceGridEntity(const GridImp* grid,
65 const MMeshInterfaceEntity& hostEntity)
66 : hostEntity_(hostEntity), grid_(grid) {}
67
68 MMeshInterfaceGridEntity(const GridImp* grid,
69 MMeshInterfaceEntity&& hostEntity)
70 : hostEntity_(std::move(hostEntity)), grid_(grid) {}
71
72 MMeshInterfaceGridEntity(const MMeshInterfaceGridEntity& original)
73 : hostEntity_(original.hostEntity_), grid_(original.grid_) {}
74
75 MMeshInterfaceGridEntity(MMeshInterfaceGridEntity&& original)
76 : hostEntity_(std::move(original.hostEntity_)), grid_(original.grid_) {}
77
78 MMeshInterfaceGridEntity& operator=(
79 const MMeshInterfaceGridEntity& original) {
80 if (this != &original) {
81 grid_ = original.grid_;
82 hostEntity_ = original.hostEntity_;
83 }
84 return *this;
85 }
86
87 MMeshInterfaceGridEntity& operator=(MMeshInterfaceGridEntity&& original) {
88 if (this != &original) {
89 grid_ = original.grid_;
90 hostEntity_ = std::move(original.hostEntity_);
91 }
92 return *this;
93 }
94
95 // Comparator for vertices
96 template <int cc = codim>
97 std::enable_if_t<cc == dim, bool> equals(
98 const MMeshInterfaceGridEntity& other) const {
99 return hostEntity_ == other.hostEntity_;
100 }
101
102 // Comparator for edges
103 template <int cc = codim>
104 std::enable_if_t<cc == 1 && dim == 2, bool> equals(
105 const MMeshInterfaceGridEntity& other) const {
106 const auto& vh1 = hostEntity_.first->vertex(hostEntity_.second);
107 const auto& vh2 = hostEntity_.first->vertex(hostEntity_.third);
108 const auto& hostOther_ = other.hostEntity_;
109 const auto& vo1 = hostOther_.first->vertex(hostOther_.second);
110 const auto& vo2 = hostOther_.first->vertex(hostOther_.third);
111
112 return ((vh1 == vo1) && (vh2 == vo2)) || ((vh1 == vo2) && (vh2 == vo1));
113 }
114
116 bool hasConnectedComponent() const { return false; }
117
119 EntitySeed seed() const { return EntitySeed(hostEntity_); }
120
122 int level() const {
123 // we only have one level
124 return 0;
125 }
126
128 PartitionType partitionType() const {
129 return grid().getMMesh().partitionHelper().partitionType(
130 grid().entity(hostEntity_));
131 }
132
134 unsigned int subEntities(unsigned int cc) const {
135 if (dim == 1) return (cc == 0) ? 0 : 2;
136
137 if (dim == 2) return (cc == 0) ? 0 : 3;
138 }
139
142 template <int cc>
143 std::enable_if_t<cc == codim, typename GridImp::template Codim<cc>::Entity>
144 subEntity(std::size_t i) const {
145 return *this;
146 }
147
150 template <int cc>
151 std::enable_if_t<cc == codim + 1,
152 typename GridImp::template Codim<cc>::Entity>
153 subEntity(std::size_t i) const {
154 DUNE_THROW(NotImplemented, "subEntity<1> for codim 1 entity");
155 return typename GridImp::template Codim<cc>::Entity();
156 }
157
159 Geometry geometry() const { return Geometry(hostEntity_); }
160
162 GeometryType type() const { return GeometryTypes::simplex(dim - codim); }
163
165 bool isInterface() const { return true; }
166
168 bool isTip() const {
169 if constexpr (codim == dim) {
170 if constexpr (dim == 2)
171 return false;
172 else {
173 const auto& hostgrid = grid().getHostGrid();
174
175 int count = 0;
176 auto circulator = hostgrid.incident_edges(hostEntity_);
177 for (std::size_t i = 0; i < CGAL::circulator_size(circulator);
178 ++i, ++circulator) {
179 // at boundary
180 if (hostgrid.is_infinite(circulator)) return false;
181
182 if (grid().isInterface(*circulator)) count++;
183 }
184
185 return (count == 1);
186 }
187 } else
188 DUNE_THROW(NotImplemented, "isTip() for codim != dim");
189 };
190
193 int boundaryFlag() const {
194 if constexpr (codim == dim)
195 return hostEntity_->info().boundaryFlag;
196 else
197 DUNE_THROW(NotImplemented, "boundaryFlag() for codim != dim");
198 }
199
201 std::size_t insertionLevel() const {
202 if constexpr (codim == dim)
203 return hostEntity_->info().insertionLevel;
204 else
205 DUNE_THROW(NotImplemented, "boundaryFlag() for codim != dim");
206 }
207
209 auto incidentVerticesBegin(bool includeInfinite) const {
210 if constexpr (codim == dim) {
211 using Impl =
214 Impl(grid_, hostEntity_, includeInfinite));
215 } else
216 DUNE_THROW(NotImplemented, "incidentVerticesBegin() for codim != dim");
217 }
218
220 auto incidentVerticesEnd(bool includeInfinite) const {
221 if constexpr (codim == dim) {
222 using Impl =
225 Impl(grid_, hostEntity_, includeInfinite, true));
226 } else
227 DUNE_THROW(NotImplemented, "incidentVerticesEnd() for codim != dim");
228 }
229
232 if constexpr (codim == dim) {
233 using Impl = typename MMeshIncidentInterfaceVerticesIterator<
234 GridImp>::Implementation;
236 Impl(grid_, hostEntity_));
237 } else
238 DUNE_THROW(NotImplemented,
239 "incidentInterfaceVerticesBegin() for codim != dim");
240 }
241
244 if constexpr (codim == dim) {
245 using Impl = typename MMeshIncidentInterfaceVerticesIterator<
246 GridImp>::Implementation;
248 Impl(grid_, hostEntity_, true));
249 } else
250 DUNE_THROW(NotImplemented,
251 "incidentInterfaceVerticesEnd() for codim != dim");
252 }
253
256 if constexpr (codim == dim) {
257 using Impl = typename MMeshIncidentInterfaceElementsIterator<
258 GridImp>::Implementation;
260 Impl(grid_, hostEntity_));
261 } else if constexpr (codim == dim - 1) {
262 using Impl = typename MMeshEdgeIncidentInterfaceElementsIterator<
263 GridImp>::Implementation;
265 Impl(grid_, hostEntity_));
266 } else
267 DUNE_THROW(NotImplemented,
268 "incidentInterfaceElementsBegin() for codim <= dim-1");
269 }
270
273 if constexpr (codim == dim) {
274 using Impl = typename MMeshIncidentInterfaceElementsIterator<
275 GridImp>::Implementation;
277 Impl(grid_, hostEntity_, true));
278 } else if constexpr (codim == dim - 1) {
279 using Impl = typename MMeshEdgeIncidentInterfaceElementsIterator<
280 GridImp>::Implementation;
282 Impl(grid_, hostEntity_, true));
283 } else
284 DUNE_THROW(NotImplemented,
285 "incidentInterfaceElementsEnd() for codim != dim");
286 }
287
289 const MMeshInterfaceEntity& hostEntity() const { return hostEntity_; }
290
292 IdType id() const {
293 if constexpr (codim == dim)
294 return hostEntity_->info().id;
295 else
296 return grid().globalIdSet().id(*this);
297 }
298
300 const GridImp& grid() const { return *grid_; }
301
302 private:
304 MMeshInterfaceEntity hostEntity_;
305
307 const GridImp* grid_;
308};
309
310//***********************
311//
312// --MMeshInterfaceGridEntity
313//
314//***********************
322template <int dim, class GridImp>
323class MMeshInterfaceGridEntity<0, dim, GridImp>
324#ifndef DOXYGEN_SHOULD_SKIP_THIS
325 : public EntityDefaultImplementation<0, dim, GridImp,
326 MMeshInterfaceGridEntity>
327#endif /* DOXYGEN_SHOULD_SKIP_THIS */
328{
329 friend struct HostGridAccess<typename std::remove_const<GridImp>::type>;
330
331 typedef Entity<0, dim, GridImp, MMeshInterfaceGridEntity> EntityType;
332
333 public:
334 // equivalent entity in the host grid
335 typedef typename GridImp::template MMeshInterfaceEntity<0>
336 MMeshInterfaceEntity;
337
338 typedef typename GridImp::template MMeshInterfaceEntity<dim>
339 MMeshInterfaceVertex;
340
341 typedef typename GridImp::template Codim<0>::Geometry Geometry;
342
343 typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;
344
348
351
353 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
354
356 typedef typename GridImp::ConnectedComponent ConnectedComponent;
357
359 using IdType = MMeshImpl::MultiId;
360
361 // type of global coordinate
362 typedef typename Geometry::GlobalCoordinate GlobalCoordinate;
363
364 // type of local coordinate
365 typedef typename Geometry::LocalCoordinate LocalCoordinate;
366
368 using VertexStorage = std::array<GlobalCoordinate, dim + 1>;
369
370 MMeshInterfaceGridEntity() : grid_(nullptr), isLeaf_(true) {}
371
372 MMeshInterfaceGridEntity(const GridImp* grid,
373 const MMeshInterfaceEntity& hostEntity)
374 : hostEntity_(hostEntity), grid_(grid), isLeaf_(true) {
375 if (grid->canBeMirrored(hostEntity_)) {
376 const auto mirrored = grid_->mirrorHostEntity(hostEntity_);
377 if (hostEntity_.first->info().insertionIndex >
378 mirrored.first->info().insertionIndex)
379 hostEntity_ = mirrored;
380 }
381 }
382
383 MMeshInterfaceGridEntity(const GridImp* grid,
384 MMeshInterfaceEntity&& hostEntity)
385 : hostEntity_(std::move(hostEntity)), grid_(grid), isLeaf_(true) {
386 if (grid->canBeMirrored(hostEntity_)) {
387 const auto mirrored = grid_->mirrorHostEntity(hostEntity_);
388 if (hostEntity_.first->info().insertionIndex >
389 mirrored.first->info().insertionIndex)
390 hostEntity_ = mirrored;
391 }
392 }
393
394 MMeshInterfaceGridEntity(const GridImp* grid,
395 const MMeshInterfaceEntity& hostEntity,
396 const IdType& id)
397 : hostEntity_(hostEntity), id_(id), grid_(grid), isLeaf_(false) {}
398
399 MMeshInterfaceGridEntity(const GridImp* grid, const VertexStorage& vertex)
400 : id_(/*caching id*/ IdType({std::size_t(-3), std::size_t(-2)})),
401 grid_(grid),
402 isLeaf_(false),
403 vertex_(vertex) {}
404
405 MMeshInterfaceGridEntity(const MMeshInterfaceGridEntity& original)
406 : hostEntity_(original.hostEntity_),
407 id_(original.id_),
408 grid_(original.grid_),
409 isLeaf_(original.isLeaf_),
410 vertex_(original.vertex_) {}
411
412 MMeshInterfaceGridEntity(MMeshInterfaceGridEntity&& original)
413 : hostEntity_(std::move(original.hostEntity_)),
414 id_(original.id_),
415 grid_(original.grid_),
416 isLeaf_(original.isLeaf_),
417 vertex_(original.vertex_) {}
418
419 MMeshInterfaceGridEntity& operator=(
420 const MMeshInterfaceGridEntity& original) {
421 if (this != &original) {
422 grid_ = original.grid_;
423 hostEntity_ = original.hostEntity_;
424 isLeaf_ = original.isLeaf_;
425 id_ = original.id_;
426 vertex_ = original.vertex_;
427 }
428 return *this;
429 }
430
431 MMeshInterfaceGridEntity& operator=(MMeshInterfaceGridEntity&& original) {
432 if (this != &original) {
433 grid_ = original.grid_;
434 hostEntity_ = std::move(original.hostEntity_);
435 isLeaf_ = original.isLeaf_;
436 id_ = original.id_;
437 vertex_ = original.vertex_;
438 }
439 return *this;
440 }
441
442 // Comparator for edges
443 template <int d = dim>
444 std::enable_if_t<d == 1, bool> equals(
445 const MMeshInterfaceGridEntity& other) const {
446 return hostEntity_ == other.hostEntity_;
447 }
448
449 // Comparator for facets
450 template <int d = dim>
451 std::enable_if_t<d == 2, bool> equals(
452 const MMeshInterfaceGridEntity& other) const {
453 return hostEntity_ == other.hostEntity_;
454 }
455
457 bool operator==(const MMeshInterfaceGridEntity& other) const {
458 return this->equals(other);
459 }
460
462 bool operator<(const MMeshInterfaceGridEntity& other) const {
463 return hostEntity_ < other.hostEntity_;
464 }
465
468 return grid_->getConnectedComponent(*this);
469 }
470
473 return grid_->hasConnectedComponent(*this);
474 }
475
477 auto father() const {
478 DUNE_THROW(InvalidStateException,
479 "MMesh entities do no have a father, but a connectedComponent "
480 "instead!");
481 return *this;
482 }
483
485 bool hasFather() const { return false; }
486
487 void bindFather(const EntityType& father) const { father_ = &father; }
488
491 LocalGeometry geometryInFather() const {
492 if constexpr (dim != 1)
493 DUNE_THROW(NotImplemented, "geometryInFather() for dim != 1");
494 else {
495 assert(father_ != nullptr);
496
497 auto thisPoints = this->vertex_;
498
499 if (isLeaf_)
500 for (int i = 0; i < 2; ++i) thisPoints[i] = geometry().corner(i);
501
502 std::array<LocalCoordinate, 2> local;
503 for (int i = 0; i < 2; ++i)
504 local[i] = father_->impl().geometry().local(thisPoints[i]);
505
506 return LocalGeometry(local);
507 }
508 }
509
511 const bool isNew() const { return hasConnectedComponent(); }
512
514 void setIsNew(bool isNew) const {}
515
517 const bool mightVanish() const {
518 return hostEntity_.first->info().mightVanish;
519 }
520
522 void setWillVanish(bool mightVanish) const {
523 hostEntity_.first->info().mightVanish = mightVanish;
524 }
525
527 void mark(int refCount) const { hostEntity_.first->info().mark = refCount; }
528
530 int getMark() const { return hostEntity_.first->info().mark; }
531
533 EntitySeed seed() const { return EntitySeed(hostEntity_); }
534
536 int level() const {
537 // we only have one level
538 return 0;
539 }
540
542 PartitionType partitionType() const {
543 return grid().getMMesh().partitionHelper().partitionType(
544 grid().entity(hostEntity_));
545 }
546
548 Geometry geometry() const {
549 if (isLeaf_)
550 return Geometry(hostEntity_);
551 else
552 return Geometry(this->vertex_);
553 }
554
556 std::size_t subEntities(std::size_t cc) const {
557 if (dim == 1) return (cc == 0) ? 1 : 2;
558
559 if (dim == 2) return (cc == 0) ? 1 : 3;
560 }
561
565 template <int cc>
566 std::enable_if_t<cc == 0, typename GridImp::template Codim<cc>::Entity>
567 subEntity(std::size_t i) const {
568 return *this;
569 }
570
574 template <int cc>
575 std::enable_if_t<cc == dim, typename GridImp::template Codim<cc>::Entity>
576 subEntity(std::size_t i) const {
577 assert(i < subEntities(cc));
578
579 auto cgalIndex =
580 MMeshInterfaceImpl::computeCGALIndices<MMeshInterfaceEntity, dim>(
581 hostEntity_);
583 grid_, hostEntity_.first->vertex(cgalIndex[i]));
584 }
585
589 template <int cc>
590 std::enable_if_t<cc == 1 && dim == 2,
591 typename GridImp::template Codim<cc>::Entity>
592 subEntity(std::size_t i) const {
593 assert(i < subEntities(cc));
594
595 auto cgalIndex =
596 MMeshInterfaceImpl::computeCGALIndices<MMeshInterfaceEntity, dim>(
597 hostEntity_);
598 auto cell = hostEntity_.first;
599
600 int v1 = cgalIndex[i == 2 ? 1 : 0];
601 int v2 = cgalIndex[i == 0 ? 1 : 2];
602
604 grid_, CGAL::Triple<decltype(cell), int, int>(cell, v1, v2));
605 }
606
610 hostEntity_);
611 }
612
616 grid_, hostEntity_, true);
617 }
618
621 return ileafbegin();
622 }
623
625 return ileafend();
626 }
627
631 maxlevel);
632 }
633
636 return MMeshInterfaceGridHierarchicIterator<GridImp>(grid_, *this, maxlevel,
637 true);
638 }
639
641 bool isLeaf() const { return isLeaf_ && !isNew(); }
642
644 bool wasRefined() const { return false; }
645
647 bool mightBeCoarsened() const { return false; }
648
650 GeometryType type() const { return GeometryTypes::simplex(dim); }
651
653 const MMeshInterfaceEntity& hostEntity() const { return hostEntity_; }
654
656 const GridImp& grid() const { return *grid_; }
657
659 IdType id() const {
660 // cache id
661 if (id_ == IdType()) {
662 typename IdType::VT idlist(dim + 1);
663 for (std::size_t i = 0; i < this->subEntities(dim); ++i)
664 if (grid_->canBeMirrored(hostEntity_))
665 idlist[i] = this->subEntity<dim>(i).impl().hostEntity()->info().id;
666 else
667 idlist[i] = -i;
668 std::sort(idlist.begin(), idlist.end());
669 id_ = IdType(idlist);
670 }
671
672 return id_;
673 }
674
675 private:
677 MMeshInterfaceEntity hostEntity_;
678
680 mutable IdType id_;
681
683 const GridImp* grid_;
684
686 bool isLeaf_;
687
688 protected:
691
692 mutable const EntityType* father_;
693
694}; // end of MMeshInterfaceGridEntity codim = 0
695
696} // namespace Dune
697
698#endif
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition: hierarchiciterator.hh:22
std::array< GlobalCoordinate, dim+1 > VertexStorage
define the type used for storage the vertices of a caching entity
Definition: entity.hh:368
const GridImp & grid() const
returns the host entity
Definition: entity.hh:656
bool isLeaf() const
returns true if Entity has no children
Definition: entity.hh:641
const bool isNew() const
returns true if this entity is new after adaptation
Definition: entity.hh:511
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The type of the EntitySeed interface class.
Definition: entity.hh:353
MMeshInterfaceGridHierarchicIterator< GridImp > hend(int maxlevel) const
Reference to one past the last hierarchic entity.
Definition: entity.hh:635
GridImp::ConnectedComponent ConnectedComponent
The type of the connected component.
Definition: entity.hh:356
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:576
LocalGeometry geometryInFather() const
Definition: entity.hh:491
std::size_t subEntities(std::size_t cc) const
Return the number of subEntities of codimension cc.
Definition: entity.hh:556
MMeshInterfaceGridLeafIntersectionIterator< GridImp > ileafbegin() const
First leaf intersection.
Definition: entity.hh:608
const ConnectedComponent & connectedComponent() const
returns the connected component
Definition: entity.hh:467
void setIsNew(bool isNew) const
set if this entity is new after adaptation
Definition: entity.hh:514
bool wasRefined() const
returns if grid was refined
Definition: entity.hh:644
int level() const
Level of this element.
Definition: entity.hh:536
EntitySeed seed() const
Create EntitySeed.
Definition: entity.hh:533
bool operator<(const MMeshInterfaceGridEntity &other) const
returns true if host entities are equal
Definition: entity.hh:462
MMeshInterfaceGridLeafIntersectionIterator< GridImp > ilevelbegin() const
We only have one level.
Definition: entity.hh:620
bool operator==(const MMeshInterfaceGridEntity &other) const
returns true if host entities are equal
Definition: entity.hh:457
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:592
bool mightBeCoarsened() const
returns if grid might be coarsened
Definition: entity.hh:647
MMeshInterfaceGridLeafIntersectionIterator< GridImp > ileafend() const
Reference to one past the last leaf intersection.
Definition: entity.hh:614
MMeshInterfaceGridHierarchicIterator< GridImp > hbegin(int maxlevel) const
First hierarchic entity, i.e. this entity, because we only have one level.
Definition: entity.hh:629
bool hasFather() const
returns true if father entity exists
Definition: entity.hh:485
Geometry geometry() const
Geometry of this entity.
Definition: entity.hh:548
bool hasConnectedComponent() const
returns true if a connected component exists
Definition: entity.hh:472
const MMeshInterfaceEntity & hostEntity() const
returns the host entity
Definition: entity.hh:653
void mark(int refCount) const
mark entity for refine or coarse
Definition: entity.hh:527
MMeshImpl::MultiId IdType
define the type used for persistent indices
Definition: entity.hh:359
const bool mightVanish() const
returns true if this entity will vanish after adaptation
Definition: entity.hh:517
void setWillVanish(bool mightVanish) const
set if this entity will vanish after adaptation
Definition: entity.hh:522
int getMark() const
get mark of entity
Definition: entity.hh:530
GeometryType type() const
returns the geometry type
Definition: entity.hh:650
IdType id() const
return cached id
Definition: entity.hh:659
auto father() const
returns the father entity
Definition: entity.hh:477
PartitionType partitionType() const
The partition type for parallel computing.
Definition: entity.hh:542
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:567
VertexStorage vertex_
the vertices of the host entity object of this entity (for caching entity)
Definition: entity.hh:690
The implementation of entities in a MMesh interface grid.
Definition: entity.hh:34
int level() const
level of this element
Definition: entity.hh:122
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:144
GeometryType type() const
returns the geometry type
Definition: entity.hh:162
unsigned int subEntities(unsigned int cc) const
Return the number of subEntities of codimension codim.
Definition: entity.hh:134
bool hasConnectedComponent() const
returns true if connected component entity exists
Definition: entity.hh:116
auto incidentInterfaceVerticesBegin() const
First incident vertex.
Definition: entity.hh:231
auto incidentInterfaceVerticesEnd() const
Last incident vertex.
Definition: entity.hh:243
auto incidentInterfaceElementsEnd() const
Last incident element.
Definition: entity.hh:272
const GridImp & grid() const
returns the grid
Definition: entity.hh:300
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:153
EntitySeed seed() const
Return entity seed.
Definition: entity.hh:119
bool isTip() const
Return if this vertex is a tip.
Definition: entity.hh:168
IdType id() const
Return id.
Definition: entity.hh:292
const MMeshInterfaceEntity & hostEntity() const
Return reference to the host entity.
Definition: entity.hh:289
bool isInterface() const
returns that entity is part of the interface
Definition: entity.hh:165
std::size_t insertionLevel() const
Return the insertion level of the vertex.
Definition: entity.hh:201
int boundaryFlag() const
Definition: entity.hh:193
auto incidentVerticesBegin(bool includeInfinite) const
First incident vertex.
Definition: entity.hh:209
PartitionType partitionType() const
The partition type for parallel computing.
Definition: entity.hh:128
auto incidentInterfaceElementsBegin() const
First incident element.
Definition: entity.hh:255
Geometry geometry() const
geometry of this entity
Definition: entity.hh:159
auto incidentVerticesEnd(bool includeInfinite) const
Last incident vertex.
Definition: entity.hh:220
Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
Definition: hierarchiciterator.hh:22
Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
Definition: intersectioniterator.hh:28
EntityIterator< Grid::dimension, Grid, MMeshIncidentVerticesIteratorImp< Grid, Grid::dimensionworld > > MMeshIncidentVerticesIterator
The Incident Facets Iterator alias.
Definition: incidentiterator.hh:51
Some common helper methods.
The MMeshIncidentIterator class.
EntityIterator< Grid::dimension, Grid, MMeshIncidentInterfaceVerticesIteratorImp< Grid, Grid::dimension > > MMeshIncidentInterfaceVerticesIterator
The Incident Interface Vertices Iterator alias.
Definition: incidentiterator.hh:27
EntityIterator< 0, Grid, MMeshIncidentInterfaceElementsIteratorImp< Grid, Grid::dimension > > MMeshIncidentInterfaceElementsIterator
The Incident Interface Elements Iterator alias.
Definition: incidentiterator.hh:163
EntityIterator< 0, Grid, MMeshEdgeIncidentInterfaceElementsIteratorImp< Grid, Grid::dimension > > MMeshEdgeIncidentInterfaceElementsIterator
The Incident Interface Elements Iterator alias.
Definition: incidentiterator.hh:307
STL namespace.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Mar 17, 23:30, 2025)