mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: faceZone: warn for illegal contents
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -171,6 +171,20 @@ void Foam::faceZone::checkAddressing() const
|
|||||||
<< " size of flip map: " << flipMap_.size()
|
<< " size of flip map: " << flipMap_.size()
|
||||||
<< abort(FatalError);
|
<< 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user