extra check on illegal input

This commit is contained in:
mattijs 2008-08-06 10:25:37 +01:00
parent 75efb76033
commit 49c7752ba6

View File

@ -214,6 +214,18 @@ void Foam::removeCells::setRefinement
{
label patchI = exposedPatchIDs[i];
if (patchI < 0 || patchI >= patches.size())
{
FatalErrorIn
(
"removeCells::setRefinement(const labelList&"
", const labelList&, const labelList&, polyTopoChange&)"
) << "Invalid patch " << patchI
<< " for exposed face " << exposedFaceLabels[i] << endl
<< "Valid patches 0.." << patches.size()-1
<< abort(FatalError);
}
if (patches[patchI].coupled())
{
FatalErrorIn