61bool 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)
126void Foam::medialAxisMeshMover::update(
const dictionary& coeffDict)
129 <<
" : Calculating distance to Medial Axis ..." <<
endl;
141 const label nSmoothSurfaceNormals
146 "nSmoothSurfaceNormals",
151 const scalar minMedialAxisAngle
156 "minMedialAxisAngle",
164 const scalar featureAngle
170 const scalar slipFeatureAngle
172 coeffDict.getOrDefault<scalar>(
"slipFeatureAngle", (0.5*featureAngle))
176 const label nSmoothNormals
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,
253 int dummyTrackData = 0;
261 forAll(meshPoints, patchPointI)
263 label pointI = meshPoints[patchPointI];
268 pointNormals[patchPointI]
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;
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();
452 pointDisplacement().boundaryField()[patchI];
458 && !adaptPatches.found(patchI)
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
575 <<
indent <<
"locations : " << str.name() <<
nl
576 <<
indent <<
"pointSet : " << seedPoints.name() <<
nl
579 for (
const auto& info : maxInfo)
581 str.write(info.origin());
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 : "
685 << dispVec_.name() <<
nl
689 medialRatio_.write();
696bool Foam::medialAxisMeshMover::unmarkExtrusion
698 const label patchPointI,
706 patchDisp[patchPointI] =
Zero;
712 patchDisp[patchPointI] =
Zero;
720void Foam::medialAxisMeshMover::syncPatchDisplacement
749 if (
mag(patchDisp[i]) < minThickness[i])
751 if (unmarkExtrusion(i, patchDisp, extrudeStatus))
838void Foam::medialAxisMeshMover::
839handleFeatureAngleLayerTerminations
842 const bitSet& isPatchMasterPoint,
864 extrudedFaces[faceI] =
false;
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];
918 forAll(edgeFaceNormals, edgeI)
920 const List<point>& eFaceNormals = edgeFaceNormals[edgeI];
921 const List<bool>& eFaceExtrude = edgeFaceExtrude[edgeI];
923 if (eFaceNormals.size() == 2)
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])
971void Foam::medialAxisMeshMover::findIsolatedRegions
973 const scalar minCosLayerTermination,
974 const bool detectExtrusionIsland,
975 const bitSet& isPatchMasterPoint,
976 const bitSet& isPatchMasterEdge,
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);
1035 if (detectExtrusionIsland)
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;
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))
1167 if (isPatchMasterEdge[edgeI])
1169 const edge&
e = edges[edgeI];
1176 isolatedPoint[v0] += 1;
1180 isolatedPoint[v1] += 1;
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 : "
1249Foam::medialAxisMeshMover::medialAxisMeshMover
1286 fieldSmoother_(
mesh()),
1356void Foam::medialAxisMeshMover::calculateDisplacement
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]);
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]
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,
1700 <<
" points with too large an extrusion distance to "
1701 << str().name() <<
endl;
1708 <<
" medial axis vectors on points with too large"
1709 <<
" an extrusion distance to " << medialVecStr().name() <<
endl;
1714bool Foam::medialAxisMeshMover::shrinkMesh
1717 const label nAllowableErrors,
1722 const label nSnap = meshQualityDict.
get<label>(
"nRelaxIter");
1727 meshMover_.setDisplacementPatchFields();
1730 scalar oldErrorReduction = -1;
1732 bool meshOk =
false;
1734 for (label iter = 0; iter < 2*nSnap ; iter++)
1737 <<
" : Iteration " << iter <<
endl;
1741 <<
" : Displacement scaling for error reduction set to 0."
1743 oldErrorReduction = meshMover_.setErrorReduction(0.0);
1748 meshMover_.scaleMesh
1752 meshMover_.paramDict(),
1765 if (oldErrorReduction >= 0)
1767 meshMover_.setErrorReduction(oldErrorReduction);
1779 const label nAllowableErrors,
1787 const word minThicknessName = moveDict.get<
word>(
"minThicknessName");
1794 if (minThicknessName ==
"none")
1800 (minThicknessName ==
"none")
1817 forAll(extrudeStatus, pointI)
1819 if (
mag(patchDisp[pointI]) <= minThickness[pointI]+SMALL)
1827 calculateDisplacement(moveDict, minThickness, extrudeStatus, patchDisp);
1844 meshMover_.movePoints();
1847 meshMover_.correct();
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
label size() const noexcept
The number of elements in the list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An OFstream that keeps track of vertices and provides convenience output methods for OBJ files.
Variant of pointEdgePoint with some transported additional data. Templated on the transported data ty...
Wave propagation of information through grid. Every iteration information goes through one layer of e...
label nEdges() const
Number of edges in patch.
label nPoints() const
Number of points supporting patch faces.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
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.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
const Field< point_type > & faceNormals() const
Return face unit normals for patch.
const labelListList & pointFaces() const
Return point-face addressing.
const labelListList & edgeFaces() const
Return edge-face addressing.
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
T * data() noexcept
Return pointer to the underlying array serving as data storage.
void size(const label n)
Older name for setAddressableSize.
static const Form rootMax
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void set(const bitSet &bitset)
Set specified bits from another bitset.
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.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
Virtual base class for mesh movers with externally provided displacement field giving the boundary co...
static labelList getFixedValueBCs(const pointVectorField &)
Extract fixed-value patchfields.
static autoPtr< indirectPrimitivePatch > getPatch(const polyMesh &, const labelList &)
Construct patch on selected patches.
const polyMesh & mesh() const
const pointMesh & pMesh() const
virtual void movePoints(const pointField &)
Update local data for geometry changes.
pointVectorField & pointDisplacement()
Return reference to the point motion displacement field.
pointVectorField & pointDisplacement_
Reference to point motion field.
A face is a list of labels corresponding to mesh vertices.
label nTotalPoints() const noexcept
Total global number of mesh points. Not compensated for duplicate points!
static bitSet getMasterPoints(const polyMesh &mesh, const labelList &meshPoints)
Determine master point for subset of points. If coupled.
static Type get(const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt=keyType::REGEX, const Type &deflt=Zero)
Wrapper around dictionary::get which does not exit.
static bitSet getMasterEdges(const polyMesh &mesh, const labelList &meshEdges)
Determine master edge for subset of edges. If coupled.
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...
Holds information regarding nearest wall point. Used in PointEdgeWave. (so not standard FaceCellWave)...
Mesh representing a set of points created from polyMesh.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
const globalMeshData & globalData() const
Return parallel info (demand-driven).
virtual const pointField & points() const
Return raw points.
A patch is a list of labels that address the faces in the global face list.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
@ NOEXTRUDE
Do not extrude. No layers added.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
For use with FaceCellWave. Determines topological distance to starting faces.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
const volScalarField & p0
const polyBoundaryMesh & patches
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))
FaceCellWave< wallPoints, wallPoints::trackData > wallDistCalc(mesh_, changedFaces, faceDist, allFaceInfo, allCellInfo, 0, td)
#define WarningInFunction
Report a warning using Foam::Warning.
Namespace for handling debugging switches.
List< edge > edgeList
List of edge.
bool returnReduceOr(const bool value, const int communicator=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
const dimensionSet dimless
Dimensionless.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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 & incrIndent(Ostream &os)
Increment the indent level.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
dimensionedScalar sqrt(const dimensionedScalar &ds)
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
constexpr scalar radToDeg() noexcept
Multiplication factor for radians to degrees conversion.
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
Field< vector > vectorField
Specialisation of Field<T> for vector.
pointPatchField< vector > pointPatchVectorField
vector point
Point is a vector.
List< bool > boolList
A List of bools.
static constexpr const zero Zero
Global zero (0).
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
dimensionedScalar acos(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a).
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];} pointMap[start]=pointMap[end]=Foam::min(start, end);} } 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};constexpr 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< DynamicList< face > > pFaces[nBCs]
#define forAll(list, i)
Loop across all elements in list.
List helper to append y elements onto the end of x.
Unit conversion functions.