BACKPORT: BUG: particleTracks: limit origProcID to nProcs
This commit is contained in:
parent
8b10bfb4d5
commit
9ca700272e
1 changed files with 14 additions and 0 deletions
|
@ -80,9 +80,23 @@ int main(int argc, char *argv[])
|
|||
label origId = iter().origId();
|
||||
label origProc = iter().origProc();
|
||||
|
||||
if (origProc >= maxIds.size())
|
||||
{
|
||||
// Expand size
|
||||
maxIds.setSize(origProc+1, -1);
|
||||
}
|
||||
|
||||
maxIds[origProc] = max(maxIds[origProc], origId);
|
||||
}
|
||||
}
|
||||
|
||||
label maxNProcs = returnReduce(maxIds.size(), maxOp<label>());
|
||||
|
||||
Info<< "Detected particles originating from " << maxNProcs
|
||||
<< " processors." << nl << endl;
|
||||
|
||||
maxIds.setSize(maxNProcs, -1);
|
||||
|
||||
Pstream::listCombineGather(maxIds, maxEqOp<label>());
|
||||
Pstream::listCombineScatter(maxIds);
|
||||
|
||||
|
|
Reference in a new issue