ENH: subsetMesh: improved error checking

This commit is contained in:
mattijs
2012-12-05 12:42:53 +00:00
parent d2cfb24ef8
commit 2e046d32d0
2 changed files with 15 additions and 4 deletions

View File

@ -156,10 +156,21 @@ Foam::boolList Foam::cellSelections::outsideCellSelection::findRegions
reduce(keepRegionI, maxOp<label>());
keepRegion[keepRegionI] = true;
reduce(keepProcI, maxOp<label>());
if (keepProcI == -1)
{
FatalErrorIn
(
"outsideCellSelection::findRegions"
"(const bool, const regionSplit&)"
) << "Did not find " << locationsInMesh_[i]
<< " in mesh." << " Mesh bounds are " << mesh_.bounds()
<< exit(FatalError);
}
if (verbose)
{
reduce(keepProcI, maxOp<label>());
Info<< "Found location " << locationsInMesh_[i]
<< " in cell " << cellI << " on processor " << keepProcI
<< " in global region " << keepRegionI