diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index 6f7665b944..eb73b6f436 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -206,13 +206,20 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels) bool Foam::GAMGAgglomeration::continueAgglomerating ( + const label nFineCells, const label nCoarseCells ) const { - // Check the need for further agglomeration on all processors - bool contAgg = nCoarseCells >= nCellsInCoarsestLevel_; - mesh().reduce(contAgg, andOp()); - return contAgg; + const label nTotalCoarseCells = returnReduce(nCoarseCells, sumOp