mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: for-range, forAllIters() ... in sampling/, surfMesh/
- reduced clutter when iterating over containers
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
@ -298,7 +298,7 @@ void Foam::isoSurfaceTopo::fixTetBasePtIs()
|
||||
|
||||
// Check for any points with count 2
|
||||
bool haveDangling = false;
|
||||
forAllConstIter(Map<label>, pointCount, iter)
|
||||
forAllConstIters(pointCount, iter)
|
||||
{
|
||||
if (iter() == 1)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -374,7 +374,7 @@ bool Foam::discreteSurface::update(const meshSearch& meshSearcher)
|
||||
surfZoneList zoneLst(zoneSizes.size());
|
||||
label start = 0;
|
||||
label zoneI = 0;
|
||||
forAllIter(Map<label>, zoneSizes, iter)
|
||||
forAllIters(zoneSizes, iter)
|
||||
{
|
||||
// No negative regionids, so Map<label> sorts properly
|
||||
const label regionid = iter.key();
|
||||
@ -399,7 +399,7 @@ bool Foam::discreteSurface::update(const meshSearch& meshSearcher)
|
||||
);
|
||||
|
||||
// Adjust start for the next zone and save (zoneId => zoneI) mapping
|
||||
start += iter();
|
||||
start += iter.val();
|
||||
iter() = zoneI++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user