From 5012770cf6b4eda228e76d2ea13b68ab04fc78c8 Mon Sep 17 00:00:00 2001 From: andy <andy> Date: Thu, 9 Jan 2014 15:27:56 +0000 Subject: [PATCH] COMP: ACMI - refactored to avoid gcc bug --- .../cyclicACMIPolyPatchTemplates.C | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatchTemplates.C index b64842bf122..544a7261b35 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; } } -- GitLab