decompositionMethod::scaleWeights: Only call reduce if running distributed

This commit is contained in:
Henry Weller
2024-05-23 16:25:58 +01:00
parent d444cb168d
commit bb9bf33869

View File

@ -306,7 +306,11 @@ Foam::labelList Foam::decompositionMethod::scaleWeights
{
sumIntWeights[i % nWeights] += intWeights[i];
}
if (distributed)
{
reduce(sumIntWeights, ListOp<sumOp<label>>());
}
// Check that the sum of each weight is non-zero
boolList nonZeroWeights(nWeights, false);