ENH: use returnReduceAnd(), returnReduceOr() functions

DOC: document which MPI send/recv are associated with commType
This commit is contained in:
Mark Olesen
2022-08-24 12:00:44 +02:00
committed by Andrew Heather
parent 473e14418a
commit 70208a7399
172 changed files with 574 additions and 840 deletions

View File

@ -381,9 +381,7 @@ void Foam::meshToMesh::normaliseWeights
scalarListList& wght
) const
{
const label nCell = returnReduce(wght.size(), sumOp<label>());
if (nCell > 0)
if (returnReduceOr(wght.size()))
{
forAll(wght, celli)
{

View File

@ -140,7 +140,7 @@ void Foam::meshToMesh::mapSrcToTgt
if (singleMeshProc_ == -1)
{
if (returnReduce(tgtToSrcCellVec_.size(), sumOp<label>()) == 0)
if (returnReduceAnd(tgtToSrcCellVec_.empty()))
{
// No correction vectors calculated. Fall back to first order.
mapSrcToTgt(srcField, cop, result);
@ -353,7 +353,7 @@ void Foam::meshToMesh::mapTgtToSrc
if (singleMeshProc_ == -1)
{
if (returnReduce(srcToTgtCellVec_.size(), sumOp<label>()) == 0)
if (returnReduceAnd(srcToTgtCellVec_.empty()))
{
// No correction vectors calculated. Fall back to first order.
mapTgtToSrc(tgtField, cop, result);
@ -478,7 +478,7 @@ void Foam::meshToMesh::mapInternalSrcToTgt
const bool secondOrder
) const
{
if (secondOrder && returnReduce(tgtToSrcCellVec_.size(), sumOp<label>()))
if (secondOrder && returnReduceOr(tgtToSrcCellVec_.size()))
{
mapSrcToTgt
(
@ -711,7 +711,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
const bool secondOrder
) const
{
if (secondOrder && returnReduce(srcToTgtCellVec_.size(), sumOp<label>()))
if (secondOrder && returnReduceOr(srcToTgtCellVec_.size()))
{
mapTgtToSrc
(