BUG: faceZoneToCell: cell next to facezone can be -1 for boundary face

This commit is contained in:
mattijs
2016-03-30 11:16:00 +01:00
parent 53d474db41
commit e0d9fc71f4

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -90,7 +90,7 @@ void Foam::faceZoneToCell::combine(topoSet& set, const bool add) const
forAll(cellLabels, i)
{
// Only do active cells
if (cellLabels[i] < mesh_.nCells())
if (cellLabels[i] >= 0 && cellLabels[i] < mesh_.nCells())
{
addOrDelete(set, cellLabels[i], add);
}