diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolation.C index f9ebc6b8ce52a38e34370eea7724e60b06790a6f..16cd028f726392e5723ec62abf75f2903f18ce50 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolation.C @@ -213,13 +213,12 @@ void pointPatchInterpolation::makePatchPatchWeights() if (!isA<emptyFvPatch>(bm[patchi]) && !bm[patchi].coupled()) { - pw[nFacesAroundPoint] = - 1.0/mag - ( - pointLoc - - centres.boundaryField()[patchi] - [bm[patchi].patch().whichFace(curFaces[facei])] - ); + vector d = + pointLoc + - centres.boundaryField()[patchi] + [bm[patchi].patch().whichFace(curFaces[facei])]; + + pw[nFacesAroundPoint] = 1.0/(mag(d)+VSMALL); nFacesAroundPoint++; }