72 scalar minDist = GREAT;
75 for (
const label patchFacei : wallFaces)
82 minFacei = patch.start() + patchFacei;
96 const label patchFacei,
103 neighbours.
append(patchFacei);
106 const labelList& faceNeighbours = patch.faceFaces()[patchFacei];
108 for (
const label nbr : faceNeighbours)
117 const face&
f = patch.localFaces()[patchFacei];
121 label pointi =
f[fp];
123 const labelList& pointNbs = patch.pointFaces()[pointi];
125 for (
const label facei : pointNbs)
142 const labelList& pointNbs = patch.pointFaces()[
f[fp]];
147 for (
const label nb : neighbours)
152 <<
"getPointNeighbours : patchFacei:" << patchFacei
153 <<
" verts:" <<
f <<
endl;
158 <<
"point:" <<
f[fp] <<
" pointFaces:"
159 << patch.pointFaces()[
f[fp]] <<
endl;
162 for (
const label facei : neighbours)
165 <<
"fast nbr:" << facei
170 <<
"Problem: fast pointNeighbours routine included " << nb
171 <<
" which is not in proper neighbour list " << nbs.
toc()
180 <<
"Problem: fast pointNeighbours routine did not find "
197 if (patchIDs.
found(patchi))
201 maxSize =
Foam::max(maxSize, patch.size());
219 if (patchIDs.
found(patchi))
247 if (patchIDs.
found(patchi))
254 getPointNeighbours(patch, patchFacei, neighbours);
256 label celli = faceOwner[patch.start() + patchFacei];
260 wallDistCorrected[celli] = smallestDist
269 nearestFace.
insert(celli, minFacei);
290 if (patchIDs.
found(patchi))
294 const labelList& meshPoints = patch.meshPoints();
297 forAll(meshPoints, meshPointi)
299 const label vertI = meshPoints[meshPointi];
303 for (
const label celli : neighbours)
305 if (!nearestFace.
found(celli))
307 const labelList& wallFaces = pointFaces[meshPointi];
311 wallDistCorrected[celli] = smallestDist
320 nearestFace.
insert(celli, minFacei);
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
void append(const T &val)
Copy append an element to the end of this list.
label appendUniq(const T &val)
Append an element if not already in the list.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
bool found(const Key &key) const
Return true if hashed entry is found in table.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
label size() const noexcept
The number of elements in table.
bool erase(const iterator &iter)
Erase an entry specified by given iterator.
A HashTable to objects of type <T> with a label key.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
scalar distance() const noexcept
Return distance to hit.
A list of faces which address into the list of points.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Collection of functions used in wall distance calculation.
label maxPatchSize(const labelHashSet &patchIDs) const
Size of largest patch (out of supplied subset of patches)
label sumPatchSize(const labelHashSet &patchIDs) const
Sum of patch sizes (out of supplied subset of patches).
labelHashSet getPatchIDs() const
Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')
void correctBoundaryFaceCells(const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const
Correct all cells connected to boundary (via face). Sets values in.
void getPointNeighbours(const primitivePatch &, const label patchFacei, DynamicList< label > &) const
Get faces sharing point with face on patch.
void correctBoundaryPointCells(const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const
Correct all cells connected to wall (via point). Sets values in.
scalar smallestDist(const point &p, const polyPatch &patch, const labelUList &wallFaces, label &meshFacei) const
Calculate smallest true distance (and face index)
A face is a list of labels corresponding to mesh vertices.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
Mesh consisting of general polyhedral cells.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
const labelListList & pointCells() const
const vectorField & cellCentres() const
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
wordList patchNames(nPatches)
#define forAll(list, i)
Loop across all elements in list.