diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C index 8b1b3e26a4..b25a2d4c1f 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C @@ -2448,6 +2448,19 @@ void Foam::meshRefinement::growCellZone } } + // Fix any left-over unvisited cells + if (backgroundZoneID != -2) + { + forAll(cellToZone, celli) + { + if (cellToZone[celli] == -2) + { + cellToZone[celli] = backgroundZoneID; + nBackgrounded++; + } + } + } + // Make sure to unset faces of changed cell