39 static inline void printFace
46 Info<<
"face " << faceI <<
':';
50 if (
f[fpI] == currEdge[0] ||
f[fpI] == currEdge[1])
71 label nFailedEdges = 0;
72 const bool fullCheck =
true;
74 Info<<
"Checking edges according to AVL/FIRE on-the-fly methodology..."
82 const face& faceA = faces[faceI];
86 const edge currEdge = faceA.edge(edgei);
89 const labelList& otherFaceIds = pointFaces[currEdge[0]];
91 forAll(otherFaceIds, otherI)
93 const int otherFaceI = otherFaceIds[otherI];
94 const face& faceB = faces[otherFaceI];
97 if (otherFaceI <= faceI && !fullCheck)
105 int size_m1 = faceB.size() - 1;
109 if (faceB[ptI] == currEdge[0])
114 if (faceB[ptI] == currEdge[1])
126 || abs(other_p0 - other_p1) == 1
128 || (other_p0 == 0 && other_p1 == size_m1)
129 || (other_p1 == 0 && other_p0 == size_m1)
137 if (abs(other_p0 - other_p1) == 2)
140 stray = (other_p0 + other_p1) / 2;
144 (other_p0 == 0 && other_p1+1 == size_m1)
145 || (other_p1 == 0 && other_p0+1 == size_m1)
153 strayPoints.set(faceB[stray]);
156 failedEdges.set(currEdge);
161 <<
"Broken edge calculated between points "
162 << currEdge[0] <<
" " << currEdge[1] <<
endl;
164 printFace(faceA, faceI, currEdge);
165 printFace(faceB, otherFaceI, currEdge);
174 Info<<
"detected " << nFailedEdges <<
" edge failures";
177 nFailedEdges = failedEdges.size();
182 Info<<
" over " << nFailedEdges <<
" edges" <<
endl;
185 <<
"edge points" <<
nl
186 <<
"~~~~~~~~~~~" <<
endl;
188 for (edge thisEdge : failedEdges)
190 if (thisEdge.start() > thisEdge.end())
199 const label ptI = thisEdge[keyI];
207 const label ptI = thisEdge[keyI];
215 <<
"stray points" <<
nl
216 <<
"~~~~~~~~~~~~" <<
endl;
219 labelList keys = strayPoints.sortedToc();
225 const label ptI = keys[keyI];
233 const label ptI = keys[keyI];
253 const UList<point>&
points
265 for (
const face&
f : faces)