35 void Foam::nearWallDist::calculate()
37 const cellDistFuncs wallUtils(mesh_);
46 DynamicList<label> wallPatchIDs(mesh_.
boundary().
size());
51 if (isA<wallFvPatch>(mesh_.
boundary()[patchi]))
53 wallPatchIDs.append(patchi);
68 for (
const label patchi : wallPatchIDs)
85 DynamicList<label> neighbours;
88 for (
const label patchi : wallPatchIDs)
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));
130 if (isA<wallFvPatch>(
patch))
132 const polyPatch& pPatch =
patch.patch();
139 wallUtils.getPointNeighbours
148 ypatch[patchFacei] = wallUtils.smallestDist
150 cellCentres[faceCells[patchFacei]],
192 if (mesh_.topoChanging())
const Type & operator[](const labelPair &index) const
Const access to a single field element via (fieldi, elemi)
GeometricField< vector, fvPatchField, volMesh > volVectorField
labelList faceLabels(nFaceLabels)
UList< label > labelUList
A UList of labels.
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
static bool useCombinedWallPatch
Use combined-wall-patches wall distance v.s. v2406 per-patch distance. Default is true...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
points setSize(newPointi)
const word calculatedType
A calculated patch field type.
fvPatchField< scalar > fvPatchScalarField
label size() const noexcept
The number of entries in the list.
virtual const faceList & faces() const
Return raw faces.
virtual ~nearWallDist()
Destructor.
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
Mesh data needed to do the Finite Volume discretisation.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static const word & calculatedType() noexcept
The type name for calculated patch fields.
const std::string patch
OpenFOAM patch number as a std::string.
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
const volVectorField & C() const
Return cell centres as volVectorField.
virtual void correct()
Correct for mesh geom/topo changes.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
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.