diff --git a/src/meshTools/sets/cellSources/haloToCell/haloToCell.C b/src/meshTools/sets/cellSources/haloToCell/haloToCell.C index c5bc2ff9eb15f729472879c81429f8a0c5c53f36..d5b98bf447771c9aaa5b872c92ed0ad52f0f844a 100644 --- a/src/meshTools/sets/cellSources/haloToCell/haloToCell.C +++ b/src/meshTools/sets/cellSources/haloToCell/haloToCell.C @@ -28,6 +28,7 @@ License #include "haloToCell.H" #include "polyMesh.H" #include "cellSet.H" +#include "topoBitSet.H" #include "syncTools.H" #include "addToRunTimeSelectionTable.H" @@ -78,15 +79,21 @@ void Foam::haloToCell::combine(topoSet& set, const bool add) const const labelList& faceOwn = mesh_.faceOwner(); const labelList& faceNei = mesh_.faceNeighbour(); - // The starting set of cells bitSet current(cells.size()); - for (const label celli : set) + if (isA<topoBitSet>(set)) { - current.set(celli); + current |= refCast<const topoBitSet>(set).addressing(); } - + else + { + for (const label celli : set) + { + current.set(celli); + } + } + // The perimeter faces of the cell set bitSet outsideFaces(mesh_.nFaces());