featurePointConformerSpecialisations.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2012-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
29#include "vectorTools.H"
32#include "pointConversion.H"
33
34using namespace Foam::vectorTools;
35
36// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
37
38bool Foam::featurePointConformer::createSpecialisedFeaturePoint
39(
40 const extendedFeatureEdgeMesh& feMesh,
41 const labelList& pEds,
42 const pointFeatureEdgesTypes& pFEdgesTypes,
44 const label ptI,
46) const
47{
48 if
49 (
52 )
53 {
54 return false;
55 }
56
57 if
58 (
59 pFEdgesTypes[extendedFeatureEdgeMesh::EXTERNAL] == 2
60 && pFEdgesTypes[extendedFeatureEdgeMesh::INTERNAL] == 1
61 && pEds.size() == 3
62 )
63 {
64 if (debug) Info<< "nExternal == 2 && nInternal == 1" << endl;
65
66 const Foam::point& featPt = feMesh.points()[ptI];
67
68 if
69 (
71 && !foamyHexMesh_.decomposition().positionOnThisProcessor(featPt)
72 )
73 {
74 return false;
75 }
76
77 label nVert = foamyHexMesh_.number_of_vertices();
78
79 const label initialNumOfPoints = pts.size();
80
81 const scalar ppDist = foamyHexMesh_.pointPairDistance(featPt);
82
83 const vectorField& normals = feMesh.normals();
84
85 const labelListList& edgeNormals = feMesh.edgeNormals();
86
87 label concaveEdgeI = -1;
88 labelList convexEdgesI(2, label(-1));
89 label nConvex = 0;
90
91 forAll(pEds, i)
92 {
93 const extendedFeatureEdgeMesh::edgeStatus& eS = allEdStat[i];
94
96 {
97 concaveEdgeI = pEds[i];
98 }
100 {
101 convexEdgesI[nConvex++] = pEds[i];
102 }
103 else if (eS == extendedFeatureEdgeMesh::FLAT)
104 {
106 << "Edge " << eS << " is flat"
107 << endl;
108 }
109 else
110 {
112 << "Edge " << eS << " not concave/convex"
113 << exit(FatalError);
114 }
115 }
116
117 const vector& concaveEdgePlaneANormal =
118 normals[edgeNormals[concaveEdgeI][0]];
119
120 const vector& concaveEdgePlaneBNormal =
121 normals[edgeNormals[concaveEdgeI][1]];
122
123 // Intersect planes parallel to the concave edge planes offset
124 // by ppDist and the plane defined by featPt and the edge vector.
125 plane planeA
126 (
127 featPt + ppDist*concaveEdgePlaneANormal,
128 concaveEdgePlaneANormal
129 );
130
131 plane planeB
132 (
133 featPt + ppDist*concaveEdgePlaneBNormal,
134 concaveEdgePlaneBNormal
135 );
136
137 const vector& concaveEdgeDir = feMesh.edgeDirection
138 (
139 concaveEdgeI,
140 ptI
141 );
142
143 // Todo,needed later but want to get rid of this.
144 const Foam::point concaveEdgeLocalFeatPt =
145 featPt + ppDist*concaveEdgeDir;
146
147 // Finding the nearest point on the intersecting line to the edge
148 // point. Floating point errors often occur using planePlaneIntersect
149
150 plane planeF(concaveEdgeLocalFeatPt, concaveEdgeDir);
151
152 const Foam::point concaveEdgeExternalPt = planeF.planePlaneIntersect
153 (
154 planeA,
155 planeB
156 );
157
158 // Redefine planes to be on the feature surfaces to project through
159
160 planeA = plane(featPt, concaveEdgePlaneANormal);
161
162 planeB = plane(featPt, concaveEdgePlaneBNormal);
163
164 const Foam::point internalPtA =
165 concaveEdgeExternalPt
166 - 2.0*planeA.distance(concaveEdgeExternalPt)
167 *concaveEdgePlaneANormal;
168
169 pts.append
170 (
171 Vb
172 (
173 internalPtA,
174 foamyHexMesh_.vertexCount() + pts.size(),
177 )
178 );
179
180 const label internalPtAIndex(pts.last().index());
181
182 const Foam::point internalPtB =
183 concaveEdgeExternalPt
184 - 2.0*planeB.distance(concaveEdgeExternalPt)
185 *concaveEdgePlaneBNormal;
186
187 pts.append
188 (
189 Vb
190 (
191 internalPtB,
192 foamyHexMesh_.vertexCount() + pts.size(),
195 )
196 );
197
198 const label internalPtBIndex(pts.last().index());
199
200 // Add the external points
201
202 Foam::point externalPtD;
203 Foam::point externalPtE;
204
205 vector convexEdgePlaneCNormal(Zero);
206 vector convexEdgePlaneDNormal(Zero);
207
208 const labelList& concaveEdgeNormals = edgeNormals[concaveEdgeI];
209 const labelList& convexEdgeANormals = edgeNormals[convexEdgesI[0]];
210 const labelList& convexEdgeBNormals = edgeNormals[convexEdgesI[1]];
211
212 forAll(concaveEdgeNormals, edgeNormalI)
213 {
214 bool convexEdgeA = false;
215 bool convexEdgeB = false;
216
217 forAll(convexEdgeANormals, edgeAnormalI)
218 {
219 const vector& concaveNormal
220 = normals[concaveEdgeNormals[edgeNormalI]];
221 const vector& convexNormal
222 = normals[convexEdgeANormals[edgeAnormalI]];
223
224 if (debug)
225 {
226 Info<< "Angle between vectors = "
227 << degAngleBetween(concaveNormal, convexNormal) << endl;
228 }
229
230 // Need a looser tolerance, because sometimes adjacent triangles
231 // on the same surface will be slightly out of alignment.
232 if (areParallel(concaveNormal, convexNormal, tolParallel))
233 {
234 convexEdgeA = true;
235 }
236 }
237
238 forAll(convexEdgeBNormals, edgeBnormalI)
239 {
240 const vector& concaveNormal
241 = normals[concaveEdgeNormals[edgeNormalI]];
242 const vector& convexNormal
243 = normals[convexEdgeBNormals[edgeBnormalI]];
244
245 if (debug)
246 {
247 Info<< "Angle between vectors = "
248 << degAngleBetween(concaveNormal, convexNormal) << endl;
249 }
250
251 // Need a looser tolerance, because sometimes adjacent triangles
252 // on the same surface will be slightly out of alignment.
253 if (areParallel(concaveNormal, convexNormal, tolParallel))
254 {
255 convexEdgeB = true;
256 }
257 }
258
259 if ((convexEdgeA && convexEdgeB) || (!convexEdgeA && !convexEdgeB))
260 {
262 << "Both or neither of the convex edges share the concave "
263 << "edge's normal."
264 << " convexEdgeA = " << convexEdgeA
265 << " convexEdgeB = " << convexEdgeB
266 << endl;
267
268 // Remove points that have just been added before returning
269 for (label i = 0; i < 2; ++i)
270 {
271 pts.remove();
272 nVert--;
273 }
274
275 return false;
276 }
277
278 if (convexEdgeA)
279 {
280 forAll(convexEdgeANormals, edgeAnormalI)
281 {
282 const vector& concaveNormal
283 = normals[concaveEdgeNormals[edgeNormalI]];
284 const vector& convexNormal
285 = normals[convexEdgeANormals[edgeAnormalI]];
286
287 if
288 (
289 !areParallel(concaveNormal, convexNormal, tolParallel)
290 )
291 {
292 convexEdgePlaneCNormal = convexNormal;
293
294 plane planeC(featPt, convexEdgePlaneCNormal);
295
296 externalPtD =
297 internalPtA
298 + 2.0*planeC.distance(internalPtA)
299 *convexEdgePlaneCNormal;
300
301 pts.append
302 (
303 Vb
304 (
305 externalPtD,
306 foamyHexMesh_.vertexCount() + pts.size(),
309 )
310 );
311
312 ftPtPairs_.addPointPair
313 (
314 internalPtAIndex,
315 pts.last().index()
316 );
317 }
318 }
319 }
320
321 if (convexEdgeB)
322 {
323 forAll(convexEdgeBNormals, edgeBnormalI)
324 {
325 const vector& concaveNormal
326 = normals[concaveEdgeNormals[edgeNormalI]];
327 const vector& convexNormal
328 = normals[convexEdgeBNormals[edgeBnormalI]];
329
330 if
331 (
332 !areParallel(concaveNormal, convexNormal, tolParallel)
333 )
334 {
335 convexEdgePlaneDNormal = convexNormal;
336
337 plane planeD(featPt, convexEdgePlaneDNormal);
338
339 externalPtE =
340 internalPtB
341 + 2.0*planeD.distance(internalPtB)
342 *convexEdgePlaneDNormal;
343
344 pts.append
345 (
346 Vb
347 (
348 externalPtE,
349 foamyHexMesh_.vertexCount() + pts.size(),
352 )
353 );
354
355 ftPtPairs_.addPointPair
356 (
357 internalPtBIndex,
358 pts.last().index()
359 );
360 }
361 }
362 }
363 }
364
365 pts.append
366 (
367 Vb
368 (
369 concaveEdgeExternalPt,
370 foamyHexMesh_.vertexCount() + pts.size(),
373 )
374 );
375
376 ftPtPairs_.addPointPair
377 (
378 internalPtBIndex,
379 pts.last().index()
380 );
381
382 ftPtPairs_.addPointPair
383 (
384 internalPtAIndex,
385 pts.last().index()
386 );
387
388 const label concaveEdgeExternalPtIndex(pts.last().index());
389
390 const scalar totalAngle = radToDeg
391 (
393 + radAngleBetween(concaveEdgePlaneANormal, concaveEdgePlaneBNormal)
394 );
395
396 if (totalAngle > foamyHexMeshControls_.maxQuadAngle())
397 {
398 // Add additional mitreing points
399 //scalar angleSign = 1.0;
400
401
402 vector convexEdgesPlaneNormal =
403 0.5*(convexEdgePlaneCNormal + convexEdgePlaneDNormal);
404
405 plane planeM(featPt, convexEdgesPlaneNormal);
406
407// if
408// (
409// geometryToConformTo_.outside
410// (
411// featPt - convexEdgesPlaneNormal*ppDist
412// )
413// )
414// {
415// angleSign = -1.0;
416// }
417
418// scalar phi =
419// angleSign*acos(concaveEdgeDir & -convexEdgesPlaneNormal);
420//
421// scalar guard =
422// (
423// 1.0 + sin(phi)*ppDist/mag
424// (
425// concaveEdgeLocalFeatPt - concaveEdgeExternalPt
426// )
427// )/cos(phi) - 1.0;
428
429 const Foam::point internalPtF =
430 concaveEdgeExternalPt
431 //+ (2.0 + guard)*(concaveEdgeLocalFeatPt - concaveEdgeExternalPt);
432 + 2.0*(concaveEdgeLocalFeatPt - concaveEdgeExternalPt);
433
434 pts.append
435 (
436 Vb
437 (
438 internalPtF,
439 foamyHexMesh_.vertexCount() + pts.size(),
442 )
443 );
444
445 const label internalPtFIndex(pts.last().index());
446
447 ftPtPairs_.addPointPair
448 (
449 concaveEdgeExternalPtIndex,
450 pts.last().index()
451 );
452
453 const Foam::point externalPtG =
454 internalPtF
455 + 2.0*planeM.distance(internalPtF)*convexEdgesPlaneNormal;
456
457 pts.append
458 (
459 Vb
460 (
461 externalPtG,
462 foamyHexMesh_.vertexCount() + pts.size(),
465 )
466 );
467
468 ftPtPairs_.addPointPair
469 (
470 internalPtFIndex,
471 pts.last().index()
472 );
473 }
474
475 if (debug)
476 {
477 for (label ptI = initialNumOfPoints; ptI < pts.size(); ++ptI)
478 {
479 Info<< "Point " << ptI << " : ";
481 }
482 }
483
484 return true;
485 }
486 else if
487 (
488 pFEdgesTypes[extendedFeatureEdgeMesh::EXTERNAL] == 1
489 && pFEdgesTypes[extendedFeatureEdgeMesh::INTERNAL] == 2
490 && pEds.size() == 3
491 )
492 {
493 if (debug)
494 {
495 Info<< "nExternal == 1 && nInternal == 2" << endl;
496 }
497
498 const Foam::point& featPt = feMesh.points()[ptI];
499
500 if
501 (
503 && !foamyHexMesh_.decomposition().positionOnThisProcessor(featPt)
504 )
505 {
506 return false;
507 }
508
509 label nVert = foamyHexMesh_.number_of_vertices();
510
511 const label initialNumOfPoints = pts.size();
512
513 const scalar ppDist = foamyHexMesh_.pointPairDistance(featPt);
514
515 const vectorField& normals = feMesh.normals();
516
517 const labelListList& edgeNormals = feMesh.edgeNormals();
518
519 label convexEdgeI = -1;
520 labelList concaveEdgesI(2, label(-1));
521 label nConcave = 0;
522
523 forAll(pEds, i)
524 {
525 const extendedFeatureEdgeMesh::edgeStatus& eS = allEdStat[i];
526
528 {
529 convexEdgeI = pEds[i];
530 }
532 {
533 concaveEdgesI[nConcave++] = pEds[i];
534 }
535 else if (eS == extendedFeatureEdgeMesh::FLAT)
536 {
538 << "Edge " << eS << " is flat"
539 << endl;
540 }
541 else
542 {
544 << "Edge " << eS << " not concave/convex"
545 << exit(FatalError);
546 }
547 }
548
549 const vector& convexEdgePlaneANormal =
550 normals[edgeNormals[convexEdgeI][0]];
551
552 const vector& convexEdgePlaneBNormal =
553 normals[edgeNormals[convexEdgeI][1]];
554
555 // Intersect planes parallel to the concave edge planes offset
556 // by ppDist and the plane defined by featPt and the edge vector.
557 plane planeA
558 (
559 featPt - ppDist*convexEdgePlaneANormal,
560 convexEdgePlaneANormal
561 );
562
563 plane planeB
564 (
565 featPt - ppDist*convexEdgePlaneBNormal,
566 convexEdgePlaneBNormal
567 );
568
569 const vector& convexEdgeDir = feMesh.edgeDirection
570 (
571 convexEdgeI,
572 ptI
573 );
574
575 // Todo,needed later but want to get rid of this.
576 const Foam::point convexEdgeLocalFeatPt =
577 featPt + ppDist*convexEdgeDir;
578
579 // Finding the nearest point on the intersecting line to the edge
580 // point. Floating point errors often occur using planePlaneIntersect
581
582 plane planeF(convexEdgeLocalFeatPt, convexEdgeDir);
583
584 const Foam::point convexEdgeExternalPt = planeF.planePlaneIntersect
585 (
586 planeA,
587 planeB
588 );
589
590 // Redefine planes to be on the feature surfaces to project through
591
592 planeA = plane(featPt, convexEdgePlaneANormal);
593
594 planeB = plane(featPt, convexEdgePlaneBNormal);
595
596 const Foam::point internalPtA =
597 convexEdgeExternalPt
598 + 2.0*planeA.distance(convexEdgeExternalPt)
599 *convexEdgePlaneANormal;
600
601 pts.append
602 (
603 Vb
604 (
605 internalPtA,
606 foamyHexMesh_.vertexCount() + pts.size(),
609 )
610 );
611
612 const label internalPtAIndex(pts.last().index());
613
614 const Foam::point internalPtB =
615 convexEdgeExternalPt
616 + 2.0*planeB.distance(convexEdgeExternalPt)
617 *convexEdgePlaneBNormal;
618
619 pts.append
620 (
621 Vb
622 (
623 internalPtB,
624 foamyHexMesh_.vertexCount() + pts.size(),
627 )
628 );
629
630 const label internalPtBIndex(pts.last().index());
631
632 // Add the internal points
633
634 Foam::point externalPtD;
635 Foam::point externalPtE;
636
637 vector concaveEdgePlaneCNormal(Zero);
638 vector concaveEdgePlaneDNormal(Zero);
639
640 const labelList& convexEdgeNormals = edgeNormals[convexEdgeI];
641 const labelList& concaveEdgeANormals = edgeNormals[concaveEdgesI[0]];
642 const labelList& concaveEdgeBNormals = edgeNormals[concaveEdgesI[1]];
643
644 forAll(convexEdgeNormals, edgeNormalI)
645 {
646 bool concaveEdgeA = false;
647 bool concaveEdgeB = false;
648
649 forAll(concaveEdgeANormals, edgeAnormalI)
650 {
651 const vector& convexNormal
652 = normals[convexEdgeNormals[edgeNormalI]];
653 const vector& concaveNormal
654 = normals[concaveEdgeANormals[edgeAnormalI]];
655
656 if (debug)
657 {
658 Info<< "Angle between vectors = "
659 << degAngleBetween(convexNormal, concaveNormal) << endl;
660 }
661
662 // Need a looser tolerance, because sometimes adjacent triangles
663 // on the same surface will be slightly out of alignment.
664 if (areParallel(convexNormal, concaveNormal, tolParallel))
665 {
666 concaveEdgeA = true;
667 }
668 }
669
670 forAll(concaveEdgeBNormals, edgeBnormalI)
671 {
672 const vector& convexNormal
673 = normals[convexEdgeNormals[edgeNormalI]];
674 const vector& concaveNormal
675 = normals[concaveEdgeBNormals[edgeBnormalI]];
676
677 if (debug)
678 {
679 Info<< "Angle between vectors = "
680 << degAngleBetween(convexNormal, concaveNormal) << endl;
681 }
682
683 // Need a looser tolerance, because sometimes adjacent triangles
684 // on the same surface will be slightly out of alignment.
685 if (areParallel(convexNormal, concaveNormal, tolParallel))
686 {
687 concaveEdgeB = true;
688 }
689 }
690
691 if
692 (
693 (concaveEdgeA && concaveEdgeB)
694 || (!concaveEdgeA && !concaveEdgeB)
695 )
696 {
698 << "Both or neither of the concave edges share the convex "
699 << "edge's normal."
700 << " concaveEdgeA = " << concaveEdgeA
701 << " concaveEdgeB = " << concaveEdgeB
702 << endl;
703
704 // Remove points that have just been added before returning
705 for (label i = 0; i < 2; ++i)
706 {
707 pts.remove();
708 nVert--;
709 }
710
711 return false;
712 }
713
714 if (concaveEdgeA)
715 {
716 forAll(concaveEdgeANormals, edgeAnormalI)
717 {
718 const vector& convexNormal
719 = normals[convexEdgeNormals[edgeNormalI]];
720 const vector& concaveNormal
721 = normals[concaveEdgeANormals[edgeAnormalI]];
722
723 if
724 (
725 !areParallel(convexNormal, concaveNormal, tolParallel)
726 )
727 {
728 concaveEdgePlaneCNormal = concaveNormal;
729
730 plane planeC(featPt, concaveEdgePlaneCNormal);
731
732 externalPtD =
733 internalPtA
734 - 2.0*planeC.distance(internalPtA)
735 *concaveEdgePlaneCNormal;
736
737 pts.append
738 (
739 Vb
740 (
741 externalPtD,
742 foamyHexMesh_.vertexCount() + pts.size(),
745 )
746 );
747
748 ftPtPairs_.addPointPair
749 (
750 internalPtAIndex,
751 pts.last().index()
752 );
753 }
754 }
755 }
756
757 if (concaveEdgeB)
758 {
759 forAll(concaveEdgeBNormals, edgeBnormalI)
760 {
761 const vector& convexNormal
762 = normals[convexEdgeNormals[edgeNormalI]];
763 const vector& concaveNormal
764 = normals[concaveEdgeBNormals[edgeBnormalI]];
765
766 if
767 (
768 !areParallel(convexNormal, concaveNormal, tolParallel)
769 )
770 {
771 concaveEdgePlaneDNormal = concaveNormal;
772
773 plane planeD(featPt, concaveEdgePlaneDNormal);
774
775 externalPtE =
776 internalPtB
777 - 2.0*planeD.distance(internalPtB)
778 *concaveEdgePlaneDNormal;
779
780 pts.append
781 (
782 Vb
783 (
784 externalPtE,
785 foamyHexMesh_.vertexCount() + pts.size(),
788 )
789 );
790
791 ftPtPairs_.addPointPair
792 (
793 internalPtBIndex,
794 pts.last().index()
795 );
796 }
797 }
798 }
799 }
800
801 pts.append
802 (
803 Vb
804 (
805 convexEdgeExternalPt,
806 foamyHexMesh_.vertexCount() + pts.size(),
809 )
810 );
811
812 ftPtPairs_.addPointPair
813 (
814 internalPtBIndex,
815 pts.last().index()
816 );
817
818 ftPtPairs_.addPointPair
819 (
820 internalPtAIndex,
821 pts.last().index()
822 );
823
824 const scalar totalAngle = radToDeg
825 (
827 + radAngleBetween(convexEdgePlaneANormal, convexEdgePlaneBNormal)
828 );
829
830 if (totalAngle > foamyHexMeshControls_.maxQuadAngle())
831 {
832 // Add additional mitreing points
833 //scalar angleSign = 1.0;
834
835
836 vector convexEdgesPlaneNormal =
837 0.5*(concaveEdgePlaneCNormal + concaveEdgePlaneDNormal);
838
839 plane planeM(featPt, convexEdgesPlaneNormal);
840
841// if
842// (
843// geometryToConformTo_.outside
844// (
845// featPt - convexEdgesPlaneNormal*ppDist
846// )
847// )
848// {
849// angleSign = -1.0;
850// }
851
852// scalar phi =
853// angleSign*acos(concaveEdgeDir & -convexEdgesPlaneNormal);
854//
855// scalar guard =
856// (
857// 1.0 + sin(phi)*ppDist/mag
858// (
859// concaveEdgeLocalFeatPt - concaveEdgeExternalPt
860// )
861// )/cos(phi) - 1.0;
862
863 const Foam::point internalPtF =
864 convexEdgeExternalPt
865 //+ (2.0 + guard)*(concaveEdgeLocalFeatPt - concaveEdgeExternalPt);
866 + 2.0*(convexEdgeLocalFeatPt - convexEdgeExternalPt);
867
868 pts.append
869 (
870 Vb
871 (
872 internalPtF,
873 foamyHexMesh_.vertexCount() + pts.size(),
876 )
877 );
878
879 ftPtPairs_.addPointPair
880 (
881 pts[pts.size() - 2].index(),
882 pts.last().index()
883 );
884
885 const Foam::point externalPtG =
886 internalPtF
887 - 2.0*planeM.distance(internalPtF)*convexEdgesPlaneNormal;
888
889 pts.append
890 (
891 Vb
892 (
893 externalPtG,
894 foamyHexMesh_.vertexCount() + pts.size(),
897 )
898 );
899
900 ftPtPairs_.addPointPair
901 (
902 pts[pts.size() - 2].index(),
903 pts.last().index()
904 );
905 }
906
907 if (debug)
908 {
909 for (label ptI = initialNumOfPoints; ptI < pts.size(); ++ptI)
910 {
911 Info<< "Point " << ptI << " "
912 << indexedVertexEnum::vertexTypeNames_[pts[ptI].type()]
913 << " : ";
914
916 }
917 }
918
919 return true;
920 }
921
922 return false;
923}
924
925
926// ************************************************************************* //
An indexed form of CGAL::Triangulation_vertex_base_3<K> used to keep track of the Delaunay vertices i...
Definition: indexedVertex.H:88
label vertexCount() const
Return the vertex count (the next unique vertex index)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:72
T remove()
Remove and return the last element. Fatal on an empty list.
Definition: DynamicListI.H:655
void append(const T &val)
Copy append an element to the end of this list.
Definition: DynamicListI.H:503
bool found(const Key &key) const
Return true if hashed entry is found in table.
Definition: HashTableI.H:100
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:114
T & last()
Return the last element of the list.
Definition: UListI.H:216
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:433
bool positionOnThisProcessor(const point &pt) const
Is the given position inside the domain of this decomposition.
const backgroundMeshDecomposition & decomposition() const
Return the backgroundMeshDecomposition.
scalar pointPairDistance(const Foam::point &pt) const
Return the local point pair separation at the given location.
scalar maxQuadAngle() const
Return the maxQuadAngle.
Definition: cvControlsI.H:103
const pointField & points() const noexcept
Return points.
Definition: edgeMeshI.H:99
const labelListList & edgeNormals() const
Return the indices of the normals that are adjacent to the.
@ FLAT
Neither concave or convex, on a flat surface.
const vectorField & normals() const
Return the normals of the surfaces adjacent to the feature edges.
vector edgeDirection(label edgeI, label ptI) const
Return the direction of edgeI, pointing away from ptI.
static const Enum< vertexType > vertexTypeNames_
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
Definition: plane.H:95
Hold the types of feature edges attached to the point.
bool addPointPair(const labelPair &vA, const labelPair &vB)
int myProcNo() const noexcept
Return processor number.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
#define WarningInFunction
Report a warning using Foam::Warning.
constexpr scalar pi(M_PI)
void writeOBJ(Ostream &os, const point &pt)
Write obj representation of a point.
Definition: meshTools.C:203
Collection of functions for testing relationships between two vectors.
Definition: vectorTools.H:50
T degAngleBetween(const Vector< T > &a, const Vector< T > &b, const T &tolerance=SMALL)
Calculate angle between a and b in degrees.
Definition: vectorTools.H:137
bool areParallel(const Vector< T > &a, const Vector< T > &b, const T &tolerance=SMALL)
Test if a and b are parallel: a^b = 0.
Definition: vectorTools.H:56
T radAngleBetween(const Vector< T > &a, const Vector< T > &b, const T &tolerance=SMALL)
Calculate angle between a and b in radians.
Definition: vectorTools.H:122
pointFromPoint topoint(const Point &P)
messageStream Info
Information stream (stdout output on master, null elsewhere)
vector point
Point is a vector.
Definition: point.H:43
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
constexpr scalar radToDeg() noexcept
Multiplication factor for radians to degrees conversion.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
error FatalError
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:333