44 Foam::label Foam::cellDistFuncs::findIndex
51 for (label i = 0; i < nElems; i++)
86 patchNamesHash.insert(patchNames[patchI]);
97 if (patchNamesHash.found(patch.
name()))
99 patchIDs.insert(patchI);
120 scalar minDist = GREAT;
123 for(label wallFaceI = 0; wallFaceI <
nWallFaces; wallFaceI++)
125 label patchFaceI = wallFaces[wallFaceI];
127 pointHit curHit = patch[patchFaceI].nearestPoint(p, points);
132 minFaceI = patch.
start() + patchFaceI;
146 const label patchFaceI,
150 label nNeighbours = 0;
153 neighbours[nNeighbours++] = patchFaceI;
158 forAll(faceNeighbours, faceNeighbourI)
160 neighbours[nNeighbours++] = faceNeighbours[faceNeighbourI];
164 label nEdgeNbs = nNeighbours;
175 label pointI = f[fp];
181 label faceI = pointNbs[nbI];
184 if (
findIndex(nEdgeNbs, neighbours, faceI) == -1)
186 neighbours[nNeighbours++] = faceI;
205 nbs.insert(pointNbs[i]);
210 for (label i = 0; i < nNeighbours; i++)
212 label nb = neighbours[i];
217 <<
"getPointNeighbours : patchFaceI:" << patchFaceI
218 <<
" verts:" << f <<
endl;
223 <<
"point:" << f[fp] <<
" pointFaces:"
227 for (label i = 0; i < nNeighbours; i++)
230 <<
"fast nbr:" << neighbours[i]
235 <<
"Problem: fast pointNeighbours routine included " << nb
236 <<
" which is not in proper neigbour list " << nbs.toc()
245 <<
"Problem: fast pointNeighbours routine did not find "
262 if (patchIDs.
found(patchI))
266 maxSize =
Foam::max(maxSize, patch.size());
281 if (patchIDs.
found(patchI))
301 label maxPointNeighbours = maxPatchSize(patchIDs);
303 labelList neighbours(maxPointNeighbours);
312 if (patchIDs.
found(patchI))
319 label nNeighbours = getPointNeighbours
326 label cellI = faceOwner[patch.
start() + patchFaceI];
330 wallDistCorrected[cellI] = smallestDist
340 nearestFace.
insert(cellI, minFaceI);
363 if (patchIDs.
found(patchI))
370 forAll(meshPoints, meshPointI)
372 label vertI = meshPoints[meshPointI];
374 const labelList& neighbours = pointCells[vertI];
376 forAll(neighbours, neighbourI)
378 label cellI = neighbours[neighbourI];
380 if (!nearestFace.
found(cellI))
382 const labelList& wallFaces = pointFaces[meshPointI];
386 wallDistCorrected[cellI] = smallestDist
396 nearestFace.
insert(cellI, minFaceI);