Go to the documentation of this file.
56 scalar faceAreaLimit = SMALL;
60 if (
mag(fAreas[fI]) > faceAreaLimit)
102 isErrorPoint[
f[pI]] =
true;
106 syncTools::syncPointList
128 const labelList& faceEdges = mesh_.faceEdges()[faceI];
129 const edgeList& edges = mesh_.edges();
135 const label edgeI = faceEdges[eI];
136 const edge&
e = edges[edgeI];
156 edgeLabels[count++] = edgeI;
160 if (count != edgeLabels.
size())
174 const vector& collapseAxis,
195 const label facePointI = facePtsNeg[fPtI];
196 const label facePtPriority = pointPriority[facePointI];
198 if (facePtPriority > maxPriority)
200 maxPriority = facePtPriority;
201 maxPriorityPts.
clear();
202 maxPriorityPts.
append(facePointI);
204 else if (facePtPriority == maxPriority)
206 maxPriorityPts.
append(facePointI);
210 if (!maxPriorityPts.empty())
214 forAll(maxPriorityPts, ptI)
216 averagePt += pts[maxPriorityPts[ptI]];
219 collapseToPtA = averagePt/maxPriorityPts.size();
224 maxPriorityPts.
clear();
226 labelList faceEdgesNeg = edgesFromPoints(faceI, facePtsNeg);
228 forAll(faceEdgesNeg, edgeI)
235 collapsePointToLocation.set(facePtsNeg[pI], collapseToPtA);
245 const label facePointI = facePtsPos[fPtI];
246 const label facePtPriority = pointPriority[facePointI];
248 if (facePtPriority > maxPriority)
250 maxPriority = facePtPriority;
251 maxPriorityPts.
clear();
252 maxPriorityPts.
append(facePointI);
254 else if (facePtPriority == maxPriority)
256 maxPriorityPts.
append(facePointI);
260 if (!maxPriorityPts.empty())
264 forAll(maxPriorityPts, ptI)
266 averagePt += pts[maxPriorityPts[ptI]];
269 collapseToPtB = averagePt/maxPriorityPts.size();
273 labelList faceEdgesPos = edgesFromPoints(faceI, facePtsPos);
275 forAll(faceEdgesPos, edgeI)
282 collapsePointToLocation.set(facePtsPos[pI], collapseToPtB);
298 const face&
f = mesh_.faces()[faceI];
307 const label facePointI = facePts[fPtI];
308 const label facePtPriority = pointPriority[facePointI];
310 if (facePtPriority > maxPriority)
312 maxPriority = facePtPriority;
313 maxPriorityPts.
clear();
314 maxPriorityPts.
append(facePointI);
316 else if (facePtPriority == maxPriority)
318 maxPriorityPts.
append(facePointI);
322 if (!maxPriorityPts.empty())
326 forAll(maxPriorityPts, ptI)
328 averagePt += pts[maxPriorityPts[ptI]];
331 collapseToPt = averagePt/maxPriorityPts.size();
374 const labelList& faceEdges = mesh_.faceEdges()[faceI];
378 const label edgeI = faceEdges[eI];
384 collapsePointToLocation.set(
f[pI], collapseToPt);
406 scalar magJ =
mag(J);
421 detJ =
max(
det(J), SMALL);
429 if (
magSqr(collapseAxis) > VSMALL)
431 collapseAxis /=
mag(collapseAxis);
442 if (
mag(eVals.
y() - eVals.
x()) < 100*SMALL)
451 collapseAxis /=
mag(collapseAxis);
489 const scalar cellOwnerVol =
max(0.0, V[cellOwner[intFaceI]]);
490 const scalar cellNeighbourVol =
max(0.0, V[cellNeighbour[intFaceI]]);
492 scalar targetFaceSizeA =
Foam::pow(cellOwnerVol, 1.0/3.0);
493 scalar targetFaceSizeB =
Foam::pow(cellNeighbourVol, 1.0/3.0);
495 targetFaceSizes[intFaceI] = 0.5*(targetFaceSizeA + targetFaceSizeB);
515 neiCellVolumes[bFaceI++] =
max(0.0, V[faceCells[facei]]);
524 const label extFaceI = patchFaceI + patch.
start();
525 const scalar cellOwnerVol =
max(0.0, V[cellOwner[extFaceI]]);
527 targetFaceSizes[extFaceI] =
Foam::pow(cellOwnerVol, 1.0/3.0);
544 const label localFaceI = patchFaceI + patch.
start();
545 const scalar cellOwnerVol =
max(0.0, V[cellOwner[localFaceI]]);
546 const scalar cellNeighbourVol = neiCellVolumes[bFaceI++];
548 scalar targetFaceSizeA =
Foam::pow(cellOwnerVol, 1.0/3.0);
549 scalar targetFaceSizeB =
Foam::pow(cellNeighbourVol, 1.0/3.0);
551 targetFaceSizes[localFaceI]
552 = 0.5*(targetFaceSizeA + targetFaceSizeB);
558 return targetFaceSizes;
567 const scalar targetFaceSize,
573 const scalar collapseSizeLimitCoeff = faceFilterFactor[faceI];
581 const scalar fA =
f.mag(pts);
584 scalar aspectRatio = 1.0;
586 faceCollapseAxisAndAspectRatio(
f, fC, collapseAxis, aspectRatio);
597 d[fPtI] = (collapseAxis & (pt - fC));
616 scalar dShift = -0.5*(d.first() + d.last());
663 if (dNeg.
size() == 0 || dPos.
size() == 0)
666 <<
"All points on one side of face centre, not collapsing."
676 if (
magSqr(collapseAxis) < VSMALL)
680 else if (fA < aspectRatio*
sqr(targetFaceSize*collapseSizeLimitCoeff))
684 allowEarlyCollapseToPoint_
685 && (d.last() - d.first())
687 *allowEarlyCollapseCoeff_*maxCollapseFaceToPointSideLengthCoeff_
694 (dNeg.
last() < guardFraction_*dNeg.
first())
695 && (dPos.
first() > guardFraction_*dPos.
last())
698 typeOfCollapse = toEdge;
702 (d.last() - d.first())
704 *maxCollapseFaceToPointSideLengthCoeff_
723 collapsePointToLocation
726 else if (typeOfCollapse == toEdge)
741 collapsePointToLocation
745 return typeOfCollapse;
755 label masterPoint = -1;
757 const label e0 =
e.start();
760 const label e0Priority = pointPriority[e0];
761 const label e1Priority = pointPriority[e1];
763 if (e0Priority > e1Priority)
767 else if (e0Priority < e1Priority)
771 else if (e0Priority == e1Priority)
810 const label otherPointI,
817 const label e0Priority = pointPriority[pointI];
818 const label e1Priority = pointPriority[otherPointI];
820 if (e0Priority > e1Priority)
822 collapsePointToLocation.set
828 else if (e0Priority < e1Priority)
830 collapsePointToLocation.set
838 collapsePointToLocation.set
862 const edgeList& edges = mesh_.edges();
865 label nUncollapsed = 0;
871 const edge&
e = edges[eI];
873 const label startCollapseIndex
874 = allPointInfo[
e.start()].collapseIndex();
876 if (startCollapseIndex != -1 && startCollapseIndex != -2)
878 const label endCollapseIndex
879 = allPointInfo[
e.end()].collapseIndex();
884 && startCollapseIndex == endCollapseIndex
887 const labelList& ptEdgesStart = pointEdges[
e.start()];
889 forAll(ptEdgesStart, ptEdgeI)
891 const label edgeI = ptEdgesStart[ptEdgeI];
893 const label nbrPointI
894 = edges[edgeI].otherVertex(
e.start());
896 = allPointInfo[nbrPointI].collapseIndex();
901 && nbrIndex == startCollapseIndex
926 uniqueCollapses.
clear();
927 duplicateCollapses.
clear();
931 label index = allPointInfo[
f[fpI]].collapseIndex();
934 if (index != allPointInfo[
f.prevLabel(fpI)].collapseIndex())
936 if (!uniqueCollapses.
insert(index))
939 duplicateCollapses.
insert(index);
948 label index = allPointInfo[
f[fpI]].collapseIndex();
949 if (duplicateCollapses.
found(index))
951 markedPoints[
f[fpI]] =
true;
967 const label pointI =
f[fpI];
968 const label newPointI = allPointInfo[pointI].collapseIndex();
976 const label prevPointI =
f[
f.fcIndex(fpI)];
977 const label prevNewPointI
978 = allPointInfo[prevPointI].collapseIndex();
980 if (newPointI != prevNewPointI)
997 label nEdges = countEdgesOnFace(
f, allPointInfo);
1024 const edgeList& edges = mesh_.edges();
1026 label nCollapsed = 0;
1031 allPointInfo.
clear();
1032 allPointInfo.
setSize(mesh_.nPoints());
1046 const edge&
e = edges[edgeI];
1048 label masterPointI =
e.start();
1051 if (pointPriority[
e.end()] > pointPriority[
e.start()])
1053 masterPointI =
e.end();
1056 label masterPointPriority = pointPriority[masterPointI];
1060 if (!collapsePointToLocation.found(masterPointI))
1062 const label otherVertex =
e.otherVertex(masterPointI);
1064 if (!collapsePointToLocation.found(otherVertex))
1067 << masterPointI <<
" on edge " << edgeI <<
" " <<
e
1068 <<
" is not marked for collapse."
1073 masterPointI = otherVertex;
1074 masterPointPriority = pointPriority[masterPointI];
1079 const point& collapsePoint = collapsePointToLocation[masterPointI];
1097 initPointInfo.
append(pec);
1100 initPointInfo.
append(pec);
1114 mesh_.globalData().nTotalPoints()
1136 label collapseIndex = allPointInfo[pointI].collapseIndex();
1139 if (collapseStrings.found(collapseIndex))
1141 label localPointI = collapseStrings[collapseIndex][0];
1145 f[newFp++] = localPointI;
1148 else if (collapseIndex == -1)
1151 <<
"Point " << pointI <<
" was not visited by PointEdgeWave"
1156 f[newFp++] = pointI;
1167 const label size = newFp;
1171 for (
label fp = 2; fp < size; fp++)
1184 <<
"Removing consecutive duplicate vertex in face "
1188 else if (index == fp2)
1191 <<
"Removing non-consecutive duplicate vertex in face "
1196 else if (index != -1)
1199 <<
"Pinched face " <<
f <<
endl;
1200 f[newFp++] = pointI;
1204 f[newFp++] = pointI;
1218 maxCollapseFaceToPointSideLengthCoeff_(0),
1219 allowEarlyCollapseToPoint_(false),
1220 allowEarlyCollapseCoeff_(0)
1235 maxCollapseFaceToPointSideLengthCoeff_
1239 allowEarlyCollapseToPoint_
1243 allowEarlyCollapseCoeff_
1250 Info<<
"Edge Collapser Settings:" <<
nl
1251 <<
" Guard Fraction = " << guardFraction_ <<
nl
1252 <<
" Max collapse face to point side length = "
1253 << maxCollapseFaceToPointSideLengthCoeff_ <<
nl
1254 <<
" " << (allowEarlyCollapseToPoint_ ?
"Allow" :
"Do not allow")
1255 <<
" early collapse to point" <<
nl
1256 <<
" Early collapse coeff = " << allowEarlyCollapseCoeff_
1271 const labelList& faceOwner = mesh_.faceOwner();
1272 const labelList& faceNeighbour = mesh_.faceNeighbour();
1314 bool meshChanged =
false;
1324 forAll(allPointInfo, pointI)
1326 label collapseIndex = allPointInfo[pointI].collapseIndex();
1328 if (collapseIndex != -1 && collapseIndex != -2)
1331 if (fnd != nPerIndex.end())
1337 nPerIndex.insert(collapseIndex, 1);
1343 collapseStrings.resize(2*nPerIndex.size());
1350 forAll(allPointInfo, pointI)
1352 const label collapseIndex = allPointInfo[pointI].collapseIndex();
1354 if (collapseIndex != -1 && collapseIndex != -2)
1356 collapseStrings[collapseIndex].append(pointI);
1388 boolList cellRemoved(mesh_.nCells(),
false);
1390 label nUnvisited = 0;
1391 label nUncollapsed = 0;
1392 label nCollapsed = 0;
1421 <<
indent <<
"Not visited : " << nUnvisited <<
nl
1422 <<
indent <<
"Not collapsed : " << nUncollapsed <<
nl
1423 <<
indent <<
"Collapsed : " << nCollapsed <<
nl
1431 filterFace(collapseStrings, allPointInfo, newFaces[faceI]);
1435 label nCellCollapsed = 0;
1439 if (!cellRemoved[cellI])
1447 label faceI = cFaces[i];
1449 if (newFaces[faceI].size() < 3)
1455 Pout<<
"Cell:" << cellI
1456 <<
" uses faces:" << cFaces
1457 <<
" of which too many are marked for removal:"
1464 if (newFaces[cFaces[j]].size() < 3)
1466 Pout<<
' '<< cFaces[j];
1471 cellRemoved[cellI] =
true;
1486 Info<<
indent <<
"Collapsing " << nCellCollapsed <<
" cells" <<
endl;
1488 if (nCellCollapsed == 0)
1497 boolList doneFace(mesh_.nFaces(),
false);
1501 boolList usedPoint(mesh_.nPoints(),
false);
1503 forAll(cellRemoved, cellI)
1505 if (cellRemoved[cellI])
1514 const face&
f = newFaces[faceI];
1522 doneFace[faceI] =
true;
1529 usedPoint[
f[fp]] =
true;
1535 forAll(usedPoint, pointI)
1537 if (!usedPoint[pointI])
1539 removedPoints[pointI] =
true;
1547 forAll(allPointInfo, pointI)
1549 const label collapseIndex = allPointInfo[pointI].collapseIndex();
1550 const point& collapsePoint = allPointInfo[pointI].collapsePoint();
1554 removedPoints[pointI] ==
false
1555 && collapseIndex != -1
1556 && collapseIndex != -2
1574 forAll(allPointInfo, pointI)
1576 if (removedPoints[pointI] ==
true)
1578 const labelList& changedFaces = pointFaces[pointI];
1580 forAll(changedFaces, changedFaceI)
1582 label faceI = changedFaces[changedFaceI];
1584 if (!doneFace[faceI])
1586 doneFace[faceI] =
true;
1591 bool zoneFlip =
false;
1595 const faceZone& fZone = faceZones[zoneID];
1601 label own = faceOwner[faceI];
1605 if (mesh_.isInternalFace(faceI))
1607 nei = faceNeighbour[faceI];
1643 const bool allowCellCollapse
1648 const faceList faces = mesh_.faces();
1649 const edgeList& edges = mesh_.edges();
1659 label nUncollapsed = 0;
1677 collapsePointToLocation,
1688 const face&
f = faces[faceI];
1690 isCollapsedFace[faceI] = isFaceCollapsed(
f, allPointInfo);
1692 if (isCollapsedFace[faceI] < 1)
1694 determineDuplicatePointsOnFace
1715 forAll(markedPoints, pointI)
1717 if (markedPoints[pointI])
1719 const label index = allPointInfo[pointI].collapseIndex();
1721 const labelList& ptEdges = pointEdges[pointI];
1725 const label edgeI = ptEdges[ptEdgeI];
1726 const label nbrPointI = edges[edgeI].otherVertex(pointI);
1727 const label nbrIndex
1728 = allPointInfo[nbrPointI].collapseIndex();
1741 if (!allowCellCollapse)
1752 label faceI = cFaces[fI];
1754 if (isCollapsedFace[faceI])
1764 label faceI = cFaces[fI];
1766 const labelList& fEdges = faceEdges[faceI];
1771 label edgeI = fEdges[fEdgeI];
1779 markedEdges[edgeI] =
true;
1783 isCollapsedFace[faceI] =
false;
1791 <<
"Cell " << cellI <<
" " << cFaces <<
nl
1792 <<
"is " << nFaces <<
", "
1793 <<
"but cell collapse has been disabled."
1807 nUncollapsed += breakStringsAtEdges
1816 Info<<
" Uncollapsed edges = " << nUncollapsed <<
" / "
1819 if (nUncollapsed == 0)
1839 const edgeList& edges = mesh_.edges();
1841 label nCollapsed = 0;
1845 const edge&
e = edges[edgeI];
1849 if (
e.mag(
points) < minEdgeLen[edgeI])
1853 label masterPointI = edgeMaster(pointPriority,
e);
1855 if (masterPointI == -1)
1860 collapsePointToLocation.set(
e.start(),
average);
1866 collapsePointToLocation.set(masterPointI, collapsePt);
1881 const scalar maxCos,
1887 const edgeList& edges = mesh_.edges();
1900 label nCollapsed = 0;
1904 forAll(pointEdges, pointI)
1906 if (pointCanBeDeleted[pointI])
1908 const labelList& pEdges = pointEdges[pointI];
1910 if (pEdges.
size() == 2)
1914 label e0 = pEdges[0];
1915 label e1 = pEdges[1];
1920 scalar e0length =
mag
1925 scalar e1length =
mag
1930 if (e0length <= e1length)
1934 checkBoundaryPointMergeEdges
1937 edges[e0].otherVertex(pointI),
1939 collapsePointToLocation
1946 checkBoundaryPointMergeEdges
1949 edges[e1].otherVertex(pointI),
1951 collapsePointToLocation
1974 const faceList& faces = mesh_.faces();
1976 const scalarField targetFaceSizes = calcTargetFaceSizes();
1979 label nCollapseToPoint = 0;
1980 label nCollapseToEdge = 0;
1984 const face&
f = faces[fI];
1986 if (faceFilterFactor[fI] <= 0)
1996 targetFaceSizes[fI],
1998 collapsePointToLocation,
2002 if (flagCollapseFace == noCollapse)
2006 else if (flagCollapseFace ==
toPoint)
2010 else if (flagCollapseFace == toEdge)
2017 <<
"Face is marked to be collapsed to " << flagCollapseFace
2018 <<
". Currently can only collapse to point/edge."
2023 return labelPair(nCollapseToPoint, nCollapseToEdge);
2036 const faceList& faces = mesh_.faces();
2038 const scalarField targetFaceSizes = calcTargetFaceSizes();
2041 label nCollapseToPoint = 0;
2042 label nCollapseToEdge = 0;
2051 const face&
f = faces[fI];
2053 if (faceFilterFactor[fI] <= 0)
2063 targetFaceSizes[fI],
2065 collapsePointToLocation,
2069 if (flagCollapseFace == noCollapse)
2073 else if (flagCollapseFace ==
toPoint)
2077 else if (flagCollapseFace == toEdge)
2084 <<
"Face is marked to be collapsed to " << flagCollapseFace
2085 <<
". Currently can only collapse to point/edge."
2090 return labelPair(nCollapseToPoint, nCollapseToEdge);
label longestEdge(const face &f, const pointField &pts)
Find the longest edge on a face. Face point labels index into pts.
label collapseIndex() const
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
scalarField calcTargetFaceSizes() const
Return the target length scale for each face.
Calculates points shared by more than two processor patches or cyclic patches.
label countEdgesOnFace(const face &f, List< pointEdgeCollapse > &allPointInfo) const
Count the number of edges on the face that will exist as a result.
bool checkMesh(const polyMeshGen &mesh, const bool report)
Check mesh for correctness. Returns false for no error.
label markMergeEdges(const scalar maxCos, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Mark (in collapseEdge) any edges to merge.
label breakStringsAtEdges(const PackedBoolList &markedEdges, PackedBoolList &collapseEdge, List< pointEdgeCollapse > &allPointInfo) const
Helper function that breaks strings of collapses if an edge is not.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
label whichPatch(const polyPatchList &, const label) const
Get index of patch for face.
T & first()
Return the first element of the list.
#define forAll(list, i)
Loop across all elements in list.
Removes selected points from mesh and updates faces using these points.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
Wave propagation of information through grid. Every iteration information goes through one layer of e...
void modifyPoint(const label, const point &, const label newZoneID, const bool inCell)
Modify coordinate.
A List obtained as a section of another List.
static HashSet< label > checkBadFaces(const polyMesh &mesh, const dictionary &meshQualityDict)
Calls motionSmoother::checkMesh and returns a set of bad faces.
static const label labelMax
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
void modifyFace(const face &f, const label faceI, const label own, const label nei, const bool flipFaceFlux, const label patchID, const label zoneID, const bool zoneFlip)
Modify vertices or cell of face.
Direct mesh changes based on v1.3 polyTopoChange syntax.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void removeCell(const label, const label)
Remove/merge cell.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
void collapseToEdge(const label faceI, const pointField &pts, const labelList &pointPriority, const vector &collapseAxis, const point &fC, const labelList &facePtsNeg, const labelList &facePtsPos, const scalarList &dNeg, const scalarList &dPos, const scalar dShift, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Collapse a face to an edge, marking the collapsed edges and new.
A HashTable to objects of type <T> with a label key.
labelPair markFaceZoneEdges(const faceZone &fZone, const scalarField &faceFilterFactor, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Marks edges in the faceZone indirectPatchFaces for collapse.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void filterFace(const Map< DynamicList< label > > &collapseStrings, const List< pointEdgeCollapse > &allPointInfo, face &f) const
Renumber f with new vertices. Removes consecutive duplicates.
label markSmallEdges(const scalarField &minEdgeLen, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Mark (in collapseEdge) any edges to collapse.
dimensioned< scalar > mag(const dimensioned< Type > &)
A HashTable with keys but without contents.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Mesh consisting of general polyhedral cells.
Determines length of string of edges walked to point.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
void determineDuplicatePointsOnFace(const face &f, PackedBoolList &markedPoints, labelHashSet &uniqueCollapses, labelHashSet &duplicateCollapses, List< pointEdgeCollapse > &allPointInfo) const
Prevent face pinching by finding points in a face that will be.
static const label labelMin
void inplaceReorder(const labelUList &oldToNew, ListType &)
Inplace reorder the elements of a list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
edgeCollapser(const edgeCollapser &)
Disallow default bitwise copy construct.
A subset of mesh faces organised as a primitive patch.
vector eigenVector(const tensor &, const scalar lambda)
dimensionedVector eigenValues(const dimensionedTensor &dt)
A patch is a list of labels that address the faces in the global face list.
T & last()
Return the last element of the list.
void clear()
Clear the addressed list, i.e. set the size to zero.
virtual const labelList & faceOwner() const
Return face owner.
void faceCollapseAxisAndAspectRatio(const face &f, const point &fC, vector &collapseAxis, scalar &aspectRatio) const
Do an eigenvector analysis of the face to get its collapse axis.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void removePoint(const label, const label)
Remove/merge point.
void consistentCollapse(const globalIndex &globalPoints, const labelList &pointPriority, const Map< point > &collapsePointToLocation, PackedBoolList &collapseEdge, List< pointEdgeCollapse > &allPointInfo, const bool allowCellCollapse=false) const
Ensure that the collapse is parallel consistent and update.
label whichZone(const label objectIndex) const
Given a global object index, return the zone it is in.
void removeFace(const label, const label)
Remove/merge face.
labelPair markSmallSliverFaces(const scalarField &faceFilterFactor, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Find small faces and sliver faces in the mesh and mark the.
A list of keyword definitions, which are a keyword followed by any number of values (e....
label size() const
Return number of elements in table.
label nInternalFaces() const
PointFrompoint toPoint(const Foam::point &p)
bool found(const Key &) const
Return true if hashedEntry is found in table.
bool setRefinement(const List< pointEdgeCollapse > &allPointInfo, polyTopoChange &meshMod) const
Play commands into polyTopoChange to create mesh.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
errorManip< error > abort(error &err)
const labelUList & faceCells() const
Return face-cell addressing.
const scalarField & cellVolumes() const
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
const double e
Elementary charge.
Ostream & indent(Ostream &os)
Indent stream.
label start() const
Return start label of this patch in the polyMesh face list.
label syncCollapse(const globalIndex &globalPoints, const labelList &boundaryPoint, const PackedBoolList &collapseEdge, const Map< point > &collapsePointToLocation, List< pointEdgeCollapse > &allPointInfo) const
Given the collapse information, propagates the information using.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setSize(const label)
Reset size of List.
void collapseToPoint(const label &faceI, const pointField &pts, const labelList &pointPriority, const point &fC, const labelList &facePts, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Collapse a face to a point, marking the collapsed edges and new.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
collapseType collapseFace(const labelList &pointPriority, const face &f, const label faceI, const scalar targetFaceSize, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation, const scalarField &faceFilterFactor) const
Decides whether a face should be collapsed (and if so it it is to a.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
An ordered pair of two objects of type <T> with first() and second() elements.
prefixOSstream Pout(cout, "Pout")
void clear()
Clear all entries from table.
label edgeMaster(const labelList &pointPriority, const edge &e) const
Return label of point that has the highest priority. This will be.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedScalar sqrt(const dimensionedScalar &ds)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar e
Elementary charge.
void clear()
Clear the list, i.e. set size to zero.
bool insert(const Key &key)
Insert a new entry.
bool isFaceCollapsed(const face &f, List< pointEdgeCollapse > &allPointInfo) const
Does the face have fewer than 3 edges as a result of the potential.
static label checkMeshQuality(const polyMesh &mesh, const dictionary &meshQualityDict, PackedBoolList &isErrorPoint)
Check mesh and mark points on faces in error.
labelList invert(const label len, const labelUList &)
Invert one-to-one map. Unmapped elements will be -1.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A face is a list of labels corresponding to mesh vertices.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
void size(const label)
Override size to be inconsistent with allocated storage.
label collapseEdge(triSurface &surf, const scalar minLen)
Keep collapsing all edges < minLen.
labelList edgesFromPoints(const label &faceI, const labelList &pointLabels) const
Create an edgeList of edges in faceI which have both their points.
label size() const
Return the number of elements in the UList.
void checkBoundaryPointMergeEdges(const label pointI, const label otherPointI, const labelList &pointPriority, Map< point > &collapsePointToLocation) const
Decides which points in an edge to collapse, based on their priority.
const boolList & flipMap() const
Return face flip map.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
A cell is defined as a list of faces with extra functionality.
label countPointUsage(const scalar minCos, boolList &pointCanBeDeleted) const
Mark in pointCanBeDeleted the points that can be deleted.
const polyMesh & mesh_
Reference to mesh.
Pair< label > labelPair
Label pair.
labelList pointLabels(nPoints, -1)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
boundaryMesh(const boundaryMesh &)
Disallow default bitwise copy construct.
virtual const labelList & faceNeighbour() const
Return face neighbour.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)