49 for (
label i = 0; i < nElems; i++)
86 const label nWallFaces,
98 label patchFacei = wallFaces[wallFacei];
100 pointHit curHit = patch[patchFacei].nearestPoint(p, points);
105 minFacei = patch.
start() + patchFacei;
119 const label patchFacei,
123 label nNeighbours = 0;
126 neighbours[nNeighbours++] = patchFacei;
131 forAll(faceNeighbours, faceNeighbourI)
133 neighbours[nNeighbours++] = faceNeighbours[faceNeighbourI];
137 label nEdgeNbs = nNeighbours;
148 label pointi = f[fp];
154 label facei = pointNbs[nbI];
157 if (findIndex(nEdgeNbs, neighbours, facei) == -1)
159 neighbours[nNeighbours++] = facei;
178 nbs.insert(pointNbs[i]);
183 for (
label i = 0; i < nNeighbours; i++)
185 label nb = neighbours[i];
190 <<
"getPointNeighbours : patchFacei:" << patchFacei
191 <<
" verts:" << f <<
endl;
196 <<
"point:" << f[fp] <<
" pointFaces:" 200 for (
label i = 0; i < nNeighbours; i++)
203 <<
"fast nbr:" << neighbours[i]
208 <<
"Problem: fast pointNeighbours routine included " << nb
209 <<
" which is not in proper neighbour list " << nbs.toc()
218 <<
"Problem: fast pointNeighbours routine did not find " 241 maxSize =
Foam::max(maxSize, patch.size());
281 labelList neighbours(maxPointNeighbours);
304 label celli = faceOwner[patch.
start() + patchFacei];
318 nearestFace.
insert(celli, minFacei);
347 forAll(meshPoints, meshPointi)
349 label vertI = meshPoints[meshPointi];
353 forAll(neighbours, neighbourI)
355 label celli = neighbours[neighbourI];
357 if (!nearestFace.
found(celli))
359 const labelList& wallFaces = pointFaces[meshPointi];
373 nearestFace.
insert(celli, minFacei);
labelHashSet getPatchIDs() const
Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
label sumPatchSize(const labelHashSet &patchIDs) const
Sum of patch sizes (out of supplied subset of patches).
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A face is a list of labels corresponding to mesh vertices.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label getPointNeighbours(const primitivePatch &, const label patchFacei, labelList &) const
Get faces sharing point with face on patch.
void size(const label)
Override size to be inconsistent with allocated storage.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
Ostream & endl(Ostream &os)
Add newline and flush stream.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
scalar minDist(const List< pointIndexHit > &hitList)
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
void correctBoundaryFaceCells(const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const
Correct all cells connected to boundary (via face). Sets values in.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
A list of faces which address into the list of points.
const labelListList & faceFaces() const
Return face-face addressing.
cellDistFuncs(const polyMesh &mesh)
Construct from mesh.
bool found(const Key &) const
Return true if hashedEntry is found in table.
virtual const labelList & faceOwner() const
Return face owner.
void correctBoundaryPointCells(const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const
Correct all cells connected to wall (via point). Sets values in.
const Field< PointType > & points() const
Return reference to global points.
List< label > labelList
A List of labels.
const vectorField & cellCentres() const
errorManip< error > abort(error &err)
label maxPatchSize(const labelHashSet &patchIDs) const
Size of largest patch (out of supplied subset of patches)
const labelListList & pointCells() const
scalar smallestDist(const point &p, const polyPatch &patch, const label nWallFaces, const labelList &wallFaces, label &meshFacei) const
Calculate smallest true distance (and face index)
const labelListList & pointFaces() const
Return point-face addressing.
defineTypeNameAndDebug(combustionModel, 0)
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
label start() const
Return start label of this patch in the polyMesh face list.
Mesh consisting of general polyhedral cells.
scalar distance() const
Return distance to hit.
A patch is a list of labels that address the faces in the global face list.
const polyMesh & mesh() const
Access mesh.