52Foam::inversePointDistanceDiffusivity::inversePointDistanceDiffusivity
73 label nPatchEdges = 0;
75 for (
const label patchi : patchSet)
77 nPatchEdges += bdry[patchi].nEdges();
81 List<pointEdgePoint> pointWallDist(
mesh().
nPoints());
82 List<pointEdgePoint> edgeWallDist(
mesh().nEdges());
84 int dummyTrackData = 0;
89 List<pointEdgePoint> seedInfo(nPatchEdges);
94 for (
const label patchi : patchSet)
96 const polyPatch& patch = bdry[patchi];
98 const labelList& meshPoints = patch.meshPoints();
100 for (
const label pointi : meshPoints)
102 if (!pointWallDist[pointi].valid(dummyTrackData))
105 seedInfo[nPatchEdges] = pointEdgePoint
110 seedPoints[nPatchEdges] = pointi;
111 pointWallDist[pointi] = seedInfo[nPatchEdges];
117 seedInfo.setSize(nPatchEdges);
118 seedPoints.setSize(nPatchEdges);
121 PointEdgeWave<pointEdgePoint> waveInfo
129 mesh().globalData().nTotalPoints(),
143 dist +=
sqrt(pointWallDist[
f[fp]].distSqr());
154 forAll(faceDiffusivityBf, patchi)
158 if (patchSet.found(patchi))
160 const labelUList& faceCells = bfld.patch().faceCells();
164 const cell& ownFaces =
mesh().
cells()[faceCells[i]];
170 forAll(ownFaces, ownFacei)
172 const face&
f =
mesh().
faces()[ownFaces[ownFacei]];
176 if (cPoints.insert(
f[fp]))
178 dist +=
sqrt(pointWallDist[
f[fp]].distSqr());
182 dist /= cPoints.
size();
189 const label start = bfld.patch().start();
199 dist +=
sqrt(pointWallDist[
f[fp]].distSqr());
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
bool found(const Key &key) const
Same as contains().
label size() const noexcept
The number of elements in table.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(label n)
Alias for resize().
Wave propagation of information through grid. Every iteration information goes through one layer of e...
void size(const label n)
Older name for setAddressableSize.
A cell is defined as a list of faces with extra functionality.
Smooth ATC in cells next to a set of patches supplied by type.
A face is a list of labels corresponding to mesh vertices.
Mesh data needed to do the Finite Volume discretisation.
label start() const noexcept
The patch start within the polyMesh face list.
virtual const labelUList & faceCells() const
Return faceCells.
const fvPatch & patch() const noexcept
Return the patch.
Inverse distance to the given patches motion diffusivity.
virtual void correct()
Correct the motion diffusivity.
Abstract base class for cell-centre mesh motion diffusivity.
const fvMesh & mesh() const
Return reference to the mesh.
Holds information regarding nearest wall point. Used in PointEdgeWave. (so not standard FaceCellWave)...
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
labelHashSet patchSet(const UList< wordRe > &select, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
virtual const faceList & faces() const
Return raw faces.
A patch is a list of labels that address the faces in the global face list.
label nInternalFaces() const noexcept
Number of internal faces.
const cellList & cells() const
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
dimensionedScalar sqrt(const dimensionedScalar &ds)
UList< label > labelUList
A UList of labels.
fvsPatchField< scalar > fvsPatchScalarField
#define forAll(list, i)
Loop across all elements in list.