From f19e3deb404a2da17ab1a11cbe7368c53f99bd13 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sat, 24 Oct 2015 21:39:10 +0100 Subject: [PATCH] cyclicACMIPolyPatch: remove tolerance from the ACMI interpolation Maybe resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1335 awaiting feedback from reporter. --- .../cyclicACMIPolyPatchTemplates.C | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C index 231a2e0ba7..82bce867c1 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,8 +23,6 @@ License \*---------------------------------------------------------------------------*/ -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - template Foam::tmp > Foam::cyclicACMIPolyPatch::interpolate ( @@ -32,27 +30,20 @@ Foam::tmp > Foam::cyclicACMIPolyPatch::interpolate const Field& fldNonOverlap ) const { - // note: do not scale AMI field as face areas have already been taken - // into account + // Note: do not scale AMI field as face areas have already been taken into + // account if (owner()) { - const scalarField& w = srcMask_; - - tmp > interpField(AMI().interpolateToSource(fldCouple)); - - return interpField + (1.0 - w)*fldNonOverlap; + return + AMI().interpolateToSource(fldCouple) + + (1.0 - AMI().srcWeightsSum())*fldNonOverlap; } else { - const scalarField& w = neighbPatch().tgtMask(); - - tmp > interpField - ( + return neighbPatch().AMI().interpolateToTarget(fldCouple) - ); - - return interpField + (1.0 - w)*fldNonOverlap; + + (1.0 - neighbPatch().AMI().tgtWeightsSum())*fldNonOverlap; } } @@ -77,22 +68,18 @@ void Foam::cyclicACMIPolyPatch::interpolate List& result ) const { - // note: do not scale AMI field as face areas have already been taken - // into account + // Note: do not scale AMI field as face areas have already been taken into + // account if (owner()) { - const scalarField& w = srcMask_; - AMI().interpolateToSource(fldCouple, cop, result); - result = result + (1.0 - w)*fldNonOverlap; + result += (1.0 - AMI().srcWeightsSum())*fldNonOverlap; } else { - const scalarField& w = neighbPatch().tgtMask(); - neighbPatch().AMI().interpolateToTarget(fldCouple, cop, result); - result = result + (1.0 - w)*fldNonOverlap; + result += (1.0 - neighbPatch().AMI().tgtWeightsSum())*fldNonOverlap; } }