56 { dualMeshPointType::internal,
"internal" },
57 { dualMeshPointType::surface,
"surface" },
58 { dualMeshPointType::featureEdge,
"featureEdge" },
59 { dualMeshPointType::featurePoint,
"featurePoint" },
60 { dualMeshPointType::constrained,
"constrained" },
66void Foam::conformalVoronoiMesh::cellSizeMeshOverlapsBackground()
const
68 const cellShapeControlMesh& cellSizeMesh =
69 cellShapeControl_.shapeControlMesh();
71 DynamicList<Foam::point>
pts(number_of_vertices());
75 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
76 vit != finite_vertices_end();
80 if (vit->internalOrBoundaryPoint() && !vit->referred())
88 boundBox cellSizeMeshBb = cellSizeMesh.bounds();
90 bool fullyContained = cellSizeMeshBb.contains(bb);
94 Pout<<
"Triangulation not fully contained in cell size mesh." <<
endl
95 <<
"Cell Size Mesh Bounds = " << cellSizeMeshBb <<
endl
96 <<
"foamyHexMesh Bounds = " << bb <<
endl;
99 Info<<
"Triangulation is "
101 <<
" contained in the cell size mesh"
106void Foam::conformalVoronoiMesh::insertInternalPoints
127 Foam::autoPtr<Foam::mapDistribute> map
129 decomposition_().distributePoints(transferPoints)
132 transferPoints.clear();
137 label preReinsertionSize(number_of_vertices());
143 label(number_of_vertices()) - preReinsertionSize,
147 Info<<
" " << nInserted <<
" points inserted"
148 <<
", failed to insert " <<
nPoints - nInserted
150 << 100.0*(
nPoints - nInserted)/(nInserted + SMALL)
155 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
156 vit != finite_vertices_end();
162 vit->index() = getNewVertexIndex();
169Foam::Map<Foam::label> Foam::conformalVoronoiMesh::insertPointPairs
179 decomposition_().distributePoints(
vertices);
193 label preReinsertionSize(number_of_vertices());
200 label(number_of_vertices()) - preReinsertionSize,
204 Info<<
" Reinserted " << nReinserted <<
" vertices out of "
208 return oldToNewIndices;
212void Foam::conformalVoronoiMesh::insertSurfacePointPairs
214 const pointIndexHitAndFeatureList& surfaceHits,
224 const label featureIndex = surfaceHits[i].second();
226 allGeometry_[featureIndex].getNormal
232 const vector& normal = norm[0];
234 const Foam::point& surfacePt = surfaceHit.hitPoint();
237 geometryToConformTo_.meshableSide(featureIndex, surfaceHit);
241 createBafflePointPair
243 pointPairDistance(surfacePt),
254 pointPairDistance(surfacePt),
265 pointPairDistance(surfacePt),
275 << meshableSide <<
", bad"
280 if (foamyHexMeshControls().objOutput() && !fName.empty())
287void Foam::conformalVoronoiMesh::insertEdgePointGroups
289 const pointIndexHitAndFeatureList& edgeHits,
296 if (edgeHits[i].first().hit())
300 geometryToConformTo_.features()[edgeHits[i].second()]
315 if (foamyHexMeshControls().objOutput() && !fName.empty())
322bool Foam::conformalVoronoiMesh::nearFeaturePt(
const Foam::point& pt)
const
324 scalar exclusionRangeSqr = featurePointExclusionDistanceSqr(pt);
329 geometryToConformTo_.findFeaturePointNearest
341bool Foam::conformalVoronoiMesh::surfacePtNearFeatureEdge
346 scalar exclusionRangeSqr = surfacePtExclusionDistanceSqr(pt);
351 geometryToConformTo_.findEdgeNearest
363void Foam::conformalVoronoiMesh::insertInitialPoints()
365 Info<<
nl <<
"Inserting initial points" <<
endl;
367 timeCheck(
"Before initial points call");
369 List<Point> initPts = initialPointsMethod_->initialPoints();
371 timeCheck(
"After initial points call");
375 insertInternalPoints(initPts);
377 if (initialPointsMethod_->fixInitialPoints())
381 Finite_vertices_iterator vit = finite_vertices_begin();
382 vit != finite_vertices_end();
390 if (foamyHexMeshControls().objOutput())
394 time().
path()/
"initialPoints.obj",
402void Foam::conformalVoronoiMesh::distribute()
419 Finite_vertices_iterator vit = finite_vertices_begin();
420 vit != finite_vertices_end();
427 types.append(vit->type());
428 sizes.append(vit->targetCellSize());
429 alignments.append(vit->alignment());
436 mapDist().distribute(types);
437 mapDist().distribute(sizes);
438 mapDist().distribute(alignments);
443 Info<<
nl <<
" Inserting distributed tessellation" <<
endl;
451 verticesToInsert.append
462 verticesToInsert.last().targetCellSize() = sizes[pI];
463 verticesToInsert.last().alignment() = alignments[pI];
466 this->rangeInsertWithInfo
468 verticesToInsert.begin(),
469 verticesToInsert.end(),
473 Info<<
" Total number of vertices after redistribution "
482void Foam::conformalVoronoiMesh::buildCellSizeAndAlignmentMesh()
491 cellShapeControl_.shapeControlMesh()
500 if (!distributeBackground(cellSizeMesh))
503 cellSizeMesh.distribute(decomposition_());
508 = foamyHexMeshControls().foamyHexMeshDict().
subDict(
"motionControl");
510 const label nMaxIter =
511 motionControlDict.
get<label>(
"maxRefinementIterations");
513 Info<<
"Maximum number of refinement iterations : " << nMaxIter <<
endl;
515 for (label i = 0; i < nMaxIter; ++i)
523 cellSizeMesh.distribute(decomposition_());
526 Info<<
" Iteration " << i
527 <<
" Added = " << nAdded <<
" points"
539 if (!distributeBackground(cellSizeMesh))
541 cellSizeMesh.distribute(decomposition_());
545 meshAlignmentSmoother.smoothAlignments
547 motionControlDict.get<label>(
"maxSmoothingIterations")
550 Info<<
"Background cell size and alignment mesh:" <<
endl;
551 cellSizeMesh.printInfo(
Info);
553 Info<<
"Triangulation is "
554 << (cellSizeMesh.is_valid() ?
"valid" :
"not valid!" )
557 if (foamyHexMeshControls().writeCellShapeControlMesh())
560 cellSizeMesh.write();
563 if (foamyHexMeshControls().printVertexInfo())
565 cellSizeMesh.printVertexInfo(
Info);
578void Foam::conformalVoronoiMesh::setVertexSizeAndAlignment()
580 Info<<
nl <<
"Calculating target cell alignment and size" <<
endl;
584 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
585 vit != finite_vertices_end();
589 if (vit->internalOrBoundaryPoint())
593 cellShapeControls().cellSizeAndAlignment
596 vit->targetCellSize(),
604Foam::face Foam::conformalVoronoiMesh::buildDualFace
606 const Delaunay::Finite_edges_iterator& eit
609 Cell_circulator ccStart = incident_cells(*eit);
610 Cell_circulator cc1 = ccStart;
611 Cell_circulator cc2 = cc1;
619 label nUniqueVertices = 0;
625 cc1->hasFarPoint() || cc2->hasFarPoint()
626 || is_infinite(cc1) || is_infinite(cc2)
629 Cell_handle
c = eit->first;
630 Vertex_handle vA =
c->vertex(eit->second);
631 Vertex_handle vB =
c->vertex(eit->third);
637 <<
"Dual face uses circumcenter defined by a "
638 <<
"Delaunay tetrahedron with no internal "
639 <<
"or boundary points. Defining Delaunay edge ends: "
646 label cc1I = cc1->cellIndex();
647 label cc2I = cc2->cellIndex();
651 if (!verticesOnFace.found(cc1I))
656 verticesOnFace.append(cc1I);
663 }
while (cc1 != ccStart);
667 if (verticesOnFace.size() >= 3 && nUniqueVertices < 3)
682 verticesOnFace.setSize(nUniqueVertices);
685 return face(verticesOnFace);
689Foam::label Foam::conformalVoronoiMesh::maxFilterCount
691 const Delaunay::Finite_edges_iterator& eit
694 Cell_circulator ccStart = incident_cells(*eit);
695 Cell_circulator cc = ccStart;
701 if (cc->hasFarPoint())
703 Cell_handle
c = eit->first;
704 Vertex_handle vA =
c->vertex(eit->second);
705 Vertex_handle vB =
c->vertex(eit->third);
708 <<
"Dual face uses circumcenter defined by a "
709 <<
"Delaunay tetrahedron with no internal "
710 <<
"or boundary points. Defining Delaunay edge ends: "
716 if (cc->filterCount() > maxFC)
718 maxFC = cc->filterCount();
723 }
while (cc != ccStart);
729bool Foam::conformalVoronoiMesh::ownerAndNeighbour
742 label dualCellIndexA = vA->index();
744 if (!vA->internalOrBoundaryPoint() || vA->referred())
746 if (!vA->constrained())
752 label dualCellIndexB = vB->index();
754 if (!vB->internalOrBoundaryPoint() || vB->referred())
756 if (!vB->constrained())
762 if (dualCellIndexA == -1 && dualCellIndexB == -1)
765 <<
"Attempting to create a face joining "
766 <<
"two unindexed dual cells "
769 else if (dualCellIndexA == -1 || dualCellIndexB == -1)
773 if (dualCellIndexA == -1)
775 owner = dualCellIndexB;
781 owner = dualCellIndexA;
788 if (dualCellIndexB > dualCellIndexA)
790 owner = dualCellIndexA;
791 neighbour = dualCellIndexB;
795 owner = dualCellIndexB;
796 neighbour = dualCellIndexA;
809Foam::conformalVoronoiMesh::conformalVoronoiMesh
818 rndGen_(64293*
Pstream::myProcNo()),
819 foamyHexMeshControls_(foamyHexMeshDict),
824 "cvSearchableSurfaces",
831 foamyHexMeshDict.subDict(
"geometry"),
832 foamyHexMeshDict.getOrDefault(
"singleRegionName", true)
839 foamyHexMeshDict.subDict(
"surfaceConformation")
848 geometryToConformTo_,
849 foamyHexMeshControls().foamyHexMeshDict().subDict
851 "backgroundMeshDecomposition"
860 foamyHexMeshControls_,
866 ftPtConformer_(*this),
867 edgeLocationTreePtr_(),
868 surfacePtLocationTreePtr_(),
869 surfaceConformationVertices_(),
874 foamyHexMeshDict.subDict(
"initialPoints"),
877 geometryToConformTo_,
886 foamyHexMeshDict.subDict(
"motionControl"),
894 foamyHexMeshDict.subDict(
"motionControl")
910 if (foamyHexMeshControls().objOutput())
912 geometryToConformTo_.writeFeatureObj(
"foamyHexMesh");
915 buildCellSizeAndAlignmentMesh();
917 insertInitialPoints();
919 insertFeaturePoints(
true);
921 setVertexSizeAndAlignment();
923 cellSizeMeshOverlapsBackground();
928 distributeBackground(*
this);
930 buildSurfaceConformation();
934 distributeBackground(*
this);
938 sync(decomposition_().procBounds());
943 storeSurfaceConformation();
949 cellSizeMeshOverlapsBackground();
951 if (foamyHexMeshControls().printVertexInfo())
953 printVertexInfo(
Info);
956 if (foamyHexMeshControls().objOutput())
960 time().
path()/
"internalPoints_" + time().
timeName() +
".obj",
979 geometryToConformTo_,
980 foamyHexMeshControls().foamyHexMeshDict().subDict
982 "backgroundMeshDecomposition"
988 insertInitialPoints();
990 insertFeaturePoints();
995 distributeBackground(*
this);
997 buildSurfaceConformation();
1001 distributeBackground(*
this);
1005 sync(decomposition_().procBounds());
1008 cellSizeMeshOverlapsBackground();
1010 if (foamyHexMeshControls().printVertexInfo())
1012 printVertexInfo(
Info);
1019 timeCheck(
"Start of move");
1021 scalar relaxation = relaxationModel_->relaxation();
1023 Info<<
nl <<
"Relaxation = " << relaxation <<
endl;
1025 pointField dualVertices(number_of_finite_cells());
1027 this->resetCellCount();
1032 Delaunay::Finite_cells_iterator cit = finite_cells_begin();
1033 cit != finite_cells_end();
1039 if (cit->anyInternalOrBoundaryDualVertex())
1041 cit->cellIndex() = getNewCellIndex();
1043 dualVertices[cit->cellIndex()] = cit->dual();
1046 if (cit->hasFarPoint())
1052 dualVertices.setSize(cellCount());
1054 setVertexSizeAndAlignment();
1056 timeCheck(
"Determined sizes and alignments");
1058 Info<<
nl <<
"Determining vertex displacements" <<
endl;
1062 cartesianDirections[0] =
vector(1, 0, 0);
1063 cartesianDirections[1] =
vector(0, 1, 0);
1064 cartesianDirections[2] =
vector(0, 0, 1);
1068 number_of_vertices(),
1072 bitSet pointToBeRetained(number_of_vertices(),
true);
1078 Delaunay::Finite_edges_iterator eit = finite_edges_begin();
1079 eit != finite_edges_end();
1083 Cell_handle
c = eit->first;
1084 Vertex_handle vA =
c->vertex(eit->second);
1085 Vertex_handle vB =
c->vertex(eit->third);
1090 vA->internalPoint() && !vA->referred()
1091 && vB->internalOrBoundaryPoint()
1094 vB->internalPoint() && !vB->referred()
1095 && vA->internalOrBoundaryPoint()
1104 vA->alignment().T() & cartesianDirections
1108 vB->alignment().T() & cartesianDirections
1113 forAll(alignmentDirsA, aA)
1115 const vector& a = alignmentDirsA[aA];
1117 scalar maxDotProduct = 0.0;
1119 forAll(alignmentDirsB, aB)
1121 const vector&
b = alignmentDirsB[aB];
1123 const scalar dotProduct = a &
b;
1125 if (
mag(dotProduct) > maxDotProduct)
1127 maxDotProduct =
mag(dotProduct);
1129 alignmentDirs[aA] = a +
sign(dotProduct)*
b;
1138 scalar rABMag =
mag(rAB);
1146 vA->internalPoint() && !vA->referred() && !vA->fixed()
1147 && vB->internalPoint() && !vB->referred() && !vB->fixed()
1157 pointToBeRetained.test(vA->index())
1158 && pointToBeRetained.test(vB->index())
1163 if (internalPointIsInside(pt))
1165 pointsToInsert.append(
toPoint(pt));
1170 if (vA->internalPoint() && !vA->referred() && !vA->fixed())
1172 pointToBeRetained.unset(vA->index());
1175 if (vB->internalPoint() && !vB->referred() && !vB->fixed())
1177 pointToBeRetained.unset(vB->index());
1185 forAll(alignmentDirs, aD)
1187 vector& alignmentDir = alignmentDirs[aD];
1189 scalar dotProd = rAB & alignmentDir;
1199 const scalar alignmentDotProd = dotProd/rABMag;
1204 > foamyHexMeshControls().cosAlignmentAcceptanceAngle()
1207 scalar targetCellSize =
1210 scalar targetFaceArea =
sqr(targetCellSize);
1212 const vector originalAlignmentDir = alignmentDir;
1215 cellShapeControls().aspectRatio().updateCellSizeAndFaceArea
1227 face dualFace = buildDualFace(eit);
1233 const scalar faceArea = dualFace.mag(dualVertices);
1236 cellShapeControls().aspectRatio().updateDeltaVector
1238 originalAlignmentDir,
1261 delta *= faceAreaWeightModel_->faceAreaWeight
1263 faceArea/targetFaceArea
1269 (vA->internalPoint() && vB->internalPoint())
1270 && (!vA->referred() || !vB->referred())
1278 > foamyHexMeshControls().insertionDistCoeff()
1281 > foamyHexMeshControls().faceAreaRatioCoeff()
1284 > foamyHexMeshControls().cosInsertionAcceptanceAngle()
1290 !geometryToConformTo_.findSurfaceAnyIntersection
1300 if (internalPointIsInside(newPt))
1306 decomposition().positionOnThisProcessor
1312 pointsToInsert.append(
toPoint(newPt));
1317 pointsToInsert.append(
toPoint(newPt));
1325 (vA->internalPoint() && !vA->referred())
1326 || (vB->internalPoint() && !vB->referred())
1329 < foamyHexMeshControls().removalDistCoeff()
1355 pointToBeRetained.test(vA->index())
1356 && pointToBeRetained.test(vB->index())
1361 if (internalPointIsInside(pt))
1363 pointsToInsert.append(
toPoint(pt));
1375 pointToBeRetained.unset(vA->index());
1385 pointToBeRetained.unset(vB->index());
1399 displacementAccumulator[vA->index()] += 2*
delta;
1403 displacementAccumulator[vA->index()] +=
delta;
1416 displacementAccumulator[vB->index()] -= 2*
delta;
1420 displacementAccumulator[vB->index()] -=
delta;
1429 Info<<
"Limit displacements" <<
endl;
1434 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
1435 vit != finite_vertices_end();
1439 if (vit->internalPoint() && !vit->referred() && !vit->fixed())
1441 if (pointToBeRetained.test(vit->index()))
1446 displacementAccumulator[vit->index()]
1452 vector totalDisp =
gSum(displacementAccumulator);
1453 scalar totalDist =
gSum(
mag(displacementAccumulator));
1455 displacementAccumulator *= relaxation;
1457 Info<<
"Sum displacements" <<
endl;
1459 label nPointsToRetain = 0;
1460 label nPointsToRemove = 0;
1464 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
1465 vit != finite_vertices_end();
1469 if (vit->internalPoint() && !vit->referred() && !vit->fixed())
1471 if (pointToBeRetained.test(vit->index()))
1485 + displacementAccumulator[vit->index()]
1488 if (internalPointIsInside(pt))
1490 pointsToInsert.append(
toPoint(pt));
1499 pointsToInsert.shrink();
1503 nPointsToRetain - nPointsToRemove,
1506 <<
" internal points are outside the domain. "
1507 <<
"They will not be inserted." <<
endl;
1510 if (foamyHexMeshControls().objOutput() && time().writeTime())
1512 Info<<
"Writing point displacement vectors to file." <<
endl;
1515 time().
path()/
"displacements_" + runTime_.timeName() +
".obj"
1520 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
1521 vit != finite_vertices_end();
1525 if (vit->internalPoint() && !vit->referred())
1527 if (pointToBeRetained.test(vit->index()))
1532 << displacementAccumulator[vit->index()][0] <<
" "
1533 << displacementAccumulator[vit->index()][1] <<
" "
1534 << displacementAccumulator[vit->index()][2] <<
" "
1544 timeCheck(
"Displacement calculated");
1546 Info<<
nl<<
"Inserting displaced tessellation" <<
endl;
1548 insertFeaturePoints(
true);
1550 insertInternalPoints(pointsToInsert,
true);
1573 timeCheck(
"Internal points inserted");
1580 Delaunay::Finite_vertices_iterator vit = finite_vertices_begin();
1581 vit != finite_vertices_end();
1585 if (!vit->referred() && !usedIndices.insert(vit->index()))
1588 <<
"Index already used! Could not insert: " <<
nl
1597 if (foamyHexMeshControls().objOutput())
1601 time().
path()/
"internalPoints_" + time().
timeName() +
".obj",
1606 if (reconformToSurface())
1610 time().
path()/
"boundaryPoints_" + time().
timeName() +
".obj",
1616 time().
path()/
"internalBoundaryPoints_" + time().
timeName()
1625 time().
path()/
"externalBoundaryPoints_" + time().
timeName()
1634 "multipleIntersections_"
1641 Delaunay::Finite_edges_iterator eit = finite_edges_begin();
1642 eit != finite_edges_end();
1646 Cell_handle
c = eit->first;
1647 Vertex_handle vA =
c->vertex(eit->second);
1648 Vertex_handle vB =
c->vertex(eit->third);
1656 geometryToConformTo().findSurfaceAllIntersections
1666 surfHits.size() >= 2
1668 surfHits.size() == 0
1670 (vA->externalBoundaryPoint()
1671 && vB->internalBoundaryPoint())
1672 || (vB->externalBoundaryPoint()
1673 && vA->internalBoundaryPoint())
1678 multipleIntersections.writeLine(ptA, ptB);
1684 timeCheck(
"After conformToSurface");
1686 if (foamyHexMeshControls().printVertexInfo())
1688 printVertexInfo(
Info);
1691 if (time().writeTime())
1697 <<
"Total displacement = " << totalDisp <<
nl
1698 <<
"Total distance = " << totalDist <<
nl
1703void Foam::conformalVoronoiMesh::checkCoPlanarCells()
const
1705 typedef CGAL::Exact_predicates_exact_constructions_kernel Kexact;
1706 typedef CGAL::Point_3<Kexact> PointExact;
1710 Pout<<
"Triangulation is invalid!" <<
endl;
1719 Delaunay::Finite_cells_iterator cit = finite_cells_begin();
1720 cit != finite_cells_end();
1728 Pout<<
"COPLANAR: " << cit->info() <<
nl
1729 <<
" quality = " << quality <<
nl
1735 forAll(cellVerticesExact, vI)
1737 cellVerticesExact[vI] = PointExact
1739 cit->vertex(vI)->point().x(),
1740 cit->vertex(vI)->point().y(),
1741 cit->vertex(vI)->point().z()
1745 PointExact synchronisedDual = CGAL::circumcenter<Kexact>
1747 cellVerticesExact[0],
1748 cellVerticesExact[1],
1749 cellVerticesExact[2],
1750 cellVerticesExact[3]
1755 CGAL::to_double(synchronisedDual.x()),
1756 CGAL::to_double(synchronisedDual.y()),
1757 CGAL::to_double(synchronisedDual.z())
1760 Info<<
"inexact = " << cit->dual() <<
nl
1761 <<
"exact = " << exactPt <<
endl;
1765 Pout<<
"There are " << badCells <<
" bad cells out of "
1766 << number_of_finite_cells() <<
endl;
1769 label nNonGabriel = 0;
1772 Delaunay::Finite_facets_iterator fit = finite_facets_begin();
1773 fit != finite_facets_end();
1777 if (!is_Gabriel(*fit))
1783 Pout<<
"There are " << nNonGabriel <<
" non-Gabriel faces out of "
1784 << number_of_finite_facets() <<
endl;
CGAL::indexedVertex< K > Vb
CGAL::Delaunay_triangulation_3< K, Tds, CompactLocator > Delaunay
Istream and Ostream manipulators taking arguments.
Map< label > insertPoints(const List< Vb > &vertices, const bool reIndex)
Insert the list of vertices (calls rangeInsertWithInfo).
void reset()
Clear the entire triangulation.
bool distribute(const boundBox &bb)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeMin > & shrink()
Calls shrink_to_fit() and returns a reference to the DynamicList.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
A 1D vector of objects of type <T> with a fixed length <N>.
void normalise()
Normalise the field inplace. See notes in Field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void append(const T &val)
Append an element at the end of the list.
A HashTable to objects of type <T> with a label key.
An OFstream that keeps track of vertices and provides convenience output methods for OBJ files.
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
Inter-processor communications stream.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
iterator end() noexcept
Return an iterator to end traversing the UList.
void size(const label n)
Older name for setAddressableSize.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Store a background polyMesh to use for the decomposition of space and queries for parallel conformalV...
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
sideVolumeType
Normals point to the outside.
Abstract base class for providing faceAreaWeight values to the cell motion controller based on an arg...
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
Abstract base class for generating initial points for a conformalVoronoiMesh.
Helper class which maintains intersections of (changing) mesh with (static) surfaces.
Abstract base class for providing relaxation values to the cell motion controller.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
Foam::scalar averageCellSize(const VertexType &vA, const VertexType &vB)
Return the target cell size from that stored on a pair of Delaunay vertices,.
bool uninitialised(const VertexType &v)
const dimensionedScalar c
Speed of light in a vacuum.
Different types of constants.
scalar coplanarTet(Cell &c, const scalar tol=1e-12)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Type gSum(const FieldField< Field, Type > &f)
dimensionedScalar sign(const dimensionedScalar &ds)
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
PointFrompoint toPoint(const Foam::point &p)
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
pointFromPoint topoint(const Point &P)
void reverse(UList< T > &list, const label n)
Reverse the first n elements of the list.
messageStream Info
Information stream (stdout output on master, null elsewhere).
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
bool returnReduceAnd(const bool value, const int communicator=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
pointField vertices(const blockVertexList &bvl)
errorManip< error > abort(error &err)
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
Foam::point pointFromPoint
nonInt insert("surfaceSum(((S|magSf)*S)")
#define forAll(list, i)
Loop across all elements in list.