<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div>   Ok, here is the situation. The command line options as given do not result in multigrid quality convergence in any of the runs; the error contraction factor is around .94 (meaning that for the modes that the multigrid algorithm does the worst on it only removes about 6 percent of them per iteration). <div><br></div><div>   But this is hidden by the initial right hand side for the linear system as written in ex45.c which has O(h) values on the boundary nodes and O(h^3) values on the interior nodes. The first iterations are largely working on the boundary residual and making great progress attacking that so that it looks like the one has a good error contraction factor. One then sees the error contraction factor start to get worse and worse for the later iterations. With the 0 on the boundary the iterations quickly get to the bad regime where the error contraction factor is near one. One can see this by using a -ksp_rtol 1.e-12 and having the MG code print the residual decrease for each iteration. Thought it appears the 0 boundary condition one converges much slower (since it requires many more iterations) if you factor out the huge advantage of the nonzero boundary condition case at the beginning (in terms of decreasing the residual) you see they both have an asymptotic error contraction factor of around .94 (which is horrible for multigrid).</div><div><br></div><div>   I now add <span style="font-family: Menlo; font-size: 14px;">-mg_levels_ksp_richardson_scale .9 -mg_coarse_ksp_richardson_scale .9</span><span style="font-family: Menlo; font-size: 14px;"> and </span>rerun the two cases (nonzero and zero boundary right hand side) they take 35 and 41 iterations (much better)</div><div><br></div><div><p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">initial residual norm 14.6993</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.84167 0.0572591</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.0665392 0.00452668</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.0307273 0.00209039</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.0158949 0.00108134</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.00825189 0.000561378</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.00428474 0.000291492</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.00222482 0.000151355</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.00115522 7.85898e-05</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.000599836 4.0807e-05</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.000311459 2.11887e-05</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.000161722 1.1002e-05</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 8.39727e-05 5.71269e-06</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 4.3602e-05 2.96626e-06</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 2.26399e-05 1.5402e-06</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.17556e-05 7.99735e-07</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 6.10397e-06 4.15255e-07</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 3.16943e-06 2.15617e-07</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.64569e-06 1.11957e-07</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 8.54511e-07 5.81326e-08</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 4.43697e-07 3.01848e-08</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 2.30385e-07 1.56732e-08</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.19625e-07 8.13815e-09</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 6.21143e-08 4.22566e-09</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 3.22523e-08 2.19413e-09</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.67467e-08 1.13928e-09</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 8.69555e-09 5.91561e-10</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 4.51508e-09 3.07162e-10</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 2.34441e-09 1.59491e-10</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.21731e-09 8.28143e-11</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 6.32079e-10 4.30005e-11</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 3.28201e-10 2.23276e-11</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.70415e-10 1.15934e-11</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 8.84865e-11 6.01976e-12</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 4.59457e-11 3.1257e-12</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 2.38569e-11 1.62299e-12</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.23875e-11 8.42724e-13</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">Linear solve converged due to CONVERGED_RTOL iterations 35</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">Residual norm 1.23875e-11</span></p></div><div><span style="font-variant-ligatures: no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures: no-common-ligatures"><p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">initial residual norm 172.601</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 154.803 0.896887</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 66.9409 0.387837</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 34.4572 0.199636</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 17.8836 0.103612</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 9.28582 0.0537995</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 4.82161 0.027935</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 2.50358 0.014505</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.29996 0.0075316</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.674992 0.00391071</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.350483 0.0020306</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.181985 0.00105437</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.094494 0.000547472</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.0490651 0.000284269</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.0254766 0.000147604</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.0132285 7.6642e-05</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.00686876 3.97956e-05</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.00356654 2.06635e-05</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.00185189 1.07293e-05</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.000961576 5.5711e-06</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.000499289 2.89274e-06</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.000259251 1.50203e-06</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 0.000134614 7.79914e-07</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 6.98969e-05 4.04963e-07</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 3.62933e-05 2.10273e-07</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.88449e-05 1.09182e-07</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 9.78505e-06 5.66919e-08</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 5.0808e-06 2.94367e-08</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 2.63815e-06 1.52847e-08</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.36984e-0</span>6 7.93645e-09</p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 7.11275e-07 4.12093e-09</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 3.69322e-07 2.13975e-09</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.91767e-07 1.11105e-09</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 9.95733e-08 5.769e-10</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 5.17024e-08 2.99549e-10</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 2.6846e-08 1.55538e-10</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.39395e-08 8.07615e-11</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 7.23798e-09 4.19348e-11</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 3.75824e-09 2.17742e-11</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.95138e-09 1.13058e-11</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.01327e-09 5.87059e-12</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 5.26184e-10 3.04856e-12</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 2.73182e-10 1.58274e-12</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">next residual norm 1.41806e-10 8.21586e-13</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">Linear solve converged due to CONVERGED_RTOL iterations 42</span></p>
<p style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures">Residual norm 1.41806e-10</span></p><div><span style="font-variant-ligatures: no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures: no-common-ligatures">Notice in the first run the residual norm still dives much more quickly for the first 2 iterations than the second run. This is because the first run has "lucky error" that gets wiped out easily from the big boundary term. After that you can see that the convergence for both is very similar with both having a reasonable error contraction factor of .51</span></div><div><span style="font-variant-ligatures: no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures: no-common-ligatures">I' ve attached the modified src/ksp/pc/impls/mg/mg.c that prints the residuals along the way. </span></div></span></div></body></html>