From 96b7fa8f625e64a713e5970842ee72b2b0fe5e81 Mon Sep 17 00:00:00 2001 From: william Date: Mon, 15 Sep 2014 15:09:55 +0100 Subject: [PATCH] BUG: AMI: Fixed target face used as index to source patch. Also undo commit b816fac, which was an incorrect fix for the same bug. --- .../AMIInterpolation/AMIInterpolation/AMIInterpolation.C | 4 ++-- .../patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index 58fb989e5c..70372fc724 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -1494,7 +1494,7 @@ const forAll(addr, i) { label srcFaceI = addr[i]; - const face& f = srcPatch[tgtFaceI]; + const face& f = srcPatch[srcFaceI]; pointHit ray = f.ray(tgtPoint, n, srcPoints); @@ -1510,7 +1510,7 @@ const forAll(addr, i) { label srcFaceI = addr[i]; - const face& f = srcPatch[tgtFaceI]; + const face& f = srcPatch[srcFaceI]; vector nFace(-srcPatch.faceNormals()[srcFaceI]); nFace += tgtPatch.faceNormals()[tgtFaceI]; diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index ffe52a4e40..9d33b277a7 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -993,8 +993,8 @@ Foam::label Foam::cyclicAMIPolyPatch::pointFace { return neighbPatch().AMI().srcPointFace ( - *this, neighbPatch(), + *this, n, faceI, p