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
96 GeometricField<Type, pointPatchField, pointMesh>& data
112 data = dimensioned<Type>(data.dimensions(),
Zero);
114 forAll(patchGroups_, patchGroupI)
129 GeometricField<Type, pointPatchField, pointMesh> patchData(data);
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,
158 GeometricField<Type, pointPatchField, pointMesh>& data
161 const labelList& patchGroup(patchGroups_[patchGroupi]);
165 forAll(patchGroup, patchGroupi)
167 const label patchi(patchGroup[patchGroupi]);
169 nSeedInfo += data.boundaryField()[patchi].size();
174 List<PointData<Type>> seedInfo(nSeedInfo);
176 forAll(patchGroup, patchGroupi)
178 const label patchi(patchGroup[patchGroupi]);
180 pointPatchField<Type>& patchDataField(data.boundaryFieldRef()[patchi]);
182 patchDataField.updateCoeffs();
184 const pointPatch&
patch(patchDataField.patch());
185 const Field<Type> patchData(patchDataField.patchInternalField());
189 const label pointi(
patch.meshPoints()[patchPointi]);
191 seedLabels[nSeedInfo] = pointi;
193 seedInfo[nSeedInfo] =
198 patchData[patchPointi]
206 List<PointData<Type>> allPointInfo(
mesh().
nPoints());
207 List<PointData<Type>> allEdgeInfo(
mesh().
nEdges());
208 PointEdgeWave<PointData<Type>>
219 forAll(allPointInfo, pointi)
221 distance[pointi] =
sqrt(allPointInfo[pointi].distSqr());
222 data[pointi] = allPointInfo[pointi].data();
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
label nTotalPoints() const noexcept
Return total number of points in decomposed mesh. Not.
const fvMesh & mesh() const
Return const-reference to the mesh.
const globalMeshData & globalData() const
Return parallel info.
const labelList nEdges(UPstream::listGatherValues< label >(aMesh.nEdges()))
const std::string patch
OpenFOAM patch number as a std::string.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
scalar distance(const vector &p1, const vector &p2)
List< word > wordList
A List of words.
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)
#define forAll(list, i)
Loop across all elements in list.
static const char *const typeName
The type name used in ensight case files.