Skip to content
Snippets Groups Projects
Commit 104d262f authored by mattijs's avatar mattijs
Browse files

ENH: faceZone: warn for illegal contents

parent 180c59fb
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -171,6 +171,20 @@ void Foam::faceZone::checkAddressing() const
<< " size of flip map: " << flipMap_.size()
<< abort(FatalError);
}
const labelList& mf = *this;
bool hasWarned = false;
forAll(mf, i)
{
if (!hasWarned && (mf[i] < 0 || mf[i] >= zoneMesh().mesh().nFaces()))
{
WarningIn("void Foam::faceZone::checkAddressing() const")
<< "Illegal face index " << mf[i] << " outside range 0.."
<< zoneMesh().mesh().nFaces()-1 << endl;
hasWarned = true;
}
}
}
......
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