Go to the documentation of this file.
49 for (
label i = 0; i < nElems; i++)
93 scalar minDist = GREAT;
98 label patchFaceI = wallFaces[wallFaceI];
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;
154 label faceI = pointNbs[nbI];
157 if (
findIndex(nEdgeNbs, neighbours, faceI) == -1)
159 neighbours[nNeighbours++] = faceI;
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 neigbour list " << nbs.
toc()
218 <<
"Problem: fast pointNeighbours routine did not find "
237 if (patchIDs.
found(patchI))
241 maxSize =
Foam::max(maxSize, patch.size());
259 if (patchIDs.
found(patchI))
279 label maxPointNeighbours = maxPatchSize(patchIDs);
281 labelList neighbours(maxPointNeighbours);
290 if (patchIDs.
found(patchI))
297 label nNeighbours = getPointNeighbours
304 label cellI = faceOwner[patch.
start() + patchFaceI];
308 wallDistCorrected[cellI] = smallestDist
318 nearestFace.insert(cellI, minFaceI);
340 if (patchIDs.
found(patchI))
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];
363 wallDistCorrected[cellI] = smallestDist
373 nearestFace.insert(cellI, minFaceI);
const labelListList & pointFaces() const
Return point-face addressing.
const Field< PointType > & points() const
Return reference to global points.
List< Key > toc() const
Return the table of contents.
#define forAll(list, i)
Loop across all elements in list.
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
label maxPatchSize(const labelHashSet &patchIDs) const
Size of largest patch (out of supplied subset of patches)
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Mesh consisting of general polyhedral cells.
void correctBoundaryPointCells(const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const
Correct all cells connected to wall (via point). Sets values in.
scalar distance() const
Return distance to hit.
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.
labelHashSet getPatchIDs() const
Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')
A patch is a list of labels that address the faces in the global face list.
virtual const labelList & faceOwner() const
Return face owner.
label sumPatchSize(const labelHashSet &patchIDs) const
Sum of patch sizes (out of supplied subset of patches).
label getPointNeighbours(const primitivePatch &, const label patchFaceI, labelList &) const
Get faces sharing point with face on patch.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
wordList patchNames(nPatches)
cellDistFuncs(const cellDistFuncs &)
Disallow default bitwise copy construct.
label size() const
Return number of elements in table.
bool found(const Key &) const
Return true if hashedEntry is found in table.
errorManip< error > abort(error &err)
label start() const
Return start label of this patch in the polyMesh face list.
scalar smallestDist(const point &p, const polyPatch &patch, const label nWallFaces, const labelList &wallFaces, label &meshFaceI) const
Calculate smallest true distance (and face index)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const vectorField & cellCentres() const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const labelListList & pointCells() const
bool insert(const Key &key)
Insert a new entry.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
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.
void correctBoundaryFaceCells(const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const
Correct all cells connected to boundary (via face). Sets values in.
void size(const label)
Override size to be inconsistent with allocated storage.
const labelListList & faceFaces() const
Return face-face addressing.
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.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
static label findIndex(const label n, const labelList &, const label)
Search for element in first n elements of labelList. Return index.
defineTypeNameAndDebug(combustionModel, 0)
A list of faces which address into the list of points.