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
10 /*pointVectorField pfCorr
14 // "edgeCorrectedVolPointInterpolate(" + vf.name() + ")Corr",
15 "edgeCorrectedVolPointInterpolate(" + DU.name() + ")Corr",
23 //dimensioned<Type>("zero", pf.dimensions(), pTraits<Type>::zero),
24 dimensionedVector("zero", pf.dimensions(), vector::zero),
25 pf.boundaryField().types()
28 pointVectorField pfCorr
39 dimensionedVector("vector", dimLength, vector::zero),
43 //const labelList& ptc = boundaryPoints();
44 #include "findBoundaryPoints.H"
46 //const FieldField<Field, vector>& extraVecs = extrapolationVectors(); ///*********
47 #include "calculateExtrapolationVectors.H"
49 //const FieldField<Field, scalar>& w = pointBoundaryWeights(); ///*********
50 #include "calculatePointBoundaryWeights.H"
52 //Info << "w: " << w << endl;
54 const labelListList& PointFaces = mesh.pointFaces();
56 //const fvBoundaryMesh& bm = mesh.boundary(); // declared in findBoundaryPoints.H
60 const label curPoint = ptc[pointI];
62 const labelList& curFaces = PointFaces[curPoint];
66 // Go through all the faces
67 forAll (curFaces, faceI)
69 if (!mesh.isInternalFace(curFaces[faceI]))
71 // This is a boundary face. If not in the empty patch
72 // or coupled calculate the extrapolation vector
74 mesh.boundaryMesh().whichPatch(curFaces[faceI]);
78 !isA<emptyFvPatch>(mesh.boundary()[patchID])
79 && !mesh.boundary()[patchID].coupled()
83 bm[patchID].patch().whichFace(curFaces[faceI]);
89 & gradDU.boundaryField()[patchID][faceInPatchID]
98 // Update coupled boundaries
99 /*forAll (pfCorr.boundaryField(), patchI)
101 if (pfCorr.boundaryField()[patchI].coupled())
103 pfCorr.boundaryField()[patchI].initAddField();
107 /*forAll (pfCorr.boundaryField(), patchI)
109 if (pfCorr.boundaryField()[patchI].coupled())
111 pfCorr.boundaryField()[patchI].addField(pfCorr.internalField());
116 //Info << "pfCorr: " << pfCorr << endl;
117 pfCorr.correctBoundaryConditions();
121 //Info << "pf: " << pf << endl;
124 //- this was already commented
125 // Replace extrapolated values in pf
126 // forAll (ptc, pointI)
128 // pf[ptc[pointI]] = pfCorr[ptc[pointI]];
131 pf.correctBoundaryConditions();