29 template<
class Gt,
class Cb>
37 for (
int i = 0; i < 4; i++)
39 Vertex_handle v = this->vertex(i);
42 tVGI[i] = globalDelaunayVertexIndices.
toGlobal 55 template<
class Gt,
class Cb>
64 template<
class Gt,
class Cb>
67 Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3
76 template<
class Gt,
class Cb>
89 Cb(v0, v1, v2, v3, n0, n1, n2, n3),
97 template<
class Gt,
class Cb>
104 template<
class Gt,
class Cb>
113 template<
class Gt,
class Cb>
116 return reinterpret_cast<const Foam::point&
>(this->circumcenter());
121 template<
class Gt,
class Cb>
124 const typename Gt::Point_3& P = this->circumcenter();
128 CGAL::to_double(P.x()),
129 CGAL::to_double(P.y()),
130 CGAL::to_double(P.z())
137 template<
class Gt,
class Cb>
140 return index_ == ctUnassigned;
144 template<
class Gt,
class Cb>
151 template<
class Gt,
class Cb>
158 template<
class Gt,
class Cb>
164 this->vertex(0)->
real()
165 || this->vertex(1)->
real()
166 || this->vertex(2)->
real()
167 || this->vertex(3)->
real()
171 this->vertex(0)->farPoint()
172 || this->vertex(1)->farPoint()
173 || this->vertex(2)->farPoint()
174 || this->vertex(3)->farPoint()
180 template<
class Gt,
class Cb>
185 this->vertex(0)->farPoint()
186 || this->vertex(1)->farPoint()
187 || this->vertex(2)->farPoint()
188 || this->vertex(3)->farPoint()
193 template<
class Gt,
class Cb>
198 this->vertex(0)->referred()
199 || this->vertex(1)->referred()
200 || this->vertex(2)->referred()
201 || this->vertex(3)->referred()
206 template<
class Gt,
class Cb>
211 this->vertex(0)->featurePoint()
212 || this->vertex(1)->featurePoint()
213 || this->vertex(2)->featurePoint()
214 || this->vertex(3)->featurePoint()
219 template<
class Gt,
class Cb>
224 this->vertex(0)->seedPoint()
225 || this->vertex(1)->seedPoint()
226 || this->vertex(2)->seedPoint()
227 || this->vertex(3)->seedPoint()
232 template<
class Gt,
class Cb>
237 this->vertex(0)->internalPoint()
238 || this->vertex(1)->internalPoint()
239 || this->vertex(2)->internalPoint()
240 || this->vertex(3)->internalPoint()
245 template<
class Gt,
class Cb>
250 this->vertex(0)->boundaryPoint()
251 || this->vertex(1)->boundaryPoint()
252 || this->vertex(2)->boundaryPoint()
253 || this->vertex(3)->boundaryPoint()
258 template<
class Gt,
class Cb>
263 this->vertex(0)->constrained()
264 || this->vertex(1)->constrained()
265 || this->vertex(2)->constrained()
266 || this->vertex(3)->constrained()
271 template<
class Gt,
class Cb>
279 this->vertex(0)->referred()
280 || this->vertex(1)->referred()
281 || this->vertex(2)->referred()
282 || this->vertex(3)->referred()
286 this->vertex(0)->
real()
287 || this->vertex(1)->
real()
288 || this->vertex(2)->
real()
295 template<
class Gt,
class Cb>
298 Foam::label lowestProc = -1;
300 for (
int i = 0; i < 4; ++i)
302 if (this->vertex(i)->referred())
304 lowestProc =
min(lowestProc, this->vertex(i)->procIndex());
312 template<
class Gt,
class Cb>
320 = unsortedVertexGlobalIndices(globalDelaunayVertexIndices);
323 for (
int i = 0; i < tVGI.
size(); i++)
325 for (
int j = tVGI.
size() - 1 ; j > i; j--)
327 if (tVGI[j - 1] > tVGI[j])
329 std::swap(tVGI[j - 1], tVGI[j]);
338 template<
class Gt,
class Cb>
347 = unsortedVertexGlobalIndices(globalDelaunayVertexIndices);
352 for (
int i = 0; i < tVGI.
size(); i++)
354 for (
int j = tVGI.
size() - 1 ; j > i; j--)
356 if (tVGI[j - 1] > tVGI[j])
358 std::swap(tVGI[j - 1], tVGI[j]);
359 std::swap(vertexMap[j - 1], vertexMap[j]);
364 for (
int i = 0; i < 4; i++)
366 tVGI[i] = vertexMap[i];
369 return std::move(tVGI);
373 template<
class Gt,
class Cb>
378 this->vertex(0)->internalOrBoundaryPoint()
379 || this->vertex(1)->internalOrBoundaryPoint()
380 || this->vertex(2)->internalOrBoundaryPoint()
381 || this->vertex(3)->internalOrBoundaryPoint()
386 template<
class Gt,
class Cb>
391 this->vertex(0)->internalOrBoundaryPoint()
392 || this->vertex(0)->externalBoundaryPoint()
393 || this->vertex(1)->internalOrBoundaryPoint()
394 || this->vertex(1)->externalBoundaryPoint()
395 || this->vertex(2)->internalOrBoundaryPoint()
396 || this->vertex(2)->externalBoundaryPoint()
397 || this->vertex(3)->internalOrBoundaryPoint()
398 || this->vertex(3)->externalBoundaryPoint()
403 template<
class Gt,
class Cb>
417 this->vertex(0)->internalBoundaryPoint()
418 || this->vertex(1)->internalBoundaryPoint()
419 || this->vertex(2)->internalBoundaryPoint()
420 || this->vertex(3)->internalBoundaryPoint()
423 this->vertex(0)->externalBoundaryPoint()
424 || this->vertex(1)->externalBoundaryPoint()
425 || this->vertex(2)->externalBoundaryPoint()
426 || this->vertex(3)->externalBoundaryPoint()
446 template<
class Gt,
class Cb>
452 this->vertex(0)->internalBaffleSurfacePoint()
453 || this->vertex(1)->internalBaffleSurfacePoint()
454 || this->vertex(2)->internalBaffleSurfacePoint()
455 || this->vertex(3)->internalBaffleSurfacePoint()
458 this->vertex(0)->externalBaffleSurfacePoint()
459 || this->vertex(1)->externalBaffleSurfacePoint()
460 || this->vertex(2)->externalBaffleSurfacePoint()
461 || this->vertex(3)->externalBaffleSurfacePoint()
467 template<
class Gt,
class Cb>
473 this->vertex(0)->internalBaffleEdgePoint()
474 || this->vertex(1)->internalBaffleEdgePoint()
475 || this->vertex(2)->internalBaffleEdgePoint()
476 || this->vertex(3)->internalBaffleEdgePoint()
479 this->vertex(0)->externalBaffleEdgePoint()
480 || this->vertex(1)->externalBaffleEdgePoint()
481 || this->vertex(2)->externalBaffleEdgePoint()
482 || this->vertex(3)->externalBaffleEdgePoint()
488 template<
class Gt,
class Cb>
493 this->vertex(0)->featureEdgePoint()
494 && this->vertex(1)->featureEdgePoint()
495 && this->vertex(2)->featureEdgePoint()
496 && this->vertex(3)->featureEdgePoint()
526 template<
class Gt,
class Cb>
531 this->vertex(0)->featurePoint()
532 && this->vertex(1)->featurePoint()
533 && this->vertex(2)->featurePoint()
534 && this->vertex(3)->featurePoint()
539 template<
class Gt,
class Cb>
544 this->vertex(0)->nearProcBoundary()
545 || this->vertex(1)->nearProcBoundary()
546 || this->vertex(2)->nearProcBoundary()
547 || this->vertex(3)->nearProcBoundary()
552 template<
class Gt,
class Cb>
555 Foam::label nMasters = 0;
556 Foam::label nSlaves = 0;
561 for (Foam::label i = 0; i < 4; ++i)
563 Vertex_handle v = this->vertex(i);
565 if (v->internalBoundaryPoint())
571 if (v->externalBoundaryPoint())
578 Foam::label nPairs = 0;
580 if (nMasters == 2 && nSlaves == 2)
587 vM[0]->
type() == vS[0]->index()
588 && vM[0]->index() == vS[0]->
type()
591 vp0 =
reinterpret_cast<const Foam::point&
>(vM[0]->point())
592 - reinterpret_cast<const Foam::point&>(vS[0]->
point());
597 vM[0]->
type() == vS[1]->index()
598 && vM[0]->index() == vS[1]->type()
601 vp0 =
reinterpret_cast<const Foam::point&
>(vM[0]->point())
602 - reinterpret_cast<const Foam::point&>(vS[1]->
point());
608 vM[1]->
type() == vS[0]->index()
609 && vM[1]->index() == vS[0]->type()
612 vp1 =
reinterpret_cast<const Foam::point&
>(vM[1]->point())
613 - reinterpret_cast<const Foam::point&>(vS[0]->
point());
618 vM[1]->
type() == vS[1]->index()
619 && vM[1]->index() == vS[1]->type()
622 vp1 =
reinterpret_cast<const Foam::point&
>(vM[1]->point())
623 - reinterpret_cast<const Foam::point&>(vS[1]->
point());
642 template<
class Gt,
class Cb>
645 int featureVertex = -1;
646 for (
int i = 0; i < 4; ++i)
648 if (this->vertex(i)->constrained())
656 if (featureVertex != -1)
659 this->vertex(Tds::vertex_triple_index(featureVertex, 0));
661 this->vertex(Tds::vertex_triple_index(featureVertex, 1));
663 this->vertex(Tds::vertex_triple_index(featureVertex, 2));
665 if (v1->internalBoundaryPoint())
669 v2->externalBoundaryPoint()
670 && v3->externalBoundaryPoint()
676 else if (v2->internalBoundaryPoint())
680 v1->externalBoundaryPoint()
681 && v3->externalBoundaryPoint()
687 else if (v3->internalBoundaryPoint())
691 v1->externalBoundaryPoint()
692 && v2->externalBoundaryPoint()
704 template<
class Gt,
class Cb>
707 int featureVertex = -1;
708 for (
int i = 0; i < 4; ++i)
710 if (this->vertex(i)->constrained())
718 if (featureVertex != -1)
721 this->vertex(Tds::vertex_triple_index(featureVertex, 0));
723 this->vertex(Tds::vertex_triple_index(featureVertex, 1));
725 this->vertex(Tds::vertex_triple_index(featureVertex, 2));
727 if (v1->externalBoundaryPoint())
731 v2->internalBoundaryPoint()
732 && v3->internalBoundaryPoint()
738 else if (v2->externalBoundaryPoint())
742 v1->internalBoundaryPoint()
743 && v3->internalBoundaryPoint()
749 else if (v3->externalBoundaryPoint())
753 v1->internalBoundaryPoint()
754 && v2->internalBoundaryPoint()
bool baffleSurfaceDualVertex() const
Foam::label vertexLowestProc() const
bool parallelDualVertex() const
Does the Dual vertex form part of a processor patch.
A 1D vector of objects of type <T> with a fixed length <N>.
Foam::label & cellIndex()
bool hasFarPoint() const
Does the Delaunay cell have a far point.
bool featurePointInternalCell() const
bool featureEdgeDualVertex() const
A dual vertex on a feature edge will result from this Delaunay cell.
Ostream & endl(Ostream &os)
Add newline and flush stream.
An indexed form of CGAL::Triangulation_cell_base_3<K> used to keep track of the Delaunay cells (tets)...
static int myProcNo(const label communicator=worldComm)
Number of this process (starting from masterNo() = 0)
bool baffleEdgeDualVertex() const
bool featurePointExternalCell() const
static constexpr label size() noexcept
Return the number of elements in the FixedList.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
bool anyInternalOrBoundaryDualVertex() const
Is the Delaunay cell real or referred (or mixed), i.e. all vertices.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
bool hasInternalPoint() const
bool hasConstrainedPoint() const
A tetrahedral cell primitive.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
bool hasBoundaryPoint() const
bool hasFeaturePoint() const
Does the Delaunay cell have a feature point.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
bool nearProcBoundary() const
bool potentialCoplanarCell() const
label toGlobal(const label i) const
From local to global index.
bool real() const
Is the Delaunay cell real, i.e. any real vertex.
vector point
Point is a vector.
Foam::FixedList< Foam::label, 4 > globallyOrderedCellVertices(const Foam::globalIndex &globalDelaunayVertexIndices) const
Using the globalIndex object, return a list of four vertices with.
bool featurePointDualVertex() const
A dual vertex on a feature point will result from this Delaunay cell.
bool hasSeedPoint() const
Does the Delaunay cell have a seed point.
bool hasReferredPoint() const
Does the Delaunay cell have a referred point.
bool internalOrBoundaryDualVertex() const
Is the Delaunay cell part of the final dual mesh, i.e. any vertex.
Foam::tetCell vertexGlobalIndices(const Foam::globalIndex &globalDelaunayVertexIndices) const
Using the globalIndex object, return a list of four (sorted) global.
bool boundaryDualVertex() const
A dual vertex on the boundary will result from a Delaunay cell with.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
static constexpr const zero Zero
Global zero (0)