1 //void Foam::edgeCorrectedVolPointInterpolation::makeExtrapolationWeights() const
4 // For each point to be corrected calculate the extrapolated value
5 // for each face around it and combine them using the inverse
6 // distance weighting factors
8 //const labelList& ptc = boundaryPoints();
10 // Calculate the correction vectors
12 //extrapolationVectorsPtr_ =
13 // new FieldField<Field, vector>(ptc.size());
14 //FieldField<Field, vector>& extraVecs = *extrapolationVectorsPtr_;
15 FieldField<Field, vector> extraVecs(ptc.size());
18 const labelListList& pfaces = mesh.pointFaces();
20 const volVectorField& centres = mesh.C();
22 const fvBoundaryMesh& bm = mesh.boundary();
26 const label curPoint = ptc[pointI];
28 const labelList& curFaces = pfaces[curPoint];
30 // extraVecs.hook(new vectorField(curFaces.size())); //- no hook function
34 new vectorField(curFaces.size())
37 vectorField& curExtraVectors = extraVecs[pointI];
39 label nFacesAroundPoint = 0;
41 const vector& pointLoc = mesh.points()[curPoint];
43 // Go through all the faces
44 forAll (curFaces, faceI)
46 if (!mesh.isInternalFace(curFaces[faceI]))
48 // This is a boundary face. If not in the empty patch
49 // or coupled calculate the extrapolation vector
51 mesh.boundaryMesh().whichPatch(curFaces[faceI]);
55 !isA<emptyFvPatch>(bm[patchID]) && !bm[patchID].coupled()
58 // Found a face for extrapolation
59 curExtraVectors[nFacesAroundPoint] =
61 - centres.boundaryField()[patchID]
62 [bm[patchID].patch().whichFace(curFaces[faceI])];
69 curExtraVectors.setSize(nFacesAroundPoint);