Skip to content
Snippets Groups Projects
Commit 8776981c authored by mattijs's avatar mattijs
Browse files

BUG: faceZone: checkAddressing gets called when mesh.nFaces not set yet.

parent 20726d53
No related merge requests found
......@@ -174,14 +174,17 @@ void Foam::faceZone::checkAddressing() const
const labelList& mf = *this;
// Note: nFaces, nCells might not be set yet on mesh so use owner size
const label nFaces = zoneMesh().mesh().faceOwner().size();
bool hasWarned = false;
forAll(mf, i)
{
if (!hasWarned && (mf[i] < 0 || mf[i] >= zoneMesh().mesh().nFaces()))
if (!hasWarned && (mf[i] < 0 || mf[i] >= nFaces))
{
WarningIn("void Foam::faceZone::checkAddressing() const")
<< "Illegal face index " << mf[i] << " outside range 0.."
<< zoneMesh().mesh().nFaces()-1 << endl;
<< 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