35void Foam::nearWallDist::calculate()
37 const cellDistFuncs wallUtils(mesh_);
46 DynamicList<label> wallPatchIDs(mesh_.boundary().size());
49 forAll(mesh_.boundary(), patchi)
53 wallPatchIDs.append(patchi);
54 nWalls += mesh_.boundary()[patchi].size();
68 for (
const label patchi : wallPatchIDs)
70 const fvPatch&
patch = mesh_.boundary()[patchi];
81 UIndirectList<face>(mesh_.faces(),
faceLabels),
85 DynamicList<label> neighbours;
88 for (
const label patchi : wallPatchIDs)
90 const fvPatch&
patch = mesh_.boundary()[patchi];
98 wallUtils.getPointNeighbours(wallPatch, nWalls, neighbours);
101 ypatch[patchFacei] = wallUtils.smallestDist
103 cellCentres[faceCells[patchFacei]],
116 const labelHashSet wallPatchIDs(wallUtils.getPatchIDs<wallPolyPatch>());
119 DynamicList<label> neighbours(wallUtils.maxPatchSize(wallPatchIDs));
124 forAll(mesh_.boundary(), patchi)
128 const fvPatch&
patch = mesh_.boundary()[patchi];
132 const polyPatch& pPatch =
patch.patch();
139 wallUtils.getPointNeighbours
148 ypatch[patchFacei] = wallUtils.smallestDist
150 cellCentres[faceCells[patchFacei]],
168Foam::nearWallDist::nearWallDist(
const Foam::fvMesh&
mesh)
192 if (mesh_.topoChanging())
labelList faceLabels(nFaceLabels)
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const Type & operator[](const labelPair &index) const
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
This boundary field type.
const PatchField< Type > * set(const label i) const
label size() const noexcept
The number of entries in the list.
static bool useCombinedWallPatch
Use combined-wall-patches wall distance v.s. v2406 per-patch distance. Default is true.
A fvBoundaryMesh is a fvPatch list with a reference to the associated fvMesh, with additional search ...
Mesh data needed to do the Finite Volume discretisation.
Template invariant parts for fvPatchField.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
static tmp< fvPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
virtual void correct()
Correct for mesh geom/topo changes.
virtual ~nearWallDist()
Destructor.
const expr V(m.psi().mesh().V())
const word calculatedType
A calculated patch field type.
const std::string patch
OpenFOAM patch number as a std::string.
GeometricField< vector, fvPatchField, volMesh > volVectorField
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
UList< label > labelUList
A UList of labels.
fvPatchField< scalar > fvPatchScalarField
points setSize(newPointi)
#define forAll(list, i)
Loop across all elements in list.