mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +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:
@ -7,7 +7,7 @@ const label maxDynListLength
|
||||
viewFactorDict.getOrDefault<label>("maxDynListLength", 100000)
|
||||
);
|
||||
|
||||
for (label proci = 0; proci < Pstream::nProcs(); proci++)
|
||||
for (const int proci : Pstream::allProcs())
|
||||
{
|
||||
// Shoot rays from me to proci. Note that even if processor has
|
||||
// 0 faces we still need to call findLine to keep calls synced.
|
||||
|
||||
Reference in New Issue
Block a user