mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use returnReduceAnd(), returnReduceOr() functions
DOC: document which MPI send/recv are associated with commType
This commit is contained in:
committed by
Andrew Heather
parent
473e14418a
commit
70208a7399
@ -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)
|
||||
{
|
||||
|
||||
@ -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
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user