<div dir="ltr"><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-08-16 10:39 GMT-05:00 Mark Adams <span dir="ltr"><<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>></span>:</div><div class="gmail_quote"><br></div><div class="gmail_quote">Hi Mark,</div><div class="gmail_quote"><br></div><div class="gmail_quote"><span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline">The problem I am running is simply 2-D linear elasticity, and I use petsc's ex49 of KSP to do benchmark.</span><span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline"> </span><br></div><div class="gmail_quote"><span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline"><br></span></div><div class="gmail_quote">I have solved the error by using MatZeroRowsColumns(diagonal =1.0) to apply BC instead of MatZeroRows.</div><div class="gmail_quote">(My code is actually using newton's method to solve nonlinear problem(Now, use it to run a linear elasticity problem), and the rhs entries for Dirichlet BC is just zero, so either zerorowscolumns or zerorows gives the same solution). </div><div class="gmail_quote"><br></div><div class="gmail_quote">With GMRES and gamg, the 120K degrees of freedoms linear elasticity problem converges in 7 iterations. </div><div class="gmail_quote">But with " -ksp_type chebyshev -ksp_chebyshev_esteig_noisy" I still get NAN residual that comes out of nowhere (it is not diverging. all of a sudden NAN shows up)</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">* Is your matrix symmetric?</div></blockquote><div> </div><div>Yes, If I do matzerorowscolumns</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>* I see you said: "> Then I use CG for KSP and algebraic multigrid for precondiitoner. For a 150K dofs problem, the linear solver converges with 200s iteration(still too much I think)"</div><div><br></div><div>Is this with fracture? A simple cube elasticity test would be the best place to start. Can we get back to this?</div><div><br></div><div><br></div><div><div class="gmail_quote"><span class="gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Does '-ksp_type cg -pc_type jacobi' work?</div></blockquote><div> </div><div> Yes. and the ksp monitor shows the same output if I ran the same problem with petsc's example. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Does '-ksp_type chebyshev <span style="font-size:14px">-ksp_chebyshev_<wbr>esteig_</span><span style="font-size:14px">noisy and -pc_type jacobi</span>' work?</div></div></blockquote><div><br></div><div> No. I get a NAN residual after 1000s iteration.</div></div></div></div></blockquote><div><br></div></span><div>Well this is strange. I think that "noisy" must give you a lower eigen estimate. If your eigen estimate is too low Cheby is not stable. Does this 1000 iterations diverge or does the Nan come out of nowhere?<br></div><div><br></div><div>You can check the eigen estimate with '<span style="font-size:14px">-ksp_chebyshev_estei</span><span style="font-size:14px">g_ksp_<wbr>view' (I think). This will print out solver info including these </span>eigen estimate. Set '<span style="font-size:14px">-ksp_chebyshev_estei</span><span style="font-size:14px">g_ksp_<wbr>max_it 10' to get the solve to complete and get the ksp_view printout. You can read this. I have to think that this estimate is lower with "noisy".</span></div><div><br></div></div></div></div>
</blockquote></div><br></div></div>