diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index 1fa157adf4..e5dcad0c8d 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -962,6 +962,13 @@ void Foam::AMIInterpolation::update newTgtPoints ); + scalarField newTgtMagSf(newTgtPatch.size()); + forAll(newTgtPatch, faceI) + { + newTgtMagSf[faceI] = newTgtPatch[faceI].mag(newTgtPatch.points()); + } + + // calculate AMI interpolation autoPtr > AMIPtr ( @@ -971,7 +978,7 @@ void Foam::AMIInterpolation::update srcPatch, newTgtPatch, srcMagSf_, - tgtMagSf_, + newTgtMagSf, triMode_, reverseTarget_, requireMatch_ && (lowWeightCorrection_ < 0) @@ -993,6 +1000,11 @@ void Foam::AMIInterpolation::update // tgtAddress_ : per newTgtPatch (not tgtPatch) face a list of the // srcPatch faces it overlaps + if (debug) + { + writeFaceConnectivity(srcPatch, newTgtPatch, srcAddress_); + } + // Rework newTgtPatch indices into globalIndices of tgtPatch // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1056,11 +1068,6 @@ void Foam::AMIInterpolation::update List > cMap; srcMapPtr_.reset(new mapDistribute(globalSrcFaces, tgtAddress_, cMap)); tgtMapPtr_.reset(new mapDistribute(globalTgtFaces, srcAddress_, cMap)); - - if (debug) - { - writeFaceConnectivity(srcPatch, newTgtPatch, srcAddress_); - } } else {