BUG: pressure FO - create new tmp to avoid db clash

This commit is contained in:
Andrew Heather
2016-12-23 14:17:39 +00:00
parent b8f328c7f2
commit 89517146b2

View File

@ -176,11 +176,16 @@ bool Foam::functionObjects::pressure::calc()
{
const volScalarField& p = lookupObject<volScalarField>(fieldName_);
return store
tmp<volScalarField> tp
(
resultName_,
coeff(pRef(pDyn(p, rhoScale(p))))
new volScalarField
(
resultName_,
coeff(pRef(pDyn(p, rhoScale(p))))
)
);
return store(resultName_, tp);
}
else
{