From 24cce0bb58764d515b2b481ec9ff46731c61235b Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 13 Aug 2009 10:14:43 +0100 Subject: [PATCH] porousZone - abort in parallel if the cellZone cannot be found - the previous check didn't catch bad cellZone names when running in parallel --- src/finiteVolume/cfdTools/general/porousMedia/porousZone.C | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C index 34e85c2e2..3251e2541 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C +++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C @@ -81,7 +81,10 @@ Foam::porousZone::porousZone { Info<< "Creating porous zone: " << name_ << endl; - if (cellZoneID_ == -1 && !Pstream::parRun()) + bool foundZone = (cellZoneID_ != -1); + reduce(foundZone, orOp()); + + if (!foundZone && Pstream::master()) { FatalErrorIn ( @@ -91,6 +94,7 @@ Foam::porousZone::porousZone << exit(FatalError); } + // porosity if (dict_.readIfPresent("porosity", porosity_)) { -- 2.11.4.GIT