COMP: ACMI - refactored to avoid gcc bug

This commit is contained in:
andy
2014-01-09 15:27:56 +00:00
parent f8991db92d
commit 5012770cf6

View File

@ -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;
}
}