53template<
class PatchType>
57 const PatchType& patch,
67 scalar minDist = GREAT;
70 for (
const label patchFacei : wallFaces)
74 if (curHit.distance() < minDist)
76 minDist = curHit.distance();
77 minFacei = patchFacei;
85template<
class PatchType>
88 const PatchType& patch,
89 const label patchFacei,
90 DynamicList<label>& neighbours
100 neighbours.append(patchFacei);
103 const labelList& faceNeighbours = patch.faceFaces()[patchFacei];
105 for (
const label nbr : faceNeighbours)
107 neighbours.push_uniq(nbr);
114 const face&
f =
patch.localFaces()[patchFacei];
118 label pointi =
f[fp];
122 for (
const label facei : pointNbs)
125 neighbours.push_uniq(facei);
140 nbs.insert(pointNbs);
144 for (
const label nb : neighbours)
149 <<
"getPointNeighbours : patchFacei:" << patchFacei
150 <<
" verts:" <<
f <<
endl;
155 <<
"point:" <<
f[fp] <<
" pointFaces:"
159 for (
const label facei : neighbours)
162 <<
"fast nbr:" << facei
167 <<
"Problem: fast pointNeighbours routine included " << nb
168 <<
" which is not in proper neighbour list " << nbs.toc()
177 <<
"Problem: fast pointNeighbours routine did not find "
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 push_uniq(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
Same as contains().
label size() const noexcept
The number of elements in table.
bool erase(const iterator &iter)
Erase an entry specified by given iterator.
scalar distance() const noexcept
Return distance to hit.
void size(const label n)
Older name for setAddressableSize.
labelHashSet getPatchIDs() const
Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch').
const polyMesh & mesh() const
Access mesh.
scalar smallestDist(const point &p, const PatchType &patch, const labelUList &wallFaces, label &patchFacei) const
Calculate smallest true distance (and patch face index).
void getPointNeighbours(const PatchType &, const label patchFacei, DynamicList< label > &) const
Get faces sharing point with face on patch.
A face is a list of labels corresponding to mesh vertices.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
Namespace for handling debugging switches.
const std::string patch
OpenFOAM patch number as a std::string.
PointHit< point > pointHit
A PointHit with a 3D point.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
errorManip< error > abort(error &err)
vector point
Point is a vector.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
PrimitivePatch< List< face >, const pointField > bMesh
Holder of faceList and points. (v.s. e.g. primitivePatch which references points).
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.