faceZoneToCell: Corrected cell selection logic
Patch contributed by Mattijs Janssens Resolved bug-report http://www.openfoam.org/mantisbt/view.php?id=2038
This commit is contained in:
parent
5312f6c7f0
commit
eabb03aa2a
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user