mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add UPstream::subProcs() static method
- returns a range of `int` values that can be iterated across.
For example,
for (const int proci : Pstream::subProcs()) { ... }
instead of
for
(
int proci = Pstream::firstSlave();
proci <= Pstream::lastSlave();
++proci
)
{
...
}
This commit is contained in:
@ -1655,7 +1655,7 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs
|
||||
bool masterOnly;
|
||||
{
|
||||
masterOnly = true;
|
||||
for (label proci = 1; proci < Pstream::nProcs(); proci++)
|
||||
for (const int proci : Pstream::subProcs())
|
||||
{
|
||||
if (triIndexer.localSize(proci) != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user