wallHeatFlux: Avoid holding references to temporary fields

This commit is contained in:
Henry Weller
2018-08-08 18:37:08 +01:00
parent c170b24e8e
commit 6f23328ef8

View File

@ -218,10 +218,12 @@ bool Foam::functionObjects::wallHeatFlux::execute()
(
turbulenceModel::propertiesName
);
const volScalarField& alpha = turbModel.alphaEff();
const volScalarField& he = turbModel.transport().he();
return store(name, calcWallHeatFlux(alpha, he));
return store
(
name,
calcWallHeatFlux(turbModel.alphaEff(), turbModel.transport().he())
);
}
else if (foundObject<solidThermo>(solidThermo::dictName))
{