67 void Foam::conformalVoronoiMesh::cellSizeMeshOverlapsBackground()
const 69 const cellShapeControlMesh& cellSizeMesh =
70 cellShapeControl_.shapeControlMesh();
72 DynamicList<Foam::point> pts(number_of_vertices());
76 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
77 vit != finite_vertices_end();
81 if (vit->internalOrBoundaryPoint() && !vit->referred())
83 pts.append(
topoint(vit->point()));
89 boundBox cellSizeMeshBb = cellSizeMesh.bounds();
91 bool fullyContained =
true;
93 if (!cellSizeMeshBb.contains(bb))
95 Pout<<
"Triangulation not fully contained in cell size mesh." 98 Pout<<
"Cell Size Mesh Bounds = " << cellSizeMesh.bounds() <<
endl;
99 Pout<<
"foamyHexMesh Bounds = " << bb <<
endl;
101 fullyContained =
false;
104 reduce(fullyContained, andOp<unsigned int>());
106 Info<<
"Triangulation is " 107 << (fullyContained ?
"fully" :
"not fully")
108 <<
" contained in the cell size mesh" 113 void Foam::conformalVoronoiMesh::insertInternalPoints
119 label nPoints = points.size();
123 reduce(nPoints, sumOp<label>());
126 Info<<
" " << nPoints <<
" points to insert..." <<
endl;
130 List<Foam::point> transferPoints(points.size());
134 transferPoints[pI] =
topoint(points[pI]);
141 decomposition_().distributePoints(transferPoints)
144 transferPoints.clear();
146 map().distribute(points);
149 label nVert = number_of_vertices();
151 insert(points.begin(), points.end());
153 label nInserted(number_of_vertices() - nVert);
157 reduce(nInserted, sumOp<label>());
160 Info<<
" " << nInserted <<
" points inserted" 161 <<
", failed to insert " << nPoints - nInserted
163 << 100.0*(nPoints - nInserted)/(nInserted + small)
168 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
169 vit != finite_vertices_end();
175 vit->index() = getNewVertexIndex();
191 autoPtr<mapDistribute> mapDist =
192 decomposition_().distributePoints(vertices);
206 label preReinsertionSize(number_of_vertices());
208 Map<label> oldToNewIndices =
213 label(number_of_vertices()) - preReinsertionSize,
217 Info<<
" Reinserted " << nReinserted <<
" vertices out of " 221 return oldToNewIndices;
225 void Foam::conformalVoronoiMesh::insertSurfacePointPairs
227 const pointIndexHitAndFeatureList& surfaceHits,
228 const fileName fName,
237 const label featureIndex = surfaceHits[i].second();
239 allGeometry_[featureIndex].getNormal
241 List<pointIndexHit>(1, surfaceHit),
245 const vector& normal = norm[0];
247 const Foam::point& surfacePt(surfaceHit.hitPoint());
250 geometryToConformTo_.meshableSide(featureIndex, surfaceHit);
254 createBafflePointPair
256 pointPairDistance(surfacePt),
267 pointPairDistance(surfacePt),
278 pointPairDistance(surfacePt),
288 << meshableSide <<
", bad" 293 if (foamyHexMeshControls().objOutput() && fName !=
fileName::null)
300 void Foam::conformalVoronoiMesh::insertEdgePointGroups
302 const pointIndexHitAndFeatureList& edgeHits,
303 const fileName fName,
309 if (edgeHits[i].first().hit())
311 const extendedFeatureEdgeMesh& feMesh
313 geometryToConformTo_.features()[edgeHits[i].second()]
328 if (foamyHexMeshControls().objOutput() && fName !=
fileName::null)
335 bool Foam::conformalVoronoiMesh::nearFeaturePt(
const Foam::point& pt)
const 337 scalar exclusionRangeSqr = featurePointExclusionDistanceSqr(pt);
342 geometryToConformTo_.findFeaturePointNearest
354 bool Foam::conformalVoronoiMesh::surfacePtNearFeatureEdge
359 scalar exclusionRangeSqr = surfacePtExclusionDistanceSqr(pt);
364 geometryToConformTo_.findEdgeNearest
376 void Foam::conformalVoronoiMesh::insertInitialPoints()
378 Info<<
nl <<
"Inserting initial points" <<
endl;
380 timeCheck(
"Before initial points call");
382 List<Point> initPts = initialPointsMethod_->initialPoints();
384 timeCheck(
"After initial points call");
388 insertInternalPoints(initPts);
390 if (initialPointsMethod_->fixInitialPoints())
394 Finite_vertices_iterator vit = finite_vertices_begin();
395 vit != finite_vertices_end();
403 if (foamyHexMeshControls().objOutput())
407 time().
path()/
"initialPoints.obj",
415 void Foam::conformalVoronoiMesh::distribute()
422 DynamicList<Foam::point>
points(number_of_vertices());
423 DynamicList<Foam::indexedVertexEnum::vertexType> types
427 DynamicList<scalar> sizes(number_of_vertices());
428 DynamicList<tensor> alignments(number_of_vertices());
432 Finite_vertices_iterator vit = finite_vertices_begin();
433 vit != finite_vertices_end();
439 points.append(
topoint(vit->point()));
440 types.append(vit->type());
441 sizes.append(vit->targetCellSize());
442 alignments.append(vit->alignment());
446 autoPtr<mapDistribute> mapDist =
449 mapDist().distribute(types);
450 mapDist().distribute(sizes);
451 mapDist().distribute(alignments);
456 Info<<
nl <<
" Inserting distributed tessellation" <<
endl;
460 DynamicList<Vb> verticesToInsert(points.size());
464 verticesToInsert.append
475 verticesToInsert.last().targetCellSize() = sizes[pI];
476 verticesToInsert.last().alignment() = alignments[pI];
479 this->rangeInsertWithInfo
481 verticesToInsert.begin(),
482 verticesToInsert.end(),
486 Info<<
" Total number of vertices after redistribution " 489 label(number_of_vertices()), sumOp<label>()
495 void Foam::conformalVoronoiMesh::buildCellSizeAndAlignmentMesh()
497 controlMeshRefinement meshRefinement
502 smoothAlignmentSolver meshAlignmentSmoother
504 cellShapeControl_.shapeControlMesh()
507 meshRefinement.initialMeshPopulation(decomposition_);
509 cellShapeControlMesh& cellSizeMesh = cellShapeControl_.shapeControlMesh();
513 if (!distributeBackground(cellSizeMesh))
516 cellSizeMesh.distribute(decomposition_);
520 const dictionary& motionControlDict
521 = foamyHexMeshControls().foamyHexMeshDict().subDict(
"motionControl");
525 motionControlDict.lookup(
"maxRefinementIterations")
528 Info<<
"Maximum number of refinement iterations : " << nMaxIter <<
endl;
530 for (
label i = 0; i < nMaxIter; ++i)
532 label nAdded = meshRefinement.refineMesh(decomposition_);
534 reduce(nAdded, sumOp<label>());
538 cellSizeMesh.distribute(decomposition_);
541 Info<<
" Iteration " << i
542 <<
" Added = " << nAdded <<
" points" 554 if (!distributeBackground(cellSizeMesh))
556 cellSizeMesh.distribute(decomposition_);
562 motionControlDict.lookup(
"maxSmoothingIterations")
564 meshAlignmentSmoother.smoothAlignments(maxSmoothingIterations);
566 Info<<
"Background cell size and alignment mesh:" <<
endl;
567 cellSizeMesh.printInfo(
Info);
569 Info<<
"Triangulation is " 570 << (cellSizeMesh.is_valid() ?
"valid" :
"not valid!" )
573 if (foamyHexMeshControls().writeCellShapeControlMesh())
576 cellSizeMesh.write();
579 if (foamyHexMeshControls().printVertexInfo())
581 cellSizeMesh.printVertexInfo(
Info);
594 void Foam::conformalVoronoiMesh::setVertexSizeAndAlignment()
596 Info<<
nl <<
"Calculating target cell alignment and size" <<
endl;
600 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
601 vit != finite_vertices_end();
605 if (vit->internalOrBoundaryPoint())
609 cellShapeControls().cellSizeAndAlignment
612 vit->targetCellSize(),
620 Foam::face Foam::conformalVoronoiMesh::buildDualFace
622 const Delaunay::Finite_edges_iterator& eit
625 Cell_circulator ccStart = incident_cells(*eit);
626 Cell_circulator cc1 = ccStart;
627 Cell_circulator cc2 = cc1;
633 DynamicList<label> verticesOnFace;
635 label nUniqueVertices = 0;
641 cc1->hasFarPoint() || cc2->hasFarPoint()
642 || is_infinite(cc1) || is_infinite(cc2)
645 Cell_handle c = eit->first;
646 Vertex_handle vA = c->vertex(eit->second);
647 Vertex_handle vB = c->vertex(eit->third);
653 <<
"Dual face uses circumcenter defined by a " 654 <<
"Delaunay tetrahedron with no internal " 655 <<
"or boundary points. Defining Delaunay edge ends: " 662 label cc1I = cc1->cellIndex();
663 label cc2I = cc2->cellIndex();
667 if (
findIndex(verticesOnFace, cc1I) == -1)
672 verticesOnFace.append(cc1I);
679 }
while (cc1 != ccStart);
681 verticesOnFace.shrink();
683 if (verticesOnFace.size() >= 3 && nUniqueVertices < 3)
698 verticesOnFace.setSize(nUniqueVertices);
701 return face(verticesOnFace);
705 Foam::label Foam::conformalVoronoiMesh::maxFilterCount
707 const Delaunay::Finite_edges_iterator& eit
710 Cell_circulator ccStart = incident_cells(*eit);
711 Cell_circulator cc = ccStart;
717 if (cc->hasFarPoint())
719 Cell_handle c = eit->first;
720 Vertex_handle vA = c->vertex(eit->second);
721 Vertex_handle vB = c->vertex(eit->third);
724 <<
"Dual face uses circumcenter defined by a " 725 <<
"Delaunay tetrahedron with no internal " 726 <<
"or boundary points. Defining Delaunay edge ends: " 732 if (cc->filterCount() > maxFC)
734 maxFC = cc->filterCount();
739 }
while (cc != ccStart);
745 bool Foam::conformalVoronoiMesh::ownerAndNeighbour
753 bool reverse =
false;
758 label dualCellIndexA = vA->index();
760 if (!vA->internalOrBoundaryPoint() || vA->referred())
762 if (!vA->constrained())
768 label dualCellIndexB = vB->index();
770 if (!vB->internalOrBoundaryPoint() || vB->referred())
772 if (!vB->constrained())
778 if (dualCellIndexA == -1 && dualCellIndexB == -1)
781 <<
"Attempting to create a face joining " 782 <<
"two unindexed dual cells " 785 else if (dualCellIndexA == -1 || dualCellIndexB == -1)
789 if (dualCellIndexA == -1)
791 owner = dualCellIndexB;
797 owner = dualCellIndexA;
804 if (dualCellIndexB > dualCellIndexA)
806 owner = dualCellIndexA;
807 neighbour = dualCellIndexB;
811 owner = dualCellIndexB;
812 neighbour = dualCellIndexA;
825 Foam::conformalVoronoiMesh::conformalVoronoiMesh
828 const dictionary& foamyHexMeshDict
831 DistributedDelaunayMesh<
Delaunay>(runTime),
833 rndGen_(64293*Pstream::myProcNo()),
834 foamyHexMeshControls_(foamyHexMeshDict),
839 "cvSearchableSurfaces",
846 foamyHexMeshDict.subDict(
"geometry"),
847 foamyHexMeshDict.lookupOrDefault(
"singleRegionName", true)
854 foamyHexMeshDict.subDict(
"surfaceConformation")
859 ? new backgroundMeshDecomposition
863 geometryToConformTo_,
864 foamyHexMeshControls().foamyHexMeshDict().subDict
866 "backgroundMeshDecomposition" 874 foamyHexMeshControls_,
880 ftPtConformer_(*this),
881 edgeLocationTreePtr_(),
882 surfacePtLocationTreePtr_(),
883 surfaceConformationVertices_(),
886 initialPointsMethod::
New 888 foamyHexMeshDict.subDict(
"initialPoints"),
891 geometryToConformTo_,
900 foamyHexMeshDict.subDict(
"motionControl"),
906 faceAreaWeightModel::
New 908 foamyHexMeshDict.subDict(
"motionControl")
929 buildCellSizeAndAlignmentMesh();
931 insertInitialPoints();
933 insertFeaturePoints(
true);
935 setVertexSizeAndAlignment();
937 cellSizeMeshOverlapsBackground();
942 distributeBackground(*
this);
944 buildSurfaceConformation();
948 distributeBackground(*
this);
952 sync(decomposition_().procBounds());
957 storeSurfaceConformation();
963 cellSizeMeshOverlapsBackground();
989 new backgroundMeshDecomposition
993 geometryToConformTo_,
996 "backgroundMeshDecomposition" 1002 insertInitialPoints();
1004 insertFeaturePoints();
1009 distributeBackground(*
this);
1011 buildSurfaceConformation();
1015 distributeBackground(*
this);
1019 sync(decomposition_().procBounds());
1022 cellSizeMeshOverlapsBackground();
1035 scalar relaxation = relaxationModel_->relaxation();
1037 Info<<
nl <<
"Relaxation = " << relaxation <<
endl;
1039 pointField dualVertices(number_of_finite_cells());
1046 Delaunay::Finite_cells_iterator cit = finite_cells_begin();
1047 cit != finite_cells_end();
1053 if (cit->anyInternalOrBoundaryDualVertex())
1057 dualVertices[cit->cellIndex()] = cit->dual();
1060 if (cit->hasFarPoint())
1068 setVertexSizeAndAlignment();
1070 timeCheck(
"Determined sizes and alignments");
1072 Info<<
nl <<
"Determining vertex displacements" <<
endl;
1076 cartesianDirections[0] =
vector(1, 0, 0);
1077 cartesianDirections[1] =
vector(0, 1, 0);
1078 cartesianDirections[2] =
vector(0, 0, 1);
1082 number_of_vertices(),
1086 PackedBoolList pointToBeRetained
1088 number_of_vertices(),
1092 DynamicList<Point> pointsToInsert(number_of_vertices());
1096 Delaunay::Finite_edges_iterator eit = finite_edges_begin();
1097 eit != finite_edges_end();
1108 vA->internalPoint() && !vA->referred()
1109 && vB->internalOrBoundaryPoint()
1112 vB->internalPoint() && !vB->referred()
1113 && vA->internalOrBoundaryPoint()
1120 Field<vector> alignmentDirsA
1122 vA->alignment().T() & cartesianDirections
1124 Field<vector> alignmentDirsB
1126 vB->alignment().T() & cartesianDirections
1129 Field<vector> alignmentDirs(alignmentDirsA);
1131 forAll(alignmentDirsA, aA)
1133 const vector& a = alignmentDirsA[aA];
1135 scalar maxDotProduct = 0.0;
1137 forAll(alignmentDirsB, aB)
1139 const vector& b = alignmentDirsB[aB];
1141 const scalar dotProduct = a &
b;
1143 if (
mag(dotProduct) > maxDotProduct)
1145 maxDotProduct =
mag(dotProduct);
1147 alignmentDirs[aA] = a +
sign(dotProduct)*
b;
1149 alignmentDirs[aA] /=
mag(alignmentDirs[aA]);
1156 scalar rABMag =
mag(rAB);
1164 vA->internalPoint() && !vA->referred() && !vA->fixed()
1165 && vB->internalPoint() && !vB->referred() && !vB->fixed()
1175 pointToBeRetained[vA->index()] ==
true 1176 && pointToBeRetained[vB->index()] == true
1181 if (internalPointIsInside(pt))
1183 pointsToInsert.append(
toPoint(pt));
1188 if (vA->internalPoint() && !vA->referred() && !vA->fixed())
1190 pointToBeRetained[vA->index()] =
false;
1193 if (vB->internalPoint() && !vB->referred() && !vB->fixed())
1195 pointToBeRetained[vB->index()] =
false;
1203 forAll(alignmentDirs, aD)
1205 vector& alignmentDir = alignmentDirs[aD];
1207 scalar dotProd = rAB & alignmentDir;
1217 const scalar alignmentDotProd = dotProd/rABMag;
1225 scalar targetCellSize =
1228 scalar targetFaceArea =
sqr(targetCellSize);
1230 const vector originalAlignmentDir = alignmentDir;
1243 vector delta = alignmentDir - 0.5*rAB;
1245 face dualFace = buildDualFace(eit);
1251 const scalar faceArea = dualFace.mag(dualVertices);
1256 originalAlignmentDir,
1279 delta *= faceAreaWeightModel_->faceAreaWeight
1281 faceArea/targetFaceArea
1287 (vA->internalPoint() && vB->internalPoint())
1288 && (!vA->referred() || !vB->referred())
1318 if (internalPointIsInside(newPt))
1330 pointsToInsert.append(
toPoint(newPt));
1335 pointsToInsert.append(
toPoint(newPt));
1343 (vA->internalPoint() && !vA->referred())
1344 || (vB->internalPoint() && !vB->referred())
1373 pointToBeRetained[vA->index()] ==
true 1374 && pointToBeRetained[vB->index()] == true
1379 if (internalPointIsInside(pt))
1381 pointsToInsert.append(
toPoint(pt));
1393 pointToBeRetained[vA->index()] =
false;
1403 pointToBeRetained[vB->index()] =
false;
1417 displacementAccumulator[vA->index()] += 2*
delta;
1421 displacementAccumulator[vA->index()] +=
delta;
1434 displacementAccumulator[vB->index()] -= 2*
delta;
1438 displacementAccumulator[vB->index()] -=
delta;
1447 Info<<
"Limit displacements" <<
endl;
1452 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
1453 vit != finite_vertices_end();
1457 if (vit->internalPoint() && !vit->referred() && !vit->fixed())
1459 if (pointToBeRetained[vit->index()] ==
true)
1464 displacementAccumulator[vit->index()]
1470 vector totalDisp =
gSum(displacementAccumulator);
1471 scalar totalDist =
gSum(
mag(displacementAccumulator));
1473 displacementAccumulator *= relaxation;
1475 Info<<
"Sum displacements" <<
endl;
1477 label nPointsToRetain = 0;
1478 label nPointsToRemove = 0;
1482 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
1483 vit != finite_vertices_end();
1487 if (vit->internalPoint() && !vit->referred() && !vit->fixed())
1489 if (pointToBeRetained[vit->index()] ==
true)
1503 + displacementAccumulator[vit->index()]
1506 if (internalPointIsInside(pt))
1508 pointsToInsert.append(
toPoint(pt));
1517 pointsToInsert.shrink();
1521 nPointsToRetain - nPointsToRemove,
1524 <<
" internal points are outside the domain. " 1525 <<
"They will not be inserted." <<
endl;
1530 Info<<
"Writing point displacement vectors to file." <<
endl;
1538 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
1539 vit != finite_vertices_end();
1543 if (vit->internalPoint() && !vit->referred())
1545 if (pointToBeRetained[vit->index()] ==
true)
1550 << displacementAccumulator[vit->index()][0] <<
" " 1551 << displacementAccumulator[vit->index()][1] <<
" " 1552 << displacementAccumulator[vit->index()][2] <<
" " 1564 Info<<
nl<<
"Inserting displaced tessellation" <<
endl;
1566 insertFeaturePoints(
true);
1568 insertInternalPoints(pointsToInsert,
true);
1598 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
1599 vit != finite_vertices_end();
1603 if (!vit->referred() && !usedIndices.insert(vit->index()))
1606 <<
"Index already used! Could not insert: " <<
nl 1624 if (reconformToSurface())
1650 OBJstream multipleIntersections
1652 "multipleIntersections_" 1659 Delaunay::Finite_edges_iterator eit = finite_edges_begin();
1660 eit != finite_edges_end();
1671 List<pointIndexHit> surfHits;
1684 surfHits.size() >= 2
1686 surfHits.size() == 0
1688 (vA->externalBoundaryPoint()
1689 && vB->internalBoundaryPoint())
1690 || (vB->externalBoundaryPoint()
1691 && vA->internalBoundaryPoint())
1709 if (
time().writeTime())
1715 <<
"Total displacement = " << totalDisp <<
nl 1716 <<
"Total distance = " << totalDist <<
nl 1721 void Foam::conformalVoronoiMesh::checkCoPlanarCells()
const 1723 typedef CGAL::Exact_predicates_exact_constructions_kernel Kexact;
1724 typedef CGAL::Point_3<Kexact> PointExact;
1728 Pout<<
"Triangulation is invalid!" <<
endl;
1731 OFstream str(
"badCells.obj");
1737 Delaunay::Finite_cells_iterator cit = finite_cells_begin();
1738 cit != finite_cells_end();
1747 <<
" quality = " << quality <<
nl 1748 <<
" dual = " <<
topoint(cit->dual()) << endl;
1752 FixedList<PointExact, 4> cellVerticesExact(PointExact(0,0,0));
1753 forAll(cellVerticesExact, vI)
1755 cellVerticesExact[vI] = PointExact
1757 cit->vertex(vI)->point().x(),
1758 cit->vertex(vI)->point().y(),
1759 cit->vertex(vI)->point().z()
1763 PointExact synchronisedDual = CGAL::circumcenter<Kexact>
1765 cellVerticesExact[0],
1766 cellVerticesExact[1],
1767 cellVerticesExact[2],
1768 cellVerticesExact[3]
1773 CGAL::to_double(synchronisedDual.x()),
1774 CGAL::to_double(synchronisedDual.y()),
1775 CGAL::to_double(synchronisedDual.z())
1778 Info<<
"inexact = " << cit->dual() <<
nl 1779 <<
"exact = " << exactPt <<
endl;
1783 Pout<<
"There are " << badCells <<
" bad cells out of " 1784 << number_of_finite_cells() <<
endl;
1787 label nNonGabriel = 0;
1790 Delaunay::Finite_facets_iterator fit = finite_facets_begin();
1791 fit != finite_facets_end();
1795 if (!is_Gabriel(*fit))
1801 Pout<<
"There are " << nNonGabriel <<
" non-Gabriel faces out of " 1802 << number_of_finite_facets() <<
endl;
dimensionedScalar sign(const dimensionedScalar &ds)
CGAL::Delaunay_triangulation_3< K, Tds, CompactLocator > Delaunay
label cellCount() const
Return the cell count (the next unique cell index)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
pointFromPoint topoint(const Point &P)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A face is a list of labels corresponding to mesh vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
static const fileName null
An empty fileName.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool distribute(const boundBox &bb)
scalar faceAreaRatioCoeff() const
Return the faceAreaRatioCoeff.
PointIndexHit< point > pointIndexHit
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Vector< scalar > vector
A scalar version of the templated Vector.
Initialise the NamedEnum HashTable from the static list of names.
scalar removalDistCoeff() const
Return removalDistCoeff.
void printVertexInfo(Ostream &os) const
Write vertex statistics in the form of a table to stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
An indexed form of CGAL::Triangulation_vertex_base_3<K> used to keep track of the Delaunay vertices i...
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
vectorField pointField
pointField is a vectorField.
bool uninitialised(const VertexType &v)
Type gSum(const FieldField< Field, Type > &f)
line< point, const point & > linePointRef
Line using referred points.
void updateCellSizeAndFaceArea(vector &alignmentDir, scalar &targetFaceArea, scalar &targetCellSize) const
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
timeIndices insert(timeIndex, timeDirs[timeI].value())
const cellAspectRatioControl & aspectRatio() const
sideVolumeType
Normals point to the outside.
void reset()
Clear the entire triangulation.
PointFrompoint toPoint(const Foam::point &p)
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
label readLabel(Istream &is)
Istream and Ostream manipulators taking arguments.
void reverse(UList< T > &, const label n)
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
defineTypeNameAndDebug(combustionModel, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
scalar cosInsertionAcceptanceAngle() const
Return the cosInsertionAcceptanceAngle.
void resetCellCount()
Set the cell count to zero.
static bool & parRun()
Is this a parallel run?
Foam::scalar averageCellSize(const VertexType &vA, const VertexType &vB)
Return the target cell size from that stored on a pair of Delaunay vertices,.
#define WarningInFunction
Report a warning using Foam::Warning.
prefixOSstream Pout(cout, "Pout")
void updateDeltaVector(const vector &alignmentDir, const scalar targetCellSize, const scalar rABMag, vector &delta) const
label getNewCellIndex() const
Create a new unique cell index and return.
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
const doubleScalar e
Elementary charge.
scalar coplanarTet(Cell &c, const scalar tol=1e-12)
Map< label > insertPoints(const List< Vb > &vertices, const bool reIndex)
Insert the list of vertices (calls rangeInsertWithInfo)
scalar insertionDistCoeff() const
Return the insertionDistCoeff.
void sync(const boundBox &bb)
Refer vertices so that the processor interfaces are consistent.
InfoProxy< IOstream > info() const
Return info proxy.
A HashTable to objects of type <T> with a label key.