From e94d59d88e9e426ccb7f0b36960cdba0e05a76f9 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 3 Sep 2009 08:56:07 +0100 Subject: [PATCH] check on existence of faceZone --- .../mesh/manipulation/createBaffles/createBaffles.C | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 0ba1af5bea..3d23cce5c3 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -146,6 +146,14 @@ int main(int argc, char *argv[]) Info<< "Converting faces on zone " << zoneID.name() << " into baffles." << nl << endl; + if (zoneID.index() == -1) + { + FatalErrorIn(args.executable()) << "Cannot find faceZone " + << zoneID.name() << endl + << "Valid zones are " << faceZones.names() + << exit(FatalError); + } + const faceZone& fZone = faceZones[zoneID.index()]; Info<< "Found " << returnReduce(fZone.size(), sumOp