From 55142ea9db2387bd6ce4204d83b63a30ac82789e 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 58fb989e..70372fc7 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 ffe52a4e..9d33b277 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