mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: bundle Pstream:: AllGather methods
- bundles frequently used 'gather/scatter' patterns more consistently. - combineAllGather -> combineGather + broadcast - listCombineAllGather -> listCombineGather + broadcast - mapCombineAllGather -> mapCombineGather + broadcast - allGatherList -> gatherList + scatterList - reduce -> gather + broadcast (ie, allreduce) - The allGatherList currently wraps gatherList/scatterList, but may be replaced with a different algorithm in the future. STYLE: PstreamCombineReduceOps.H is mostly unneeded now
This commit is contained in:
@ -418,8 +418,12 @@ void Foam::multiLevelDecomp::decompose
|
||||
);
|
||||
|
||||
label nPoints = returnReduce(domainPoints.size(), sumOp<label>());
|
||||
Pstream::listCombineGather(nOutsideConnections, plusEqOp<label>());
|
||||
Pstream::broadcast(nOutsideConnections);
|
||||
|
||||
Pstream::listCombineAllGather
|
||||
(
|
||||
nOutsideConnections,
|
||||
plusEqOp<label>()
|
||||
);
|
||||
label nPatches = 0;
|
||||
label nFaces = 0;
|
||||
for (const label nConnect : nOutsideConnections)
|
||||
@ -526,12 +530,11 @@ void Foam::multiLevelDecomp::decompose
|
||||
}
|
||||
|
||||
reduce(nPoints, sumOp<label>());
|
||||
Pstream::listCombineGather
|
||||
Pstream::listCombineAllGather
|
||||
(
|
||||
nOutsideConnections,
|
||||
plusEqOp<label>()
|
||||
);
|
||||
Pstream::broadcast(nOutsideConnections);
|
||||
|
||||
label nPatches = 0;
|
||||
label nFaces = 0;
|
||||
|
||||
Reference in New Issue
Block a user