Tobin Isaac committed 0a97e77

PCGAMG: Always rebuild coarse Mat the first time

The old conditional assumed that, if (!pc_gamg->repart), then the only coarse
matrix that needs to be rebuilt from scratch is on level 0. If the user has
changed pc_gamg->min_eq_proc, matrices higher in the hierarchy may also need to
be rebuilt from scratch.

Comments (0)

Files changed (1)


         for (level=pc_gamg->Nlevels-2; level>=0; level--) {
           /* the first time through the matrix structure has changed from repartitioning */
-          if (pc_gamg->setup_count==2 && (pc_gamg->repart || level==0)) {
+          if (pc_gamg->setup_count==2) {
             ierr = MatPtAP(dB,mglevels[level+1]->interpolate,MAT_INITIAL_MATRIX,1.0,&B);CHKERRQ(ierr);
             ierr = MatDestroy(&mglevels[level]->A);CHKERRQ(ierr);