On Fri, Apr 17, 2009 at 12:58 AM, Yongcheng Zhou <span dir="ltr">&lt;<a href="mailto:yongcheng.zhou@gmail.com">yongcheng.zhou@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi there,<br>
<br>
I am wondering what is the real tolerance for stopping the Krylov<br>
iteations. In solving my nonlinear problem I have to call<br>
KSP solvers multiple time.  my tolerance setting is<br>
   KSPSetTolerances(ksp,1.e-5,1.e-5,PETSC_DEFAULT,200);<br>
<br>
 After several calls I found that the linear solver does not do<br>
anything, as shown by the convergence history:<br>
<br>
 35 KSP preconditioned resid norm 8.570481231422e-05 true resid norm<br>
7.256019920381e+01 ||Ae||/||Ax|| 1.008233844002e-01<br>
 36 KSP preconditioned resid norm 5.210695852340e-06 true resid norm<br>
7.448290646301e+00 ||Ae||/||Ax|| 1.034950123066e-02<br>
  0 KSP preconditioned resid norm 5.210622961414e-06 true resid norm<br>
7.448436220158e+00 ||Ae||/||Ax|| 1.000000000000e+00<br>
  0 KSP preconditioned resid norm 5.210622961414e-06 true resid norm<br>
7.448436220158e+00 ||Ae||/||Ax|| 1.000000000000e+00<br>
  0 KSP preconditioned resid norm 5.210622961414e-06 true resid norm<br>
7.448436220158e+00 ||Ae||/||Ax|| 1.000000000000e+00<br>
<br>
where in the last three calls the KSP simply refused to do any<br>
interation. Is there any way I can force the KSP to check the<br>
convergence according to true resid or Ae/Ax  rather than the<br>
preconditoned resid?</blockquote><div><br>I am not sure waht you are asking. You can write any tolerance check you want<br>using KSPSetConvergenceTest().<br><br>   Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thanks!<br>
<br>
Rocky<br>
</blockquote></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>