Commit 49c7752b authored by Mattijs Janssens's avatar Mattijs Janssens
Browse files

extra check on illegal input

parent 75efb760
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment