cellZone, faceZone, pointZone: Removed internal index
Zones are now completely dynamic, i.e. the number of zones of each type can change during the run, e.g. by run-time mesh-to-mesh mapping onto meshes with different zones used to control mesh motion. This means that the index of each zone may change during the run and so it better that the zones do not cache their own index but it is looked-up from the zone list using findIndex when required.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -259,11 +259,12 @@ int main(int argc, char *argv[])
|
||||
// Collect faces on faceZones
|
||||
forAllConstIter(labelHashSet, includeFaceZones, iter)
|
||||
{
|
||||
const faceZone& pp = mfz[iter.key()];
|
||||
forAll(pp, i)
|
||||
const label fzi = iter.key();
|
||||
const faceZone& fz = mfz[fzi];
|
||||
forAll(fz, i)
|
||||
{
|
||||
faceLabels.append(pp[i]);
|
||||
compactZones.append(faceZoneToCompactZone[pp.index()]);
|
||||
faceLabels.append(fz[i]);
|
||||
compactZones.append(faceZoneToCompactZone[fzi]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user