From 89517146b2cdc318c5b437d95aa6ce3c8361cdb4 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 23 Dec 2016 14:17:39 +0000 Subject: [PATCH] BUG: pressure FO - create new tmp to avoid db clash --- src/functionObjects/field/pressure/pressure.C | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/functionObjects/field/pressure/pressure.C b/src/functionObjects/field/pressure/pressure.C index 1344041fb0..c7cd724bc4 100644 --- a/src/functionObjects/field/pressure/pressure.C +++ b/src/functionObjects/field/pressure/pressure.C @@ -176,11 +176,16 @@ bool Foam::functionObjects::pressure::calc() { const volScalarField& p = lookupObject(fieldName_); - return store + tmp tp ( - resultName_, - coeff(pRef(pDyn(p, rhoScale(p)))) + new volScalarField + ( + resultName_, + coeff(pRef(pDyn(p, rhoScale(p)))) + ) ); + + return store(resultName_, tp); } else {