ENH: faceZone: warn for illegal contents
This commit is contained in:
parent
180c59fbe2
commit
104d262f8d
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user