diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C index b64842bf12220cf895f00dda4ab09d2a6658a058..544a7261b351d169e3df167963afd6def45ec51b 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 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,17 +36,20 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate { const scalarField& w = srcMask_; - return - w*AMI().interpolateToSource(fldCouple) - + (1.0 - w)*fldNonOverlap; + tmp<Field<Type> > interpField(AMI().interpolateToSource(fldCouple)); + + return w*interpField + (1.0 - w)*fldNonOverlap; } else { const scalarField& w = neighbPatch().tgtMask(); - return - w*neighbPatch().AMI().interpolateToTarget(fldCouple) - + (1.0 - w)*fldNonOverlap; + tmp<Field<Type> > interpField + ( + neighbPatch().AMI().interpolateToTarget(fldCouple) + ); + + return w*interpField + (1.0 - w)*fldNonOverlap; } }