diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamGather.C b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamGather.C index 1ea68fd28b..3317663ef8 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamGather.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamGather.C @@ -220,7 +220,7 @@ void Foam::Pstream::scatter(T& value, const int tag, const label comm) #ifndef Foam_Pstream_scatter_nobroadcast Pstream::broadcast(value, comm); #else - scatter(UPstream::whichCommunication(comm), value, tag, comm); + Pstream::scatter(UPstream::whichCommunication(comm), value, tag, comm); #endif } diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H index f7942e42ad..4438e446eb 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamReduceOps.H @@ -80,48 +80,13 @@ void reduce { if (UPstream::parRun()) { - reduce(UPstream::whichCommunication(comm), value, bop, tag, comm); - } -} - - -//- Reduce (copy) and return value -template -T returnReduce -( - const T& value, - const BinaryOp& bop, - const int tag = UPstream::msgType(), - const label comm = UPstream::worldComm -) -{ - T work(value); - reduce(work, bop, tag, comm); - return work; -} - - -//- Reduce inplace (cf. MPI Allreduce) -//- the sum of both value and count (for averaging) -template -void sumReduce -( - T& value, - label& count, - const int tag = UPstream::msgType(), - const label comm = UPstream::worldComm -) -{ - if (UPstream::parRun()) - { - reduce(value, sumOp(), tag, comm); - reduce(count, sumOp