mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add UPstream::allProcs() method
- returns a range of `int` values that can be iterated across.
For example,
for (const int proci : Pstream::allProcs()) { ... }
instead of
for (label proci = 0; proci < Pstream::nProcs(); ++proci) { ... }
This commit is contained in:
@ -185,7 +185,7 @@ void printMeshData(const polyMesh& mesh)
|
||||
label totProcPatches = 0;
|
||||
label maxProcFaces = 0;
|
||||
|
||||
for (label procI = 0; procI < Pstream::nProcs(); ++procI)
|
||||
for (const int procI : Pstream::allProcs())
|
||||
{
|
||||
Info<< nl
|
||||
<< "Processor " << procI << nl
|
||||
|
||||
Reference in New Issue
Block a user