ENH: pressureTools - updated so that (reference) pressure field not necessary on construction

This commit is contained in:
andy
2013-07-23 14:03:55 +01:00
parent 5e50580e2b
commit 4f7d70efc6

View File

@ -268,11 +268,9 @@ void Foam::pressureTools::read(const dictionary& dict)
dict.readIfPresent("UName", UName_); dict.readIfPresent("UName", UName_);
dict.readIfPresent("rhoName", rhoName_); dict.readIfPresent("rhoName", rhoName_);
const volScalarField& p = obr_.lookupObject<volScalarField>(pName_); if (rhoName_ == "rhoInf")
if (p.dimensions() != dimPressure)
{ {
dict.lookup("rhoRef") >> rhoInf_; dict.lookup("rhoInf") >> rhoInf_;
} }
dict.lookup("calcTotal") >> calcTotal_; dict.lookup("calcTotal") >> calcTotal_;