mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: faceZone: checkAddressing gets called when mesh.nFaces not set yet.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user