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

View File

@ -27,7 +27,7 @@ selections
// used by snappyHexMesh, cvMesh.
type badQuality;
// Use the quality criteria from the snappyHexMeshDict
${.meshQualityControls}
${:meshQualityControls}
}
outside
@ -42,7 +42,7 @@ selections
//- Define mesh location for keeping.
// In this case use the one from snappyHexMeshDict. This can
// optionally be a list of locations.
locationsInMesh (${.castellatedMeshControls.locationInMesh});
locationsInMesh (${:castellatedMeshControls.locationInMesh});
}
}