From 0326f7259f6776a8152575d97f2012c38c142227 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 1 Aug 2017 23:15:57 +0100 Subject: [PATCH] Fix handling for solo rows --- .../BlockMatrixSelection.C | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/foam/matrices/blockLduMatrix/BlockAMG/BlockMatrixCoarsening/BlockMatrixSelection/BlockMatrixSelection.C b/src/foam/matrices/blockLduMatrix/BlockAMG/BlockMatrixCoarsening/BlockMatrixSelection/BlockMatrixSelection.C index 324b704f4..344f48ad5 100644 --- a/src/foam/matrices/blockLduMatrix/BlockAMG/BlockMatrixCoarsening/BlockMatrixSelection/BlockMatrixSelection.C +++ b/src/foam/matrices/blockLduMatrix/BlockAMG/BlockMatrixCoarsening/BlockMatrixSelection/BlockMatrixSelection.C @@ -355,19 +355,17 @@ void Foam::BlockMatrixSelection::calcCoarsening() equationWeight.set(i, tRow[i + 1] - tRow[i]); } - // // HJ, REMOVE THIS: it is not allowed to have empty prolongation rows - // // because it destroys the diagonal dominance on the coarse level - // // HJ, 29/Jul/2017 - // // Mark highly diagonally dominant rows as fine. This also removes solo - // // equations from coarsening - // for (label i = 0; i < nRows; i++) - // { - // // Label rows without strong connections as FINE - // if (strongRow[i + 1] == strongRow[i]) - // { - // rowLabel_[i] = FINE; - // } - // } + // Mark disconnected rows as fine. This also removes solo + // equations from coarsening + // HJ, 29/Jul/2017 + for (label i = 0; i < nRows; i++) + { + // Label rows without strong connections as FINE + if (strongRow[i + 1] == strongRow[i]) + { + rowLabel_[i] = FINE; + } + } // Start counting coarse equations nCoarseEqns_ = 0;