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:
@ -707,7 +707,7 @@ void Foam::radiation::laserDTRM::calculate()
|
||||
Pstream::gatherList(p0);
|
||||
Pstream::scatterList(p0);
|
||||
|
||||
for (label proci = 0; proci < Pstream::nProcs(); ++proci)
|
||||
for (const int proci : Pstream::allProcs())
|
||||
{
|
||||
const pointField& pos = positions[proci];
|
||||
const pointField& pfinal = p0[proci];
|
||||
|
||||
Reference in New Issue
Block a user