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:
Mark Olesen
2022-08-23 15:58:32 +02:00
committed by Andrew Heather
parent b9c15b8585
commit 473e14418a
103 changed files with 248 additions and 307 deletions

View File

@ -101,7 +101,7 @@ void Foam::faMeshReconstructor::calcAddressing
? 0
: singlePatchFaceLabels_.first()
);
Pstream::scatter(patchFirstMeshfacei);
Pstream::broadcast(patchFirstMeshfacei);
for (label& facei : faFaceProcAddr_)
{
@ -169,7 +169,7 @@ void Foam::faMeshReconstructor::calcAddressing
}
// Broadcast the same information everywhere
Pstream::scatter(singlePatchFaceLabels_);
Pstream::broadcast(singlePatchFaceLabels_);
// ------------------
@ -283,7 +283,7 @@ void Foam::faMeshReconstructor::calcAddressing
mpm[mp[i]] = i;
}
}
Pstream::scatter(mpm);
Pstream::broadcast(mpm);
// Rewrite pointToGlobal according to the correct point order
for (label& pointi : pointToGlobal)
@ -299,8 +299,8 @@ void Foam::faMeshReconstructor::calcAddressing
}
// Broadcast the same information everywhere
Pstream::scatter(singlePatchFaces_);
Pstream::scatter(singlePatchPoints_);
Pstream::broadcast(singlePatchFaces_);
Pstream::broadcast(singlePatchPoints_);
// Now have enough global information to determine global edge mappings
@ -383,13 +383,8 @@ void Foam::faMeshReconstructor::calcAddressing
// OR patchEdgeLabels =
// UIndirectList<label>(faEdgeProcAddr_, fap.edgeLabels());
// Collect from all processors
Pstream::combineAllGather
(
patchEdgeLabels,
ListOps::appendEqOp<label>()
);
// Combine from all processors
Pstream::combineReduce(patchEdgeLabels, ListOps::appendEqOp<label>());
// Sorted order will be the original non-decomposed order
Foam::sort(patchEdgeLabels);