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:
@ -322,7 +322,7 @@ void Foam::meshToMesh::distributeCells
|
||||
procLocalFaceIDs.setSize(Pstream::nProcs());;
|
||||
|
||||
|
||||
for (label domain = 0; domain < Pstream::nProcs(); domain++)
|
||||
for (const int domain : Pstream::allProcs())
|
||||
{
|
||||
const labelList& sendElems = map.subMap()[domain];
|
||||
|
||||
@ -501,7 +501,7 @@ void Foam::meshToMesh::distributeCells
|
||||
pBufs.finishedSends();
|
||||
|
||||
// Consume
|
||||
for (label domain = 0; domain < Pstream::nProcs(); domain++)
|
||||
for (const int domain : Pstream::allProcs())
|
||||
{
|
||||
const labelList& recvElems = map.constructMap()[domain];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user