diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C index 8c1e0cd003..e0d75e7e69 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C @@ -307,6 +307,13 @@ Foam::wordList Foam::ZoneMesh::names() const } +template +Foam::wordList Foam::ZoneMesh::groupNames() const +{ + return this->groupZoneIDs().sortedToc(); +} + + template Foam::wordList Foam::ZoneMesh::names ( diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H index a97d172a7b..8fbeca0d2c 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H @@ -159,6 +159,9 @@ public: //- A list of the zone names wordList names() const; + //- A list of the zone group names (if any) + wordList groupNames() const; + //- A list of zone names satisfying the input matcher wordList names(const wordRe& matcher) const; diff --git a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C index 77190fef48..67e400cef3 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -92,7 +92,9 @@ Foam::zone::zone const label index ) : - zone(name, dict.get(labelsName), index) + zoneIdentifier(name, dict, index), + labelList(dict.get(labelsName)), + lookupMapPtr_(nullptr) {}