MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / sumReduce

Function sumReduce

src/Pstream/mpi/UPstream.C:249–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247
248
249void Foam::sumReduce
250(
251 scalar& Value,
252 label& Count,
253 const int tag,
254 const label communicator
255)
256{
257 if (UPstream::warnComm != -1 && communicator != UPstream::warnComm)
258 {
259 Pout<< "** reducing:" << Value << " with comm:" << communicator
260 << " warnComm:" << UPstream::warnComm
261 << endl;
262 error::printStack(Pout);
263 }
264 vector2D twoScalars(Value, scalar(Count));
265 reduce(twoScalars, sumOp<vector2D>(), tag, communicator);
266
267 Value = twoScalars.x();
268 Count = twoScalars.y();
269}
270
271
272void Foam::reduce

Callers

nothing calls this directly

Calls 4

reduceFunction · 0.70
printStackFunction · 0.50
xMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected