Go to the documentation of this file.
72 bool aLower = (pointValues[tri[0]] < iso_);
73 bool bLower = (pointValues[tri[1]] < iso_);
74 bool cLower = (pointValues[tri[2]] < iso_);
76 return !(aLower == bLower && aLower == cLower);
88 const cell& cFaces = mesh_.cells()[cellI];
90 if (isTet.
get(cellI) == 1)
94 const face&
f = mesh_.faces()[cFaces[cFaceI]];
96 for (
label fp = 1; fp <
f.size() - 1; fp++)
100 if (isTriCut(tri, pointValues))
110 bool cellLower = (cellValues[cellI] < iso_);
113 bool edgeCut =
false;
117 label faceI = cFaces[cFaceI];
118 const face&
f = mesh_.faces()[faceI];
123 if ((pointValues[
f[fp]] < iso_) != cellLower)
135 const label fp0 = mesh_.tetBasePtIs()[faceI];
136 label fp =
f.fcIndex(fp0);
137 for (
label i = 2; i <
f.size(); i++)
139 label nextFp =
f.fcIndex(fp);
141 if (isTriCut(
triFace(
f[fp0],
f[fp],
f[nextFp]), pointValues))
162 const labelList& cPoints = mesh_.cellPoints(cellI);
168 if ((pointValues[cPoints[i]] < iso_) != cellLower)
174 if (nPyrCuts == cPoints.
size())
198 cellCutType_.setSize(mesh_.nCells());
200 forAll(mesh_.cells(), cellI)
202 cellCutType_[cellI] = calcCutType(isTet, cVals, pVals, cellI);
204 if (cellCutType_[cellI] == CUT)
212 Pout<<
"isoSurfaceCell : detected " << nCutCells_
213 <<
" candidate cut cells." <<
endl;
246 if (tri0[fp0p1] == tri1[fp1p1] || tri0[fp0p1] == tri1[fp1m1])
248 common[0] = tri0[fp0];
249 common[1] = tri0[fp0p1];
263 sum +=
s[i].centre(
s.points());
280 if (localTris.size() == 1)
286 else if (localTris.size() == 2)
292 labelPair shared = findCommonPoints(tri0, tri1);
312 + tri1.
centre(localPoints)
319 else if (localTris.size())
341 scalar minCos = GREAT;
346 if (cosAngle < minCos)
377 snappedCc.
setSize(mesh_.nCells());
385 forAll(mesh_.cells(), cellI)
387 if (cellCutType_[cellI] == CUT && isTet.
get(cellI) == 0)
389 scalar cVal = cVals[cellI];
391 const cell& cFaces = mesh_.cells()[cellI];
395 pointToLocal.clear();
402 const face&
f = mesh_.faces()[cFaces[cFaceI]];
408 scalar
s = isoFraction(cVal, pVals[pointI]);
410 if (
s >= 0.0 &&
s <= 0.5)
412 if (pointToLocal.insert(pointI, localPoints.size()))
414 localPoints.
append((1.0-
s)*cc[cellI]+
s*pts[pointI]);
420 if (localPoints.size() == 1)
423 snappedCc[cellI] = snappedPoints.size();
424 snappedPoints.
append(localPoints[0]);
432 else if (localPoints.size() == 2)
435 snappedCc[cellI] = snappedPoints.size();
436 snappedPoints.
append(0.5*(localPoints[0]+localPoints[1]));
444 else if (localPoints.size())
449 label faceI = cFaces[cFaceI];
450 const face&
f = mesh_.faces()[faceI];
456 const label fp0 = mesh_.tetBasePtIs()[faceI];
457 label fp =
f.fcIndex(fp0);
460 label nextFp =
f.fcIndex(fp);
465 s[0] = isoFraction(cVal, pVals[tri[0]]);
466 s[1] = isoFraction(cVal, pVals[tri[1]]);
467 s[2] = isoFraction(cVal, pVals[tri[2]]);
471 (
s[0] >= 0.0 &&
s[0] <= 0.5)
472 && (
s[1] >= 0.0 &&
s[1] <= 0.5)
473 && (
s[2] >= 0.0 &&
s[2] <= 0.5)
478 (mesh_.faceOwner()[faceI] == cellI)
479 == (cVal >= pVals[tri[0]])
486 pointToLocal[tri[1]],
487 pointToLocal[tri[0]],
488 pointToLocal[tri[2]],
499 pointToLocal[tri[0]],
500 pointToLocal[tri[1]],
501 pointToLocal[tri[2]],
513 surfPoints.transfer(localPoints);
523 snappedCc[cellI] = snappedPoints.size();
551 const face&
f = mesh_.faces()[faceI];
553 const label fp0 = mesh_.tetBasePtIs()[faceI];
554 label fp =
f.fcIndex(fp0);
557 label nextFp =
f.fcIndex(fp);
573 s[0] = isoFraction(pointValues[pointI], pointValues[
b]);
574 s[1] = isoFraction(pointValues[pointI], pointValues[
c]);
575 s[2] = isoFraction(pointValues[pointI], cellValues[cellI]);
579 (
s[0] >= 0.0 &&
s[0] <= 0.5)
580 && (
s[1] >= 0.0 &&
s[1] <= 0.5)
581 && (
s[2] >= 0.0 &&
s[2] <= 0.5)
584 point p0 = (1.0-
s[0])*pts[pointI] +
s[0]*pts[
b];
585 point p1 = (1.0-
s[1])*pts[pointI] +
s[1]*pts[
c];
586 point p2 = (1.0-
s[2])*pts[pointI] +
s[2]*cc[cellI];
590 (mesh_.faceOwner()[faceI] == cellI)
591 == (pointValues[pointI] > cellValues[cellI])
594 localTriPoints.
append(p0);
595 localTriPoints.
append(p1);
596 localTriPoints.
append(p2);
600 localTriPoints.
append(p1);
601 localTriPoints.
append(p0);
602 localTriPoints.
append(p2);
622 const cell& cFaces = mesh_.cells()[cellI];
628 const face&
f = mesh_.faces()[faceI];
634 const face&
f1 = mesh_.faces()[cFaces[cFaceI]];
662 s[0] = isoFraction(pointValues[pointI], pointValues[
b]);
663 s[1] = isoFraction(pointValues[pointI], pointValues[
c]);
664 s[2] = isoFraction(pointValues[pointI], pointValues[ccPointI]);
668 (
s[0] >= 0.0 &&
s[0] <= 0.5)
669 && (
s[1] >= 0.0 &&
s[1] <= 0.5)
670 && (
s[2] >= 0.0 &&
s[2] <= 0.5)
673 point p0 = (1.0-
s[0])*pts[pointI] +
s[0]*pts[
b];
674 point p1 = (1.0-
s[1])*pts[pointI] +
s[1]*pts[
c];
675 point p2 = (1.0-
s[2])*pts[pointI] +
s[2]*pts[ccPointI];
677 if (mesh_.faceOwner()[faceI] != cellI)
679 localTriPoints.
append(p0);
680 localTriPoints.
append(p1);
681 localTriPoints.
append(p2);
685 localTriPoints.
append(p1);
686 localTriPoints.
append(p0);
687 localTriPoints.
append(p2);
716 const face&
f = mesh_.faces()[faceI++];
720 isBoundaryPoint.
set(
f[fp], 1);
727 const point greatPoint(GREAT, GREAT, GREAT);
729 pointField collapsedPoint(mesh_.nPoints(), greatPoint);
736 forAll(mesh_.pointFaces(), pointI)
738 if (isBoundaryPoint.
get(pointI) == 1)
753 cellCutType_[mesh_.faceOwner()[faceI]] == CUT
755 mesh_.isInternalFace(faceI)
756 && cellCutType_[mesh_.faceNeighbour()[faceI]] == CUT
773 localPointCells.
clear();
774 localTriPoints.
clear();
779 label own = mesh_.faceOwner()[faceI];
781 if (isTet.
get(own) == 1)
785 if (localPointCells.
insert(own))
787 genPointTris(pVals, pointI, faceI, own, localTriPoints);
803 if (mesh_.isInternalFace(faceI))
805 label nei = mesh_.faceNeighbour()[faceI];
807 if (isTet.
get(nei) == 1)
809 if (localPointCells.
insert(nei))
811 genPointTris(pVals, pointI, faceI, nei, localTriPoints);
829 if (localTriPoints.size() == 3)
833 points.transfer(localTriPoints);
840 else if (localTriPoints.size())
868 scalar minCos = GREAT;
873 scalar cosAngle = (n0 &
n);
874 if (cosAngle < minCos)
881 collapsedPoint[pointI] = calcCentre(surf);
895 snappedPoint.
setSize(mesh_.nPoints());
898 forAll(collapsedPoint, pointI)
902 if (
magSqr(collapsedPoint[pointI]) < 0.5*
magSqr(greatPoint))
904 snappedPoint[pointI] = snappedPoints.size();
905 snappedPoints.
append(collapsedPoint[pointI]);
913 const bool checkDuplicates,
942 <<
" points down to " << newPoints.size() <<
endl;
958 <<
"Merged points contain duplicates"
959 <<
" when merging with distance " << mergeDistance_ <<
endl
960 <<
"merged:" << newPoints.size() <<
" re-merged:"
961 << newNewPoints.size()
973 for (
label oldTriI = 0; oldTriI < nTris; oldTriI++)
977 triPointReverseMap[rawPointI],
978 triPointReverseMap[rawPointI+1],
979 triPointReverseMap[rawPointI+2],
982 if ((tri[0] != tri[1]) && (tri[0] != tri[2]) && (tri[1] != tri[2]))
984 newToOldTri.
append(oldTriI);
1000 if (checkDuplicates)
1004 Pout<<
"isoSurfaceCell : merged from " << nTris
1005 <<
" down to " << tris.
size() <<
" triangles." <<
endl;
1011 centres[triI] = tris[triI].centre(newPoints);
1027 Pout<<
"isoSurfaceCell : detected "
1028 << centres.size()-mergedCentres.size()
1029 <<
" duplicate triangles." <<
endl;
1037 labelList newToMaster(mergedCentres.size(), -1);
1040 label mergedI = oldToMerged[triI];
1042 if (newToMaster[mergedI] == -1)
1044 newToMaster[mergedI] = triI;
1045 newToOldTri.
append(triMap[triI]);
1046 tris[newTriI++] = tris[triI];
1068 if (
f[fp] < 0 ||
f[fp] >= surf.
points().size())
1071 <<
"triangle " << faceI <<
" vertices " <<
f
1072 <<
" uses point indices outside point range 0.."
1079 if ((
f[0] ==
f[1]) || (
f[0] ==
f[2]) || (
f[1] ==
f[2]))
1082 <<
"triangle " << faceI
1083 <<
" uses non-unique vertices " <<
f
1096 label nbrFaceI = fFaces[i];
1098 if (nbrFaceI <= faceI)
1108 ((
f[0] == nbrF[0]) || (
f[0] == nbrF[1]) || (
f[0] == nbrF[2]))
1109 && ((
f[1] == nbrF[0]) || (
f[1] == nbrF[1]) || (
f[1] == nbrF[2]))
1110 && ((
f[2] == nbrF[0]) || (
f[2] == nbrF[1]) || (
f[2] == nbrF[2]))
1114 <<
"triangle " << faceI <<
" vertices " <<
f
1115 <<
" coords:" <<
f.points(surf.
points())
1116 <<
" has the same vertices as triangle " << nbrFaceI
1117 <<
" vertices " << nbrF
1143 edgeCentres[edgeI++] = 0.5*(
points[tri[0]]+
points[tri[1]]);
1144 edgeCentres[edgeI++] = 0.5*(
points[tri[1]]+
points[tri[2]]);
1145 edgeCentres[edgeI++] = 0.5*(
points[tri[2]]+
points[tri[0]]);
1161 Pout<<
"isoSurfaceCell : detected "
1162 << mergedCentres.size()
1163 <<
" edges on " << surf.
size() <<
" triangles." <<
endl;
1173 faceEdges.setSize(surf.
size());
1177 faceEdges[triI][0] = oldToMerged[edgeI++];
1178 faceEdges[triI][1] = oldToMerged[edgeI++];
1179 faceEdges[triI][2] = oldToMerged[edgeI++];
1184 edgeFace0.
setSize(mergedCentres.size());
1186 edgeFace1.
setSize(mergedCentres.size());
1188 edgeFacesRest.clear();
1190 forAll(oldToMerged, oldEdgeI)
1192 label triI = oldEdgeI / 3;
1193 label edgeI = oldToMerged[oldEdgeI];
1195 if (edgeFace0[edgeI] == -1)
1197 edgeFace0[edgeI] = triI;
1199 else if (edgeFace1[edgeI] == -1)
1201 edgeFace1[edgeI] = triI;
1212 if (iter != edgeFacesRest.end())
1221 edgeFacesRest.insert(edgeI,
labelList(1, triI));
1238 if (edgeFace1[fEdges[i]] == -1)
1244 if (nOpen == 1 || nOpen == 2 || nOpen == 3)
1265 keepTriangles.
setSize(faceEdges.size());
1266 keepTriangles =
true;
1268 label nDangling = 0;
1276 label edgeI = iter.key();
1277 const labelList& otherEdgeFaces = iter();
1280 if (danglingTriangle(faceEdges[edgeFace0[edgeI]], edgeFace1))
1282 keepTriangles[edgeFace0[edgeI]] =
false;
1285 if (danglingTriangle(faceEdges[edgeFace1[edgeI]], edgeFace1))
1287 keepTriangles[edgeFace1[edgeI]] =
false;
1290 forAll(otherEdgeFaces, i)
1292 label triI = otherEdgeFaces[i];
1293 if (danglingTriangle(faceEdges[triI], edgeFace1))
1295 keepTriangles[triI] =
false;
1314 createWithValues<boolList>
1323 newToOldPoints.
setSize(
s.points().size());
1324 oldToNewPoints.
setSize(
s.points().size());
1325 oldToNewPoints = -1;
1329 forAll(include, oldFacei)
1331 if (include[oldFacei])
1340 if (oldToNewPoints[oldPointI] == -1)
1342 oldToNewPoints[oldPointI] = pointI;
1343 newToOldPoints[pointI++] = oldPointI;
1348 newToOldPoints.
setSize(pointI);
1353 forAll(newToOldPoints, i)
1355 newPoints[i] =
s.points()[newToOldPoints[i]];
1365 newTriangles[i][0] = oldToNewPoints[tri[0]];
1366 newTriangles[i][1] = oldToNewPoints[tri[1]];
1367 newTriangles[i][2] = oldToNewPoints[tri[2]];
1368 newTriangles[i].region() = tri.region();
1372 return triSurface(newTriangles,
s.patches(), newPoints,
true);
1384 const bool regularise,
1386 const scalar mergeTol
1398 Pout<<
"isoSurfaceCell : mergeTol:" << mergeTol
1400 <<
" mergeDistance:" << mergeDistance_ <<
endl;
1410 if (tet.
isA(mesh_, cellI))
1412 isTet.
set(cellI, 1);
1419 calcCutTypes(isTet, cVals, pVals);
1438 snappedCc.
setSize(mesh_.nCells());
1444 Pout<<
"isoSurfaceCell : shifted " << snappedPoints.size()
1445 <<
" cell centres to intersection." <<
endl;
1449 label nCellSnaps = snappedPoints.size();
1466 snappedPoint.
setSize(mesh_.nPoints());
1472 Pout<<
"isoSurfaceCell : shifted " << snappedPoints.size()-nCellSnaps
1473 <<
" vertices to intersection." <<
endl;
1486 mesh_.cellCentres(),
1499 Pout<<
"isoSurfaceCell : generated " << triMeshCells.size()
1500 <<
" unmerged triangles." <<
endl;
1518 interpolatedPoints_,
1519 interpolatedOldPoints_,
1520 interpolationWeights_
1522 triMeshCells =
labelField(triMeshCells, trimTriMap);
1529 triSurface::operator=
1542 Pout<<
"isoSurfaceCell : generated " << triMap.
size()
1543 <<
" merged triangles." <<
endl;
1552 labelList newTriPointMergeMap(nOldPoints, -1);
1553 forAll(trimTriPointMap, trimPointI)
1555 label oldPointI = trimTriPointMap[trimPointI];
1558 label pointI = triPointMergeMap_[trimPointI];
1561 newTriPointMergeMap[oldPointI] = pointI;
1565 triPointMergeMap_.
transfer(newTriPointMergeMap);
1568 meshCells_.setSize(triMap.
size());
1571 meshCells_[i] = triMeshCells[triMap[i]];
1578 Pout<<
"isoSurfaceCell : checking " << size()
1579 <<
" triangles for validity." <<
endl;
1584 validTri(*
this, triI);
1610 label nDangling = markDanglingTriangles
1621 Pout<<
"isoSurfaceCell : detected " << nDangling
1622 <<
" dangling triangles." <<
endl;
1635 triSurface::operator=
1645 meshCells_ =
labelField(meshCells_, subsetTriMap);
vector normal(const pointField &) const
Vector normal; magnitude is equal to area of face.
scalar mag() const
The magnitude of the bounding box span.
void genPointTris(const scalarField &cellValues, const scalarField &pointValues, const label pointI, const label faceI, const label cellI, DynamicList< point, 64 > &localTriPoints) const
Generate triangles for face connected to pointI.
const Field< PointType > & points() const
Return reference to global points.
void calcCutTypes(const PackedBoolList &, const scalarField &cellValues, const scalarField &pointValues)
List< label > labelList
A List of labels.
An STL-conforming iterator.
#define forAll(list, i)
Loop across all elements in list.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
point centre(const pointField &) const
Return centre (centroid)
static label markDanglingTriangles(const List< FixedList< label, 3 > > &faceEdges, const labelList &edgeFace0, const labelList &edgeFace1, const Map< labelList > &edgeFacesRest, boolList &keepTriangles)
Mark all non-fully connected triangles.
void set(const PackedList< 1 > &)
Set specified bits.
label nEdges() const
Return number of edges in patch.
Standard boundBox + extra functionality for use in octree.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
bool hit() const
Is there a hit.
A cellMatcher for tet cells.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
scalar isoFraction(const scalar s0, const scalar s1) const
Get location of iso value as fraction inbetween s0,s1.
List< geometricSurfacePatch > geometricSurfacePatchList
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
Mesh consisting of general polyhedral cells.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
static labelPair findCommonPoints(const labelledTri &, const labelledTri &)
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=*(cellModeller::lookup("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]=cellShape(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, ListType &)
Inplace renumber the values of a list.
static bool danglingTriangle(const FixedList< label, 3 > &fEdges, const labelList &edgeFace1)
Is triangle (given by 3 edges) not fully connected?
Triangle storage. Null constructable (unfortunately triangle<point, point> is not)
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Pre-declare SubField and related Field type.
void calcSnappedPoint(const PackedBoolList &isTet, const scalarField &cVals, const scalarField &pVals, DynamicList< point > &triPoints, labelList &snappedPoint) const
Determine per point whether all near cuts can be snapped to single.
Field< label > labelField
Specialisation of Field<T> for label.
Triangulated surface description with patch information.
A subset of mesh faces organised as a primitive patch.
const Point & hitPoint() const
Return hit point.
A patch is a list of labels that address the faces in the global face list.
static bool validTri(const triSurface &, const label)
Check single triangle for (topological) validity.
void clear()
Clear the addressed list, i.e. set the size to zero.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
triSurface stitchTriPoints(const bool checkDuplicates, const List< point > &triPoints, labelList &triPointReverseMap, labelList &triMap) const
void calcAddressing() const
Calculate addressing.
static void trimToBox(const treeBoundBox &bb, DynamicList< point > &triPoints, DynamicList< label > &triMeshCells)
Trim all triangles to box.
Macros for easy insertion into run-time selection tables.
errorManip< error > abort(error &err)
unsigned int get(const label) const
Get value at index I.
void setPoint(const Point &p)
List< bool > boolList
Bool container classes.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().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))
label start() const
Return start label of this patch in the polyMesh face list.
isoSurfaceCell(const polyMesh &mesh, const scalarField &cellValues, const scalarField &pointValues, const scalar iso, const bool regularise, const boundBox &bounds=boundBox::greatBox, const scalar mergeTol=1e-6)
Construct from dictionary.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
cellCutType calcCutType(const PackedBoolList &, const scalarField &cellValues, const scalarField &pointValues, const label) const
Determine whether cell is cut.
void calcSnappedCc(const PackedBoolList &isTet, const scalarField &cVals, const scalarField &pVals, DynamicList< point > &triPoints, labelList &snappedCc) const
Determine per cc whether all near cuts can be snapped to single.
const boundBox & bounds() const
Return mesh bounding box.
void setSize(const label)
Reset size of List.
label markZones(const boolList &borderEdge, labelList &faceZone) const
(size and) fills faceZone with zone of face. Zone is area
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An ordered pair of two objects of type <T> with first() and second() elements.
A triangular face using a FixedList of labels corresponding to mesh vertices.
prefixOSstream Pout(cout, "Pout")
void clear()
Clear all entries from table.
const Field< PointType > & faceNormals() const
Return face normals for patch.
static const boundBox greatBox
A very large boundBox: min/max == -/+ VGREAT.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual bool isA(const primitiveMesh &mesh, const label cellI)
Exact match. Uses faceSizeMatch.
bool isTriCut(const triFace &tri, const scalarField &pointValues) const
Does any edge of triangle cross iso value?
label size() const
Return the number of elements in the FixedList.
pointIndexHit collapseSurface(const label cellI, pointField &localPoints, DynamicList< labelledTri, 64 > &localTris) const
bool insert(const Key &key)
Insert a new entry.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
void clearStorage()
Clear the list and delete storage.
Triangle with additional region number.
A bounding box defined in terms of the points at its extremities.
const dimensionedScalar c
Speed of light in a vacuum.
A face is a list of labels corresponding to mesh vertices.
static triSurface subsetMesh(const triSurface &s, const labelList &newToOldFaces, labelList &oldToNewPoints, labelList &newToOldPoints)
void size(const label)
Override size to be inconsistent with allocated storage.
const labelListList & faceFaces() const
Return face-face addressing.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
defineTypeNameAndDebug(combustionModel, 0)
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurences of given element. Linear search.
#define WarningInFunction
Report a warning using Foam::Warning.
A cell is defined as a list of faces with extra functionality.
label mergePoints(const UList< Type > &points, const scalar mergeTol, const bool verbose, labelList &pointMap, const Type &origin=Type::zero)
Sorts and merges points. All points closer than/equal mergeTol get merged.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
static point calcCentre(const triSurface &)