diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index ed40986dbb87fea1b16e61ed4cc6f138e3eecbe4..046adb8a2a08946a852c2409e8e9ac28eeeef309 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -917,22 +917,23 @@ Foam::scalar Foam::AMIInterpolation<SourcePatch, TargetPatch>::interArea const primitivePatch& tgtPatch ) const { + const pointField& srcPoints = srcPatch.points(); + const pointField& tgtPoints = tgtPatch.points(); + + // references to candidate faces + const face& src = srcPatch[srcFaceI]; + const face& tgt = tgtPatch[tgtFaceI]; + // quick reject if either face has zero area - if (srcMagSf_[srcFaceI] < ROOTVSMALL || tgtMagSf_[tgtFaceI] < ROOTVSMALL) + // Note: do not used stored face areas for target patch + if ((srcMagSf_[srcFaceI] < ROOTVSMALL) || (tgt.mag(tgtPoints) < 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_)