decompositionMethod::scaleWeights: Only call reduce if running distributed
This commit is contained in:
@ -306,7 +306,11 @@ Foam::labelList Foam::decompositionMethod::scaleWeights
|
|||||||
{
|
{
|
||||||
sumIntWeights[i % nWeights] += intWeights[i];
|
sumIntWeights[i % nWeights] += intWeights[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (distributed)
|
||||||
|
{
|
||||||
reduce(sumIntWeights, ListOp<sumOp<label>>());
|
reduce(sumIntWeights, ListOp<sumOp<label>>());
|
||||||
|
}
|
||||||
|
|
||||||
// Check that the sum of each weight is non-zero
|
// Check that the sum of each weight is non-zero
|
||||||
boolList nonZeroWeights(nWeights, false);
|
boolList nonZeroWeights(nWeights, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user