check on existence of faceZone

This commit is contained in:
mattijs
2009-09-03 08:56:07 +01:00
parent fa5091dd50
commit e94d59d88e

View File

@ -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<label>())