50 externalDisplacementMeshMover,
61 bool Foam::medialAxisMeshMover::isMaxEdge
63 const List<PointData<vector>>& pointWallDist,
66 const bool disableWallEdges
76 scalar magV0(
mag(v0));
83 scalar magV1(
mag(v1));
117 if ((pointWallDist[
e[0]].data() & pointWallDist[
e[1]].data()) < minCos)
126 void Foam::medialAxisMeshMover::update(
const dictionary& coeffDict)
129 <<
" : Calculating distance to Medial Axis ..." <<
endl;
134 const labelList& meshPoints = pp.meshPoints();
141 const label nSmoothSurfaceNormals
143 meshRefinement::get<label>
146 "nSmoothSurfaceNormals",
151 const scalar minMedialAxisAngle
153 meshRefinement::get<scalar>
156 "minMedialAxisAngle",
164 const scalar featureAngle
166 meshRefinement::get<scalar>(coeffDict,
"featureAngle", dryRun_)
170 const scalar slipFeatureAngle
172 coeffDict.getOrDefault<scalar>(
"slipFeatureAngle", (0.5*featureAngle))
176 const label nSmoothNormals
178 meshRefinement::get<label>(coeffDict,
"nSmoothNormals", dryRun_)
182 const label nMedialAxisIter = coeffDict.getOrDefault<label>
188 const bool disableWallEdges = coeffDict.getOrDefault<
bool>
213 const bitSet isPatchMasterPoint
221 const bitSet isPatchMasterEdge
236 fieldSmoother_.smoothPatchNormals
238 nSmoothSurfaceNormals,
250 List<PointData<vector>> pointWallDist(
mesh().
nPoints());
253 int dummyTrackData = 0;
259 List<PointData<vector>> wallInfo(meshPoints.size());
261 forAll(meshPoints, patchPointI)
263 label pointI = meshPoints[patchPointI];
264 wallInfo[patchPointI] = PointData<vector>
268 pointNormals[patchPointI]
273 List<PointData<vector>> edgeWallDist(
mesh().nEdges());
274 PointEdgeWave<PointData<vector>> wallDistCalc
284 wallDistCalc.iterate(nMedialAxisIter);
288 wallDistCalc.nUnvisitedPoints(),
294 if (nMedialAxisIter > 0)
297 <<
" : Limited walk to " << nMedialAxisIter
298 <<
" steps. Not visited " << nUnvisit
300 <<
" points" <<
endl;
305 <<
"Walking did not visit all points." <<
nl 306 <<
" Did not visit " << nUnvisit
308 <<
" points. This is not necessarily a problem" <<
nl 309 <<
" and might be due to faceZones splitting of part" 310 <<
" of the domain." <<
nl <<
endl;
319 List<pointEdgePoint> pointMedialDist(
mesh().
nPoints());
320 List<pointEdgePoint> edgeMedialDist(
mesh().nEdges());
323 DynamicList<pointEdgePoint> maxInfo(meshPoints.size());
324 DynamicList<label> maxPoints(meshPoints.size());
332 const edge&
e = edges[edgeI];
336 !pointWallDist[
e[0]].valid(dummyTrackData)
337 || !pointWallDist[
e[1]].valid(dummyTrackData)
343 label pointI =
e[ep];
345 if (!pointMedialDist[pointI].valid(dummyTrackData))
347 maxPoints.append(pointI);
356 pointMedialDist[pointI] = maxInfo.last();
367 minMedialAxisAngleCos,
378 scalar eMag =
mag(eVec);
385 const point& origin0 = pointWallDist[
e[0]].origin();
387 const point& origin1 = pointWallDist[
e[1]].origin();
388 scalar dist0 = (
p0-origin0) & eVec;
389 scalar dist1 = (origin1-p1) & eVec;
390 scalar
s = 0.5*(dist1+eMag+dist0);
402 else if (
s >= dist0+eMag)
413 medialAxisPt =
p0+(
s-dist0)*eVec;
420 label pointI =
e[ep];
422 if (!pointMedialDist[pointI].valid(dummyTrackData))
424 maxPoints.append(pointI);
433 pointMedialDist[pointI] = maxInfo.last();
450 const polyPatch& pp =
patches[patchI];
457 && !isA<emptyPolyPatch>(pp)
458 && !adaptPatches.found(patchI)
461 const labelList& meshPoints = pp.meshPoints();
468 if (pvf.fixesValue())
472 <<
" : Inserting all points on patch " << pp.name()
477 label pointI = meshPoints[i];
478 if (!pointMedialDist[pointI].valid(dummyTrackData))
480 maxPoints.append(pointI);
489 pointMedialDist[pointI] = maxInfo.last();
501 <<
" : Inserting points on patch " << pp.name()
502 <<
" if angle to nearest layer patch > " 503 << slipFeatureAngle <<
" degrees." <<
endl;
516 label pointI = meshPoints[i];
520 pointWallDist[pointI].valid(dummyTrackData)
521 && !pointMedialDist[pointI].valid(dummyTrackData)
527 -pointWallDist[pointI].data()
530 if (cosAngle > slipFeatureAngleCos)
535 maxPoints.append(pointI);
544 pointMedialDist[pointI] = maxInfo.last();
564 OBJstream str(
mesh().time().timePath()/
"medialSurfacePoints.obj");
569 "medialSurfacePoints",
574 <<
" : Writing estimated medial surface:" <<
nl <<
incrIndent 579 for (
const auto& info : maxInfo)
581 str.
write(info.origin());
588 PointEdgeWave<pointEdgePoint> medialDistCalc
599 medialDistCalc.iterate(2*nMedialAxisIter);
603 forAll(pointMedialDist, pointI)
605 if (pointMedialDist[pointI].valid(dummyTrackData))
609 pointMedialDist[pointI].distSqr()
611 medialVec_[pointI] = pointMedialDist[pointI].origin();
616 medialDist_[pointI] = 0.0;
617 medialVec_[pointI] =
point(1, 0, 0);
625 if (!pointWallDist[i].valid(dummyTrackData))
627 dispVec_[i] =
vector(1, 0, 0);
631 dispVec_[i] = pointWallDist[i].data();
636 fieldSmoother_.smoothNormals
646 forAll(medialRatio_, pointI)
648 if (!pointWallDist[pointI].valid(dummyTrackData))
650 medialRatio_[pointI] = 0.0;
654 scalar wDist2 = pointWallDist[pointI].distSqr();
655 scalar mDist = medialDist_[pointI];
657 if (wDist2 <
sqr(SMALL) && mDist < SMALL)
664 medialRatio_[pointI] = 0.0;
668 medialRatio_[pointI] = mDist / (
Foam::sqrt(wDist2) + mDist);
678 <<
indent <<
"ratio of medial distance to wall distance : " 679 << medialRatio_.
name() <<
nl 680 <<
indent <<
"distance to nearest medial axis : " 681 << medialDist_.
name() <<
nl 682 <<
indent <<
"nearest medial axis location : " 683 << medialVec_.
name() <<
nl 684 <<
indent <<
"normal at nearest wall : " 689 medialRatio_.write();
696 bool Foam::medialAxisMeshMover::unmarkExtrusion
698 const label patchPointI,
700 List<snappyLayerDriver::extrudeMode>& extrudeStatus
706 patchDisp[patchPointI] =
Zero;
712 patchDisp[patchPointI] =
Zero;
720 void Foam::medialAxisMeshMover::syncPatchDisplacement
724 List<snappyLayerDriver::extrudeMode>& extrudeStatus
728 const labelList& meshPoints = pp.meshPoints();
742 minMagSqrEqOp<vector>(),
749 if (
mag(patchDisp[i]) < minThickness[i])
751 if (unmarkExtrusion(i, patchDisp, extrudeStatus))
838 void Foam::medialAxisMeshMover::
839 handleFeatureAngleLayerTerminations
842 const bitSet& isPatchMasterPoint,
844 List<snappyLayerDriver::extrudeMode>& extrudeStatus,
854 boolList extrudedFaces(pp.size(),
true);
856 forAll(pp.localFaces(), faceI)
858 const face&
f = pp.localFaces()[faceI];
864 extrudedFaces[faceI] =
false;
879 List<List<point>> edgeFaceNormals(pp.nEdges());
880 List<List<bool>> edgeFaceExtrude(pp.nEdges());
887 const labelList& eFaces = edgeFaces[edgeI];
889 edgeFaceNormals[edgeI].
setSize(eFaces.size());
890 edgeFaceExtrude[edgeI].setSize(eFaces.size());
893 label faceI = eFaces[i];
894 edgeFaceNormals[edgeI][i] = faceNormals[faceI];
895 edgeFaceExtrude[edgeI][i] = extrudedFaces[faceI];
904 ListOps::appendEqOp<point>(),
913 ListOps::appendEqOp<bool>(),
918 forAll(edgeFaceNormals, edgeI)
920 const List<point>& eFaceNormals = edgeFaceNormals[edgeI];
921 const List<bool>& eFaceExtrude = edgeFaceExtrude[edgeI];
923 if (eFaceNormals.size() == 2)
925 const edge&
e = pp.edges()[edgeI];
935 if (!eFaceExtrude[0] || !eFaceExtrude[1])
937 const vector& n0 = eFaceNormals[0];
938 const vector& n1 = eFaceNormals[1];
940 if ((n0 & n1) < minCos)
942 if (unmarkExtrusion(v0, patchDisp, extrudeStatus))
944 if (isPatchMasterPoint[v0])
949 if (unmarkExtrusion(v1, patchDisp, extrudeStatus))
951 if (isPatchMasterPoint[v1])
971 void Foam::medialAxisMeshMover::findIsolatedRegions
973 const scalar minCosLayerTermination,
974 const bool detectExtrusionIsland,
975 const bitSet& isPatchMasterPoint,
976 const bitSet& isPatchMasterEdge,
979 List<snappyLayerDriver::extrudeMode>& extrudeStatus,
985 const labelList& meshPoints = pp.meshPoints();
988 Info<< typeName <<
" : Removing isolated regions ..." <<
nl 989 <<
indent <<
"- if partially extruded faces make angle < " 991 if (detectExtrusionIsland)
993 Info<<
indent <<
"- if exclusively surrounded by non-extruded points" 998 Info<<
indent <<
"- if exclusively surrounded by non-extruded faces" 1003 label nPointCounter = 0;
1009 if (minCosLayerTermination > -1)
1011 handleFeatureAngleLayerTerminations
1013 minCosLayerTermination,
1022 syncPatchDisplacement(minThickness, patchDisp, extrudeStatus);
1033 boolList keptPoints(pp.nPoints(),
false);
1035 if (detectExtrusionIsland)
1044 const face&
f = pp.localFaces()[faceI];
1050 if (islandPoint[faceI] == -1)
1053 islandPoint[faceI] =
f[fp];
1055 else if (islandPoint[faceI] != -2)
1058 islandPoint[faceI] = -2;
1070 forAll(pointFaces, patchPointI)
1079 if (islandPoint[faceI] != patchPointI)
1081 keptPoints[patchPointI] =
true;
1094 boolList extrudedFaces(pp.size(),
true);
1095 forAll(pp.localFaces(), faceI)
1097 const face&
f = pp.localFaces()[faceI];
1102 extrudedFaces[faceI] =
false;
1110 forAll(keptPoints, patchPointI)
1117 if (extrudedFaces[faceI])
1119 keptPoints[patchPointI] =
true;
1138 forAll(keptPoints, patchPointI)
1140 if (!keptPoints[patchPointI])
1142 if (unmarkExtrusion(patchPointI, patchDisp, extrudeStatus))
1157 const edgeList& edges = pp.edges();
1167 if (isPatchMasterEdge[edgeI])
1169 const edge&
e = edges[edgeI];
1176 isolatedPoint[v0] += 1;
1180 isolatedPoint[v1] += 1;
1198 const face&
f = pp.localFaces()[faceI];
1199 bool failed =
false;
1202 if (isolatedPoint[
f[fp]] > 2)
1208 bool allPointsExtruded =
true;
1215 allPointsExtruded =
false;
1220 if (allPointsExtruded)
1242 <<
" : Number of isolated points extrusion stopped : " 1249 Foam::medialAxisMeshMover::medialAxisMeshMover
1251 const dictionary&
dict,
1252 const List<labelPair>& baffles,
1257 externalDisplacementMeshMover(
dict, baffles, pointDisplacement, dryRun),
1258 adaptPatchIDs_(getFixedValueBCs(pointDisplacement)),
1259 adaptPatchPtr_(getPatch(
mesh(), adaptPatchIDs_)),
1265 pointDisplacement.time().
timeName(),
1266 pointDisplacement.db(),
1286 fieldSmoother_(
mesh()),
1292 pointDisplacement.time().
timeName(),
1293 pointDisplacement.db(),
1306 pointDisplacement.time().
timeName(),
1307 pointDisplacement.db(),
1320 pointDisplacement.time().
timeName(),
1321 pointDisplacement.db(),
1334 pointDisplacement.time().
timeName(),
1335 pointDisplacement.db(),
1356 void Foam::medialAxisMeshMover::calculateDisplacement
1358 const dictionary& coeffDict,
1364 Info<< typeName <<
" : Smoothing using Medial Axis ..." <<
endl;
1374 const label nSmoothDisplacement =
1375 coeffDict.getOrDefault(
"nSmoothDisplacement", 0);
1378 const scalar maxThicknessToMedialRatio =
1379 coeffDict.
get<scalar>(
"maxThicknessToMedialRatio");
1382 const scalar featureAngle = coeffDict.get<scalar>(
"featureAngle");
1385 scalar layerTerminationAngle = coeffDict.getOrDefault<scalar>
1387 "layerTerminationAngle",
1393 const label nSmoothPatchThickness =
1394 coeffDict.get<label>(
"nSmoothThickness");
1397 const label nMedialAxisIter = coeffDict.getOrDefault<label>
1404 const bool detectExtrusionIsland = coeffDict.getOrDefault
1406 "detectExtrusionIsland",
1425 const bitSet isPatchMasterPoint
1433 const bitSet isPatchMasterEdge
1445 forAll(thickness, patchPointI)
1449 thickness[patchPointI] = 0.0;
1453 label numThicknessRatioExclude = 0;
1466 /
"thicknessRatioExcludePoints_" 1472 <<
" : Writing points with too large an extrusion distance to " 1473 << str().name() <<
endl;
1484 /
"thicknessRatioExcludeMedialVec_" 1490 <<
" : Writing medial axis vectors on points with too large" 1491 <<
" an extrusion distance to " << medialVecStr().name() <<
endl;
1494 forAll(meshPoints, patchPointI)
1498 label pointI = meshPoints[patchPointI];
1502 scalar mDist = medialDist_[pointI];
1503 scalar thicknessRatio = thickness[patchPointI]/(mDist+VSMALL);
1514 thicknessRatio *= (
n & mVec);
1516 if (thicknessRatio > maxThicknessToMedialRatio)
1521 Pout<<
"truncating displacement at " 1523 <<
" from " << thickness[patchPointI]
1527 minThickness[patchPointI]
1528 +thickness[patchPointI]
1530 <<
" medial direction:" << mVec
1531 <<
" extrusion direction:" <<
n 1532 <<
" with thicknessRatio:" << thicknessRatio
1536 thickness[patchPointI] =
1537 0.5*(minThickness[patchPointI]+thickness[patchPointI]);
1539 patchDisp[patchPointI] = thickness[patchPointI]*
n;
1541 if (isPatchMasterPoint[patchPointI])
1543 numThicknessRatioExclude++;
1549 str().writeLine(pt, pt+patchDisp[patchPointI]);
1554 medialVecStr().writeLine(pt, medialVec_[pointI]);
1560 Info<< typeName <<
" : Reducing layer thickness at " 1562 <<
" nodes where thickness to medial axis distance is large " <<
endl;
1569 minCosLayerTermination,
1570 detectExtrusionIsland,
1582 forAll(thickness, patchPointI)
1586 thickness[patchPointI] = 0.0;
1595 fieldSmoother_.minSmoothField
1597 nSmoothPatchThickness,
1607 int dummyTrackData = 0;
1622 forAll(meshPoints, patchPointI)
1624 label pointI = meshPoints[patchPointI];
1630 thickness[patchPointI]
1645 wallDistCalc.
iterate(nMedialAxisIter);
1650 pointField& displacement = pointDisplacement_;
1652 forAll(displacement, pointI)
1654 if (!pointWallDist[pointI].valid(dummyTrackData))
1656 displacement[pointI] =
Zero;
1665 displacement[pointI] =
1666 -medialRatio_[pointI]
1667 *pointWallDist[pointI].
data()
1674 if (nSmoothDisplacement > 0)
1676 bitSet isToBeSmoothed(displacement.
size(),
false);
1680 if (medialRatio_[i] > SMALL && medialRatio_[i] < 1-SMALL)
1682 isToBeSmoothed.set(i);
1686 fieldSmoother_.smoothLambdaMuDisplacement
1688 nSmoothDisplacement,
1698 bool Foam::medialAxisMeshMover::shrinkMesh
1701 const label nAllowableErrors,
1706 const label nSnap = meshQualityDict.
get<label>(
"nRelaxIter");
1711 meshMover_.setDisplacementPatchFields();
1713 Info<< typeName <<
" : Moving mesh ..." <<
endl;
1714 scalar oldErrorReduction = -1;
1716 bool meshOk =
false;
1718 for (label iter = 0; iter < 2*nSnap ; iter++)
1721 <<
" : Iteration " << iter <<
endl;
1725 <<
" : Displacement scaling for error reduction set to 0." 1727 oldErrorReduction = meshMover_.setErrorReduction(0.0);
1732 meshMover_.scaleMesh
1736 meshMover_.paramDict(),
1743 Info<< typeName <<
" : Successfully moved mesh" <<
endl;
1749 if (oldErrorReduction >= 0)
1751 meshMover_.setErrorReduction(oldErrorReduction);
1754 Info<< typeName <<
" : Finished moving mesh ..." <<
endl;
1762 const dictionary& moveDict,
1763 const label nAllowableErrors,
1771 const word minThicknessName = moveDict.get<word>(
"minThicknessName");
1778 if (minThicknessName ==
"none")
1784 (minThicknessName ==
"none")
1792 pointDisplacement_.internalField(),
1801 forAll(extrudeStatus, pointI)
1803 if (
mag(patchDisp[pointI]) <= minThickness[pointI]+SMALL)
1811 calculateDisplacement(moveDict, minThickness, extrudeStatus, patchDisp);
1828 meshMover_.movePoints();
1831 meshMover_.correct();
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
List< labelList > labelListList
A List of labelList.
void size(const label n)
Older name for setAddressableSize.
dimensionedScalar acos(const dimensionedScalar &ds)
Variant of pointEdgePoint with some transported additional data. Templated on the transported data ty...
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
virtual void movePoints(const pointField &)
Update local data for geometry changes.
Ostream & indent(Ostream &os)
Indent stream.
virtual const fileName & name() const
The name of the stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Unit conversion functions.
label iterate(const label maxIter)
Iterate until no changes or maxIter reached. Returns actual.
constexpr char nl
The newline '\n' character (0x0a)
T * data() noexcept
Return pointer to the underlying array serving as data storage.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type get(const label i) const
Return bool value at specified position, always false for out-of-range access.
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
static bitSet getMasterEdges(const polyMesh &mesh, const labelList &meshEdges)
Determine master edge for subset of edges. If coupled.
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
const dimensionSet dimless
Dimensionless.
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.
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field...
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Macros for easy insertion into run-time selection tables.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
label nTotalPoints() const noexcept
Return total number of points in decomposed mesh. Not.
virtual const pointField & points() const
Return raw points.
Mesh representing a set of points created from polyMesh.
#define forAll(list, i)
Loop across all elements in list.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
A list of faces which address into the list of points.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
void setSize(const label n)
Alias for resize()
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
dimensionedScalar cos(const dimensionedScalar &ds)
List< edge > edgeList
A List of edges.
Do not extrude. No layers added.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
const globalMeshData & globalData() const
Return parallel info.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
An OFstream that keeps track of vertices and provides convenience output methods for OBJ files...
int debug
Static debugging option.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
defineTypeNameAndDebug(combustionModel, 0)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
pointPatchField< vector > pointPatchVectorField
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=cellModel::ref(cellModel::HEX);labelList hexLabels(8);label activeCells=0;labelList pointMap(nPoints);forAll(pointMap, i){ pointMap[i]=i;}for(label i=0;i< nPoints;i++){ if(f[i] > 0.0) { hexLabels[0]=i;hexLabels[1]=i1tab[i];hexLabels[2]=i3tab[i1tab[i]];hexLabels[3]=i3tab[i];hexLabels[4]=i8tab[i];hexLabels[5]=i1tab[i8tab[i]];hexLabels[6]=i3tab[i1tab[i8tab[i]]];hexLabels[7]=i3tab[i8tab[i]];cellShapes[activeCells].reset(hex, hexLabels);edgeList edges=cellShapes[activeCells].edges();forAll(edges, ei) { if(edges[ei].mag(points)< SMALL) { label start=pointMap[edges[ei].start()];while(start !=pointMap[start]) { start=pointMap[start];} label end=pointMap[edges[ei].end()];while(end !=pointMap[end]) { end=pointMap[end];} label minLabel=min(start, end);pointMap[start]=pointMap[end]=minLabel;} } cellZoning[activeCells]=idreg[i];activeCells++;}}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){ cellShape &cs=cellShapes[celli];forAll(cs, i) { cs[i]=pointMap[cs[i]];} cs.collapse();}label bcIDs[11]={-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9};const label nBCs=12;const word *kivaPatchTypes[nBCs]={ &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &symmetryPolyPatch::typeName, &wedgePolyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &symmetryPolyPatch::typeName, &oldCyclicPolyPatch::typeName};enum patchTypeNames{ PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char *kivaPatchNames[nBCs]={ "piston", "valve", "liner", "cylinderHead", "axis", "wedge", "inflow", "outflow", "presin", "presout", "symmetryPlane", "cyclic"};List< SLList< face > > pFaces[nBCs]
For use with FaceCellWave. Determines topological distance to starting faces.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
vector point
Point is a vector.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
constexpr scalar radToDeg(const scalar rad) noexcept
Conversion from radians to degrees.
labelList meshEdges(const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
Return labels of patch edges in the global edge list using cell addressing.
static bitSet getMasterPoints(const polyMesh &mesh, const labelList &meshPoints)
Determine master point for subset of points. If coupled.
const polyBoundaryMesh & patches
const polyMesh & mesh() const
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Wave propagation of information through grid. Every iteration information goes through one layer of e...
bool returnReduceOr(const bool value, const label comm=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
Defines the attributes of an object for which implicit objectRegistry management is supported...
List< bool > boolList
A List of bools.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
const volScalarField & p0
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)