@@ -1317,10 +1317,7 @@ MLMGT<MF>::mgVcycle (int amrlev, int mglev_top)
13171317
13181318 setVal (cor[amrlev][mglev], RT (0.0 ));
13191319 bool skip_fillboundary = true ;
1320- for (int i = 0 ; i < nu1; ++i) {
1321- linop.smooth (amrlev, mglev, cor[amrlev][mglev], res[amrlev][mglev], skip_fillboundary);
1322- skip_fillboundary = false ;
1323- }
1320+ linop.smooth (amrlev, mglev, cor[amrlev][mglev], res[amrlev][mglev], skip_fillboundary, nu1);
13241321
13251322 // rescor = res - L(cor)
13261323 computeResOfCorrection (amrlev, mglev);
@@ -1364,11 +1361,8 @@ MLMGT<MF>::mgVcycle (int amrlev, int mglev_top)
13641361 }
13651362 setVal (cor[amrlev][mglev_bottom], RT (0.0 ));
13661363 bool skip_fillboundary = true ;
1367- for (int i = 0 ; i < nu1; ++i) {
1368- linop.smooth (amrlev, mglev_bottom, cor[amrlev][mglev_bottom],
1369- res[amrlev][mglev_bottom], skip_fillboundary);
1370- skip_fillboundary = false ;
1371- }
1364+ linop.smooth (amrlev, mglev_bottom, cor[amrlev][mglev_bottom],
1365+ res[amrlev][mglev_bottom], skip_fillboundary, nu1);
13721366 if (verbose >= 4 )
13731367 {
13741368 computeResOfCorrection (amrlev, mglev_bottom);
@@ -1391,9 +1385,7 @@ MLMGT<MF>::mgVcycle (int amrlev, int mglev_top)
13911385 amrex::Print () << print_ident << " AT LEVEL " << amrlev << " " << mglev
13921386 << " UP: Norm before smooth " << norm << " \n " ;
13931387 }
1394- for (int i = 0 ; i < nu2; ++i) {
1395- linop.smooth (amrlev, mglev, cor[amrlev][mglev], res[amrlev][mglev]);
1396- }
1388+ linop.smooth (amrlev, mglev, cor[amrlev][mglev], res[amrlev][mglev], false , nu2);
13971389
13981390 if (cf_strategy == CFStrategy::ghostnodes) { computeResOfCorrection (amrlev, mglev); }
13991391
@@ -1512,10 +1504,7 @@ MLMGT<MF>::actualBottomSolve ()
15121504 if (bottom_solver == BottomSolver::smoother)
15131505 {
15141506 bool skip_fillboundary = true ;
1515- for (int i = 0 ; i < nuf; ++i) {
1516- linop.smooth (amrlev, mglev, x, b, skip_fillboundary);
1517- skip_fillboundary = false ;
1518- }
1507+ linop.smooth (amrlev, mglev, x, b, skip_fillboundary, nuf);
15191508 }
15201509 else
15211510 {
@@ -1589,9 +1578,7 @@ MLMGT<MF>::actualBottomSolve ()
15891578 setVal (cor[amrlev][mglev], RT (0.0 ));
15901579 }
15911580 const int n = (ret==0 ) ? nub : nuf;
1592- for (int i = 0 ; i < n; ++i) {
1593- linop.smooth (amrlev, mglev, x, b);
1594- }
1581+ linop.smooth (amrlev, mglev, x, b, false , n);
15951582 }
15961583 }
15971584
0 commit comments