38void Foam::patchCorrectedInterpolation::interpolateType
40 const GeometricField<Type, fvPatchField, volMesh>& cellDisplacement,
41 GeometricField<Type, pointPatchField, pointMesh>& pointDisplacement
45 GeometricField<Type, pointPatchField, pointMesh>
46 pointUncorrectedDisplacement
50 "pointUncorrectedDisplacement",
54 pointDisplacement.mesh(),
55 pointDisplacement.dimensions(),
61 pointUncorrectedDisplacement ==
67 pointUncorrectedDisplacement.boundaryField().size(),
74 pointDisplacement.primitiveFieldRef() =
75 pointUncorrectedDisplacement.primitiveField();
76 pointDisplacement.correctBoundaryConditions();
81 pointUncorrectedDisplacement ==
82 pointDisplacement - pointUncorrectedDisplacement;
85 interpolateDataFromPatchGroups(pointUncorrectedDisplacement);
88 pointDisplacement += pointUncorrectedDisplacement;
89 pointDisplacement.correctBoundaryConditions();
94void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups
114 forAll(patchGroups_, patchGroupI)
132 propagateDataFromPatchGroup
142 1/
max(
sqr(patchDistance.primitiveField()), SMALL)
144 data.primitiveFieldRef() += patchWeight*patchData.primitiveField();
145 weight.primitiveFieldRef() += patchWeight;
154void Foam::patchCorrectedInterpolation::propagateDataFromPatchGroup
156 const label patchGroupi,
161 const labelList& patchGroup(patchGroups_[patchGroupi]);
165 forAll(patchGroup, patchGroupi)
167 const label patchi(patchGroup[patchGroupi]);
169 nSeedInfo += data.boundaryField()[patchi].size();
176 forAll(patchGroup, patchGroupi)
178 const label patchi(patchGroup[patchGroupi]);
182 patchDataField.updateCoeffs();
185 const Field<Type> patchData(patchDataField.patchInternalField());
189 const label pointi(
patch.meshPoints()[patchPointi]);
191 seedLabels[nSeedInfo] = pointi;
193 seedInfo[nSeedInfo] =
198 patchData[patchPointi]
219 forAll(allPointInfo, pointi)
221 distance[pointi] =
sqrt(allPointInfo[pointi].distSqr());
222 data[pointi] = allPointInfo[pointi].data();
static const char *const typeName
Typename for Field.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Generic GeometricField class.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static FOAM_NO_DANGLING_REFERENCE const volPointInterpolation & New(const fvMesh &mesh, Args &&... args)
Variant of pointEdgePoint with some transported additional data. Templated on the transported data ty...
Wave propagation of information through grid. Every iteration information goes through one layer of e...
label nTotalPoints() const noexcept
Total global number of mesh points. Not compensated for duplicate points!
const fvMesh & mesh() const
Return const-reference to the mesh.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
Abstract base class for point-mesh patch fields.
Basic pointPatch represents a set of points from the mesh.
const globalMeshData & globalData() const
Return parallel info (demand-driven).
tmp< GeometricField< Type, pointPatchField, pointMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &) const
Interpolate volField using inverse distance weighting.
const std::string patch
OpenFOAM patch number as a std::string.
scalar distance(const vector &p1, const vector &p2)
List< word > wordList
List of word.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar sqrt(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
#define forAll(list, i)
Loop across all elements in list.