From 5091c79e96b22288d629a31c93aa71afab2b9782 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 27 Mar 2024 10:28:56 +0000 Subject: [PATCH] BUG: topoSet: allow use of 'set' as input for zones. Fixes #3126 --- src/meshTools/topoSet/topoSets/cellZoneSet.C | 57 ++++++++++++++----- src/meshTools/topoSet/topoSets/faceZoneSet.C | 42 ++++++++++++-- src/meshTools/topoSet/topoSets/pointZoneSet.C | 57 ++++++++++++++----- 3 files changed, 124 insertions(+), 32 deletions(-) diff --git a/src/meshTools/topoSet/topoSets/cellZoneSet.C b/src/meshTools/topoSet/topoSets/cellZoneSet.C index 4fca3baacc..fd36af0d2f 100644 --- a/src/meshTools/topoSet/topoSets/cellZoneSet.C +++ b/src/meshTools/topoSet/topoSets/cellZoneSet.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018-2022 OpenCFD Ltd. + Copyright (C) 2018-2022,2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -114,7 +114,12 @@ Foam::cellZoneSet::cellZoneSet : cellSet(mesh, name, set.size(), wOpt), mesh_(mesh), - addressing_(refCast(set).addressing()) + addressing_ + ( + isA(set) + ? refCast(set).addressing() + : set.sortedToc() + ) { updateSet(); } @@ -156,13 +161,27 @@ void Foam::cellZoneSet::subset(const topoSet& set) { DynamicList