57 Foam::scalar Foam::isoSurfaceCell::isoFraction
63 const scalar d = s1-s0;
76 const labelledTri& tri0,
77 const labelledTri& tri1
83 label fp1 = tri1.find(tri0[fp0]);
88 fp1 = tri1.find(tri0[fp0]);
96 label fp0p1 = tri0.fcIndex(fp0);
97 label fp1p1 = tri1.fcIndex(fp1);
98 label fp1m1 = tri1.rcIndex(fp1);
100 if (tri0[fp0p1] == tri1[fp1p1] || tri0[fp0p1] == tri1[fp1m1])
102 common[0] = tri0[fp0];
103 common[1] = tri0[fp0p1];
110 Foam::point Foam::isoSurfaceCell::calcCentre(
const triSurface&
s)
116 sum +=
s[i].centre(
s.points());
126 DynamicList<labelledTri, 64>& localTris
131 if (localTris.size() == 1)
133 const labelledTri& tri = localTris[0];
134 info.hitPoint(tri.centre(localPoints));
136 else if (localTris.size() == 2)
139 const labelledTri& tri0 = localTris[0];
140 const labelledTri& tri1 = localTris[1];
142 labelPair shared = findCommonPoints(tri0, tri1);
146 const vector n0 = tri0.areaNormal(localPoints);
147 const vector n1 = tri1.areaNormal(localPoints);
154 mag(n0) <= ROOTVSMALL
155 ||
mag(n1) <= ROOTVSMALL
163 tri0.centre(localPoints)
164 + tri1.centre(localPoints)
170 else if (localTris.size())
180 localTris.clearStorage();
183 label nZones = surf.markZones
192 scalar minCos = GREAT;
193 const vector& n0 = surf.faceNormals()[0];
194 for (label i = 1; i < surf.size(); ++i)
196 scalar cosAngle = (n0 & surf.faceNormals()[i]);
197 if (cosAngle < minCos)
205 info.hitPoint(calcCentre(surf));
214 void Foam::isoSurfaceCell::calcSnappedCc
220 DynamicList<point>& snappedPoints,
227 snappedCc.
setSize(mesh_.nCells());
231 DynamicList<point, 64> localPoints(64);
232 DynamicList<labelledTri, 64> localTris(64);
233 Map<label> pointToLocal(64);
235 forAll(mesh_.cells(), celli)
237 if (cellCutType_[celli] == cutType::CUT)
239 const scalar cVal = cVals[celli];
241 const cell& cFaces = mesh_.cells()[celli];
245 pointToLocal.clear();
250 for (
const label facei : cFaces)
252 const face&
f = mesh_.faces()[facei];
254 for (
const label pointi :
f)
256 scalar
s = isoFraction(cVal, pVals[pointi]);
258 if (
s >= 0.0 &&
s <= 0.5)
260 if (pointToLocal.insert(pointi, localPoints.size()))
262 localPoints.append((1.0-
s)*cc[celli]+
s*
pts[pointi]);
268 if (localPoints.size() == 1)
271 snappedCc[celli] = snappedPoints.size();
272 snappedPoints.append(localPoints[0]);
280 else if (localPoints.size() == 2)
283 snappedCc[celli] = snappedPoints.size();
284 snappedPoints.append(0.5*(localPoints[0]+localPoints[1]));
292 else if (localPoints.size())
295 for (
const label facei : cFaces)
297 const face&
f = mesh_.faces()[facei];
303 const label fp0 = mesh_.tetBasePtIs()[facei];
305 for (label i = 2; i <
f.
size(); ++i)
311 FixedList<scalar, 3>
s(3);
312 s[0] = isoFraction(cVal, pVals[tri[0]]);
313 s[1] = isoFraction(cVal, pVals[tri[1]]);
314 s[2] = isoFraction(cVal, pVals[tri[2]]);
318 (
s[0] >= 0.0 &&
s[0] <= 0.5)
319 && (
s[1] >= 0.0 &&
s[1] <= 0.5)
320 && (
s[2] >= 0.0 &&
s[2] <= 0.5)
325 (mesh_.faceOwner()[facei] == celli)
326 == (cVal >= pVals[tri[0]])
333 pointToLocal[tri[1]],
334 pointToLocal[tri[0]],
335 pointToLocal[tri[2]],
346 pointToLocal[tri[0]],
347 pointToLocal[tri[1]],
348 pointToLocal[tri[2]],
370 snappedCc[celli] = snappedPoints.size();
371 snappedPoints.append(info.point());
385 void Foam::isoSurfaceCell::genPointTris
392 DynamicList<point, 64>& localTriPoints
397 const face&
f = mesh_.faces()[facei];
399 const label fp0 = mesh_.tetBasePtIs()[facei];
401 for (label i = 2; i <
f.
size(); ++i)
406 label index = tri.find(pointi);
414 label
b = tri[tri.fcIndex(index)];
415 label
c = tri[tri.rcIndex(index)];
418 FixedList<scalar, 3>
s(3);
419 s[0] = isoFraction(pointValues[pointi], pointValues[
b]);
420 s[1] = isoFraction(pointValues[pointi], pointValues[
c]);
421 s[2] = isoFraction(pointValues[pointi], cellValues[celli]);
425 (
s[0] >= 0.0 &&
s[0] <= 0.5)
426 && (
s[1] >= 0.0 &&
s[1] <= 0.5)
427 && (
s[2] >= 0.0 &&
s[2] <= 0.5)
432 point p2 = (1.0-
s[2])*
pts[pointi] +
s[2]*cc[celli];
436 (mesh_.faceOwner()[facei] == celli)
437 == (pointValues[pointi] > cellValues[celli])
440 localTriPoints.append(
p0);
441 localTriPoints.append(p1);
442 localTriPoints.append(p2);
446 localTriPoints.append(p1);
447 localTriPoints.append(
p0);
448 localTriPoints.append(p2);
457 void Foam::isoSurfaceCell::genPointTris
463 DynamicList<point, 64>& localTriPoints
467 const cell& cFaces = mesh_.cells()[celli];
471 const face&
f = mesh_.faces()[facei];
475 for (
const label cfacei : cFaces)
477 const face& f1 = mesh_.faces()[cfacei];
478 for (
const label p1 : f1)
494 label index =
f.
find(pointi);
502 FixedList<scalar, 3>
s(3);
503 s[0] = isoFraction(pointValues[pointi], pointValues[
b]);
504 s[1] = isoFraction(pointValues[pointi], pointValues[
c]);
505 s[2] = isoFraction(pointValues[pointi], pointValues[ccPointi]);
509 (
s[0] >= 0.0 &&
s[0] <= 0.5)
510 && (
s[1] >= 0.0 &&
s[1] <= 0.5)
511 && (
s[2] >= 0.0 &&
s[2] <= 0.5)
518 if (mesh_.faceOwner()[facei] != celli)
521 localTriPoints.append(p1);
522 localTriPoints.append(p2);
526 localTriPoints.append(p1);
527 localTriPoints.append(
p0);
528 localTriPoints.append(p2);
534 void Foam::isoSurfaceCell::calcSnappedPoint
540 DynamicList<point>& snappedPoints,
544 const labelList& faceOwn = mesh_.faceOwner();
545 const labelList& faceNei = mesh_.faceNeighbour();
549 bitSet isBoundaryPoint(mesh_.nPoints());
550 const polyBoundaryMesh&
patches = mesh_.boundaryMesh();
556 for (
const label facei :
pp.range())
558 const face&
f = mesh_.faces()[facei];
560 isBoundaryPoint.
set(
f);
566 const point greatPoint(GREAT, GREAT, GREAT);
568 pointField collapsedPoint(mesh_.nPoints(), greatPoint);
572 DynamicList<point, 64> localTriPoints(100);
575 forAll(mesh_.pointFaces(), pointi)
577 constexpr uint8_t realCut(cutType::CUT | cutType::TETCUT);
579 if (isBoundaryPoint.test(pointi))
588 for (
const label facei :
pFaces)
592 (cellCutType_[faceOwn[facei]] & realCut) != 0
594 mesh_.isInternalFace(facei)
595 && (cellCutType_[faceNei[facei]] & realCut) != 0
612 localPointCells.clear();
613 localTriPoints.clear();
615 for (
const label facei :
pFaces)
617 const label own = faceOwn[facei];
623 if (localPointCells.insert(own))
625 genPointTris(pVals, pointi, facei, own, localTriPoints);
641 if (mesh_.isInternalFace(facei))
643 const label nei = faceNei[facei];
647 if (localPointCells.insert(nei))
649 genPointTris(pVals, pointi, facei, nei, localTriPoints);
667 if (localTriPoints.size() == 3)
678 else if (localTriPoints.size())
697 label nZones = surf.markZones
706 scalar minCos = GREAT;
707 const vector& n0 = surf.faceNormals()[0];
708 for (label i = 1; i < surf.size(); ++i)
710 const vector&
n = surf.faceNormals()[i];
711 scalar cosAngle = (n0 &
n);
712 if (cosAngle < minCos)
719 collapsedPoint[pointi] = calcCentre(surf);
729 minMagSqrEqOp<point>(),
733 snappedPoint.setSize(mesh_.nPoints());
736 forAll(collapsedPoint, pointi)
740 if (
magSqr(collapsedPoint[pointi]) < 0.5*
magSqr(greatPoint))
742 snappedPoint[pointi] = snappedPoints.size();
743 snappedPoints.append(collapsedPoint[pointi]);
751 const bool checkDuplicates,
752 const List<point>& triPoints,
757 label nTris = triPoints.
size()/3;
759 if ((triPoints.size() % 3) != 0)
762 <<
"Problem: number of points " << triPoints.size()
779 Pout<<
"isoSurfaceCell : merged from " << triPointReverseMap.size()
780 <<
" points down to " << newPoints.size() <<
endl;
791 if (nUnique != newPoints.size())
794 <<
"Merged points contain duplicates" 795 <<
" when merging with distance " << mergeDistance_ <<
endl 796 <<
"merged:" << newPoints.size() <<
" re-merged:" 803 List<labelledTri> tris;
805 DynamicList<labelledTri> dynTris(nTris);
807 DynamicList<label> newToOldTri(nTris);
809 for (label oldTriI = 0; oldTriI < nTris; ++oldTriI)
813 triPointReverseMap[rawPointi],
814 triPointReverseMap[rawPointi+1],
815 triPointReverseMap[rawPointi+2],
820 newToOldTri.append(oldTriI);
827 triMap.transfer(newToOldTri);
828 tris.transfer(dynTris);
840 Pout<<
"isoSurfaceCell : merged from " << nTris
841 <<
" down to " << tris.size() <<
" triangles." <<
endl;
847 centres[triI] = tris[triI].centre(newPoints);
861 Pout<<
"isoSurfaceCell : detected " 862 << (oldToMerged.size() - nUnique)
863 <<
" duplicate triangles." <<
endl;
866 if (oldToMerged.size() != nUnique)
870 DynamicList<label> newToOldTri(tris.size());
874 label mergedI = oldToMerged[triI];
876 if (newToMaster[mergedI] == -1)
878 newToMaster[mergedI] = triI;
879 newToOldTri.append(triMap[triI]);
880 tris[newTriI++] = tris[triI];
884 triMap.transfer(newToOldTri);
885 tris.setSize(newTriI);
893 void Foam::isoSurfaceCell::calcAddressing
895 const triSurface& surf,
896 List<FixedList<label, 3>>& faceEdges,
899 Map<labelList>& edgeFacesRest
908 const labelledTri& tri = surf[triI];
925 Pout<<
"isoSurfaceCell : detected " 927 <<
" edges on " << surf.size() <<
" triangles." <<
endl;
938 faceEdges.setSize(surf.size());
942 faceEdges[triI][0] = oldToMerged[edgeI++];
943 faceEdges[triI][1] = oldToMerged[edgeI++];
944 faceEdges[triI][2] = oldToMerged[edgeI++];
949 edgeFace0.resize_nocopy(nUnique);
951 edgeFace1.resize_nocopy(nUnique);
953 edgeFacesRest.clear();
955 forAll(oldToMerged, oldEdgeI)
957 label triI = oldEdgeI / 3;
958 label edgeI = oldToMerged[oldEdgeI];
960 if (edgeFace0[edgeI] == -1)
962 edgeFace0[edgeI] = triI;
964 else if (edgeFace1[edgeI] == -1)
966 edgeFace1[edgeI] = triI;
976 edgeFacesRest(edgeI).push_back(triI);
982 bool Foam::isoSurfaceCell::danglingTriangle
984 const FixedList<label, 3>& fEdges,
989 for (
const label edgei : fEdges)
991 if (edgeFace1[edgei] == -1)
997 return (nOpen == 1 || nOpen == 2 || nOpen == 3);
1001 Foam::label Foam::isoSurfaceCell::markDanglingTriangles
1003 const List<FixedList<label, 3>>& faceEdges,
1006 const Map<labelList>& edgeFacesRest,
1010 keepTriangles.setSize(faceEdges.size());
1011 keepTriangles =
true;
1013 label nDangling = 0;
1021 const label edgeI = iter.key();
1022 const labelList& otherEdgeFaces = iter.val();
1025 if (danglingTriangle(faceEdges[edgeFace0[edgeI]], edgeFace1))
1027 keepTriangles[edgeFace0[edgeI]] =
false;
1030 if (danglingTriangle(faceEdges[edgeFace1[edgeI]], edgeFace1))
1032 keepTriangles[edgeFace1[edgeI]] =
false;
1035 for (
const label triI : otherEdgeFaces)
1037 if (danglingTriangle(faceEdges[triI], edgeFace1))
1039 keepTriangles[triI] =
false;
1050 const triSurface&
s,
1058 ListOps::createWithValue<bool>(
s.size(), newToOldFaces,
true,
false)
1061 newToOldPoints.setSize(
s.points().size());
1062 oldToNewPoints.setSize(
s.points().size());
1063 oldToNewPoints = -1;
1067 forAll(include, oldFacei)
1069 if (include[oldFacei])
1072 for (
const label oldPointi :
s[oldFacei])
1074 if (oldToNewPoints[oldPointi] == -1)
1076 oldToNewPoints[oldPointi] = pointi;
1077 newToOldPoints[pointi++] = oldPointi;
1082 newToOldPoints.setSize(pointi);
1087 forAll(newToOldPoints, i)
1089 newPoints[i] =
s.points()[newToOldPoints[i]];
1092 List<labelledTri> newTriangles(newToOldFaces.size());
1097 const labelledTri& tri =
s[newToOldFaces[i]];
1099 newTriangles[i][0] = oldToNewPoints[tri[0]];
1100 newTriangles[i][1] = oldToNewPoints[tri[1]];
1101 newTriangles[i][2] = oldToNewPoints[tri[2]];
1102 newTriangles[i].region() = tri.region();
1119 const bitSet& ignoreCells
1123 mergeDistance_(params.mergeTol()*
mesh.bounds().
mag()),
1124 cellCutType_(
mesh.nCells(), cutType::UNVISITED)
1130 Pout<<
"isoSurfaceCell:" <<
nl 1133 <<
" isoValue : " << iso <<
nl 1134 <<
" filter : " <<
Switch(regularise) <<
nl 1137 <<
" mergeDistance : " << mergeDistance_ <<
nl 1138 <<
" ignoreCells : " << ignoreCells.
count()
1144 label nBlockedCells = 0;
1147 nBlockedCells +=
blockCells(cellCutType_, ignoreCells);
1158 for (label celli = 0; celli <
mesh_.
nCells(); ++celli)
1172 Pout<<
"isoSurfaceCell : candidate cells cut " 1174 <<
" blocked " << nBlockedCells
1180 const auto& fvmesh = refCast<const fvMesh>(
mesh);
1186 "isoSurfaceCell.cutType",
1187 fvmesh.time().timeName(),
1199 forAll(cellCutType_, celli)
1201 debugFld[celli] = cellCutType_[celli];
1204 Pout<<
"Writing cut types:" 1205 << debugField.objectPath() <<
endl;
1211 DynamicList<point> snappedPoints(nCutCells_);
1234 Pout<<
"isoSurfaceCell : shifted " << snappedPoints.size()
1235 <<
" cell centres to intersection." <<
endl;
1238 snappedPoints.shrink();
1239 label nCellSnaps = snappedPoints.size();
1262 Pout<<
"isoSurfaceCell : shifted " << snappedPoints.size()-nCellSnaps
1263 <<
" vertices to intersection." <<
endl;
1271 DynamicList<point> triPoints(nCutCells_);
1272 DynamicList<label> triMeshCells(nCutCells_);
1292 Pout<<
"isoSurfaceCell : generated " << triMeshCells.size()
1293 <<
" unmerged triangles." <<
endl;
1297 label nOldPoints = triPoints.size();
1300 DynamicList<label> trimTriMap;
1305 isoSurfacePoint::trimToBox
1311 interpolatedPoints_,
1312 interpolatedOldPoints_,
1313 interpolationWeights_
1315 triMeshCells =
labelField(triMeshCells, trimTriMap);
1321 tmpsurf = stitchTriPoints
1331 Pout<<
"isoSurfaceCell : generated " << triMap.size()
1332 <<
" merged triangles." <<
endl;
1341 labelList newTriPointMergeMap(nOldPoints, -1);
1342 forAll(trimTriPointMap, trimPointI)
1344 label oldPointI = trimTriPointMap[trimPointI];
1347 label pointI = triPointMergeMap_[trimPointI];
1350 newTriPointMergeMap[oldPointI] = pointI;
1354 triPointMergeMap_.
transfer(newTriPointMergeMap);
1367 Pout<<
"isoSurfaceCell : checking " << tmpsurf.size()
1368 <<
" triangles for validity." <<
endl;
1381 Map<labelList> edgeFacesRest;
1398 label nDangling = markDanglingTriangles
1409 Pout<<
"isoSurfaceCell : detected " << nDangling
1410 <<
" dangling triangles." <<
endl;
1423 tmpsurf = subsetMesh
1440 tmpsurf.swapPoints(
pts);
1444 tmpsurf.triFaceFaces(faces);
const scalarField & pointValues() const noexcept
The mesh point values used for creating the iso-surface.
Field< label > labelField
Specialisation of Field<T> for label.
void size(const label n)
Older name for setAddressableSize.
unsigned int count(const bool on=true) const
Count number of bits set.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
label blockCells(UList< cutType > &cuts, const bitSet &ignoreCells) const
Mark ignoreCells as BLOCKED.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
label nPoints() const noexcept
Number of mesh points.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
const scalarField & cVals_
Cell values.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void append(const T &val)
Append an element at the end of the list.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
Preferences for controlling iso-surface algorithms.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool found(const T &val, label pos=0) const
Same as contains()
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
labelList findIndices(const ListType &input, typename ListType::const_reference val, label start=0)
Linear search to find all occurrences of given element.
This class describes the interaction of an object (often a face) and a point. It carries the info of ...
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
Low-level components common to various iso-surface algorithms.
const scalar iso_
Iso value.
MinMax< label > minMax(const labelHashSet &set)
Find the min/max values of labelHashSet.
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
label fcIndex(const label i) const noexcept
The forward circular index. The next index in the list which returns to the first at the end of the l...
label mergePoints(const PointList &points, labelList &pointToUnique, labelList &uniquePoints, const scalar mergeTol=SMALL, const bool verbose=false)
Calculate merge mapping, preserving the original point order. All points closer/equal mergeTol are to...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
List< face > faceList
List of faces.
#define defineIsoSurfaceInterpolateMethods(ThisClass)
const boundBox & getClipBounds() const noexcept
Get optional clipping bounding box.
vectorField pointField
pointField is a vectorField.
void setSize(const label n)
Alias for resize()
const polyMesh & mesh_
Reference to mesh.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ const Field< vector > edgeCentres(faMeshTools::flattenEdgeField(aMesh.edgeCentres(), true))
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
label calcCellCuts(List< cutType > &cuts) const
Populate a list of candidate cell cuts using getCellCutType()
scalar mag() const
The magnitude/length of the bounding box diagonal.
labelList meshCells_
For every face, the original cell in mesh.
const scalarField & cellValues() const noexcept
The mesh cell values used for creating the iso-surface.
const polyMesh & mesh() const noexcept
The mesh for which the iso-surface is associated.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
A surface formed by the iso value. After "Polygonising A Scalar Field Using Tetrahedrons", Paul Bourke (http://paulbourke.net/geometry/polygonise) and "Regularised Marching Tetrahedra: improved iso-surface extraction", G.M. Treece, R.W. Prager and A.H. Gee.
const vectorField & cellCentres() const
errorManip< error > abort(error &err)
label find(const T &val) const
Find index of the first occurrence of the value.
isoSurfaceCell(const polyMesh &mesh, const scalarField &cellValues, const scalarField &pointValues, const scalar iso, const isoSurfaceParams ¶ms=isoSurfaceParams(), const bitSet &ignoreCells=bitSet())
Construct from cell and point values.
const scalarField & pVals_
Point values.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
int debug
Static debugging option.
Pair< label > labelPair
A pair of labels.
List< geometricSurfacePatch > geometricSurfacePatchList
List of geometricSurfacePatch.
defineTypeNameAndDebug(combustionModel, 0)
Geometric merging of points. See below.
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]
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values within a list.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
vector point
Point is a vector.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label nCells() const noexcept
Number of mesh cells.
const dimensionedScalar c
Speed of light in a vacuum.
const polyBoundaryMesh & patches
List< surfZone > surfZoneList
List of surfZone.
void transfer(pointField &pointLst, List< face > &faceLst)
Transfer the components.
const labelListList & faceEdges() const
Return face-edge addressing.
const boundBox & bounds() const noexcept
Return mesh bounding box.
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
Triangulated surface description with patch information.
label rcIndex(const label i) const noexcept
The reverse circular index. The previous index in the list which returns to the last at the beginning...
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))
static bool test(const UList< face > &faces)
Test if given list of faces satisfies criteria for TET. (4 tri)
Convenience macros for instantiating iso-surface interpolate methods.
filterType filter() const noexcept
Get current filter type.
List< bool > boolList
A List of bools.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Do not request registration (bool: false)
const volScalarField & p0
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
scalar mergeTol() const noexcept
Get current merge tolerance.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
forAllConstIters(mixture.phases(), phase)
static constexpr const zero Zero
Global zero (0)