BUG: zones inGroup entry not read from dictionary (fixes #2485)

ENH: add ZoneMesh groupNames method
This commit is contained in:
Mark Olesen
2022-05-25 14:03:03 +02:00
parent 0efa5f062a
commit 525db80889
3 changed files with 14 additions and 2 deletions

View File

@ -307,6 +307,13 @@ Foam::wordList Foam::ZoneMesh<ZoneType, MeshType>::names() const
}
template<class ZoneType, class MeshType>
Foam::wordList Foam::ZoneMesh<ZoneType, MeshType>::groupNames() const
{
return this->groupZoneIDs().sortedToc();
}
template<class ZoneType, class MeshType>
Foam::wordList Foam::ZoneMesh<ZoneType, MeshType>::names
(

View File

@ -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;

View File

@ -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<labelList>(labelsName), index)
zoneIdentifier(name, dict, index),
labelList(dict.get<labelList>(labelsName)),
lookupMapPtr_(nullptr)
{}