1 // Do "normal" interpolation
2 //volPointInterpolation::interpolate(vf, pf);
4 //- interpolation is done just before this file
5 pointVectorField& pf = pointDU;
9 //GeometricField<Type, pointPatchField, pointMesh> pfCorr
11 pointVectorField pfCorr
15 // "edgeCorrectedVolPointInterpolate(" + vf.name() + ")Corr",
16 "edgeCorrectedVolPointInterpolate(" + DU.name() + ")Corr",
24 //dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero),
25 dimensionedVector("zero", pf.dimensions(), vector::zero),
26 pf.boundaryField().types()
30 pointVectorField pfCorr
41 dimensionedVector("vector", dimLength, vector::zero),
45 //const labelList& ptc = boundaryPoints();
46 #include "findBoundaryPoints.H"
48 //const FieldField<Field, vector>& extraVecs = extrapolationVectors(); ///*********
49 #include "calculateExtrapolationVectors.H"
51 //const FieldField<Field, scalar>& w = pointBoundaryWeights(); ///*********
52 #include "calculatePointBoundaryWeights.H"
54 //Info << "w: " << w << endl;
56 const labelListList& PointFaces = mesh.pointFaces();
58 //const fvBoundaryMesh& bm = mesh.boundary(); // declared in findBoundaryPoints.H
62 const label curPoint = ptc[pointI];
64 const labelList& curFaces = PointFaces[curPoint];
68 // Go through all the faces
69 forAll (curFaces, faceI)
71 if (!mesh.isInternalFace(curFaces[faceI]))
73 // This is a boundary face. If not in the empty patch
74 // or coupled calculate the extrapolation vector
76 mesh.boundaryMesh().whichPatch(curFaces[faceI]);
80 !isA<emptyFvPatch>(mesh.boundary()[patchID])
81 && !mesh.boundary()[patchID].coupled()
85 bm[patchID].patch().whichFace(curFaces[faceI]);
91 & gradDU.boundaryField()[patchID][faceInPatchID]
100 // Update coupled boundaries
102 forAll (pfCorr.boundaryField(), patchI)
104 if (pfCorr.boundaryField()[patchI].coupled())
106 pfCorr.boundaryField()[patchI].initAddField();
112 forAll (pfCorr.boundaryField(), patchI)
114 if (pfCorr.boundaryField()[patchI].coupled())
116 pfCorr.boundaryField()[patchI].addField(pfCorr.internalField());
122 //Info << "pfCorr: " << pfCorr << endl;
123 pfCorr.correctBoundaryConditions();
127 //Info << "pf: " << pf << endl;
130 //- this was already commented
131 // Replace extrapolated values in pf
132 // forAll (ptc, pointI)
134 // pf[ptc[pointI]] = pfCorr[ptc[pointI]];
137 pf.correctBoundaryConditions();