diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index 74c023560691c77615c62b7fa6ba63689cb29d8d..a9c9113056ba5d6c093e0367a5402750245aafb0 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -889,21 +889,22 @@ Foam::scalar Foam::AMIInterpolation<SourcePatch, TargetPatch>::interArea const primitivePatch& tgtPatch ) const { - const pointField& srcPoints = srcPatch.points(); - const pointField& tgtPoints = tgtPatch.points(); - - const face& src = srcPatch[srcFaceI]; - const face& tgt = tgtPatch[tgtFaceI]; - // quick reject if either face has zero area - if ((src.mag(srcPoints) < ROOTVSMALL) || (tgt.mag(tgtPoints) < ROOTVSMALL)) + if (srcMagSf_[srcFaceI] < ROOTVSMALL || tgtMagSf_[tgtFaceI] < ROOTVSMALL) { return 0.0; } + const pointField& srcPoints = srcPatch.points(); + const pointField& tgtPoints = tgtPatch.points(); + // create intersection object faceAreaIntersect inter(srcPoints, tgtPoints, reverseTarget_); + // references to candidate faces + const face& src = srcPatch[srcFaceI]; + const face& tgt = tgtPatch[tgtFaceI]; + // crude resultant norm vector n(-src.normal(srcPoints)); if (reverseTarget_)