<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I am trying to follow the meaning of this note from the manual: <div class=""><br class=""></div><div class="">“ <span style="font-family: -webkit-standard; font-size: medium; background-color: rgb(255, 255, 255);" class="">GAMG removes small values from the graph with this threshold, and thus reducing the coupling in the graph and a different (perhaps better) coarser set of points</span>"</div><div class=""><div><br class=""></div><div>So, I understand that increasing the value of threshold will result in larger number of connectivity edges to be dropped in the coarsening step. </div><div><br class=""></div><div>However, conceptually I think of the connectivity in the Jacobian matrix as the off-diagonal terms, which are critical to defining the coupled nature of the dofs in the problem. If I understand the manual correctly (which I am likely not) AMG prefers that in the coarsening step more of these couplings be dropped to enhance convergence (?). </div><div><br class=""></div><div>I can’t quite reconcile this with the potentially disastrous prospect of dropping couplings in the original matrix (without MG). But, somehow it works favorably for the coarsening step in a MG (?). </div><div><br class=""></div><div>I would appreciate some guidance. </div><div><br class=""></div><div>Regards,</div><div>Manav</div><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 29, 2018, at 1:57 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" class="">jed@jedbrown.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Manav Bhatia <<a href="mailto:bhatiamanav@gmail.com" class="">bhatiamanav@gmail.com</a>> writes:<br class=""><br class=""><blockquote type="cite" class="">I am experimenting with the threshold parameter. <br class=""><br class="">As described in the manual:  <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html</a> <<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html</a>><br class=""><br class=""><br class="">“ Conversely reducing the threshold increases the rate of coarsening (aggressive coarsening) and thereby reduces the complexity of the coarse grids, and generally results in slower solver converge rates."<br class=""><br class=""><br class="">I did some experimentation for my problem: <br class=""><br class="">1) -pc_mg_levels 3 -mg_levels_ksp_max_it 3 -pc_gamg_square_graph 1 -pc_gamg_threshold 0   : 22 KSP iterations, 39 seconds<br class="">2) -pc_mg_levels 3 -mg_levels_ksp_max_it 3 -pc_gamg_square_graph 1 -pc_gamg_threshold 0.5 : Did not converge in over 1000 KSP iterations<br class=""></blockquote><br class="">0.5 is enormous and likely results in "weird" aggregates.  Try 0.001 to<br class="">0.05 for example.  You can see the coarsening rate and grid complexity<br class="">in -ksp_view output.<br class=""><br class=""><blockquote type="cite" class="">According to the manual reducing the threshold value would result in slower convergence rates. However, I am observing opposite behavior. <br class=""><br class="">Is this problem specific? Or maybe I am misunderstanding something here. <br class=""><br class="">Also, I am assuming that the threshold refers to some parameter in the connectivity graph, which is independent of the entries in the matrix. So, the value of threshold is independent of the magnitudes of the entries in the matrix (?). <br class=""></blockquote><br class="">Yeah, the standard strength measure is<br class=""><br class="">  |a_{ij}| / sqrt(|a_{ii}| |a_{jj}|)<br class=""><br class=""><blockquote type="cite" class="">I would appreciate some guidance here. <br class=""><br class="">Regards,<br class="">Manav<br class=""><br class=""><blockquote type="cite" class="">On Oct 29, 2018, at 1:03 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" class="">jed@jedbrown.org</a>> wrote:<br class=""><br class="">Manav Bhatia <<a href="mailto:bhatiamanav@gmail.com" class="">bhatiamanav@gmail.com</a>> writes:<br class=""><br class=""><blockquote type="cite" class="">I also observed that the number of KSP iterations increases with an increase in the levels of AMG. Is this true, in general, for all/most applications? <br class=""></blockquote><br class="">Adding levels replaces a direct solve with a deeper V-cycle.  When MG is<br class="">behaving well, this makes little difference because the coarse<br class="">approximations are no worse than the approximations made in the first<br class="">coarsening (from fine level to first coarsened level).  But there are<br class="">many stubborn problems for which it does hurt, as you have seen.<br class=""></blockquote></blockquote></div></div></blockquote></div><br class=""></div></body></html>