mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: more consistent use of broadcast, combineReduce etc.
- broadcast : (replaces scatter)
- combineReduce == combineGather + broadcast
- listCombineReduce == listCombineGather + broadcast
- mapCombineReduce == mapCombineGather + broadcast
- allGatherList == gatherList + scatterList
Before settling on a more consistent naming convention,
some intermediate namings were used in OpenFOAM-v2206:
- combineReduce (2206: combineAllGather)
- listCombineReduce (2206: listCombineAllGather)
- mapCombineReduce (2206: mapCombineAllGather)
This commit is contained in:
committed by
Andrew Heather
parent
b9c15b8585
commit
473e14418a
@ -89,10 +89,11 @@ void Foam::parLagrangianDistributor::findClouds
|
||||
}
|
||||
|
||||
// Synchronise cloud names
|
||||
Pstream::combineGather(cloudNames, ListOps::uniqueEqOp<word>());
|
||||
Pstream::broadcast(cloudNames);
|
||||
Pstream::combineReduce(cloudNames, ListOps::uniqueEqOp<word>());
|
||||
Foam::sort(cloudNames); // Consistent order
|
||||
|
||||
objectNames.setSize(cloudNames.size());
|
||||
objectNames.clear();
|
||||
objectNames.resize(cloudNames.size());
|
||||
|
||||
for (const fileName& localCloudName : localCloudDirs)
|
||||
{
|
||||
@ -124,11 +125,11 @@ void Foam::parLagrangianDistributor::findClouds
|
||||
}
|
||||
}
|
||||
|
||||
// Synchronise objectNames
|
||||
forAll(objectNames, i)
|
||||
// Synchronise objectNames (per cloud)
|
||||
for (wordList& objNames : objectNames)
|
||||
{
|
||||
Pstream::combineGather(objectNames[i], ListOps::uniqueEqOp<word>());
|
||||
Pstream::broadcast(objectNames[i]);
|
||||
Pstream::combineReduce(objNames, ListOps::uniqueEqOp<word>());
|
||||
Foam::sort(objNames); // Consistent order
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,7 +292,7 @@ Foam::parLagrangianDistributor::distributeLagrangianPositions
|
||||
nsTransPs[sendProcI] = subMap[sendProcI].size();
|
||||
}
|
||||
// Send sizes across. Note: blocks.
|
||||
Pstream::combineAllGather(sizes, Pstream::listEq());
|
||||
Pstream::combineReduce(sizes, Pstream::listEq());
|
||||
|
||||
labelListList constructMap(Pstream::nProcs());
|
||||
label constructSize = 0;
|
||||
|
||||
Reference in New Issue
Block a user