Run with -ksp_view -ksp_monitor -info and send us all the output.<br><br> Matt<br><br><div class="gmail_quote">On Mon, Dec 14, 2009 at 8:36 AM, <span dir="ltr"><<a href="mailto:jarunan@ascomp.ch">jarunan@ascomp.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Dear Petsc Team,<br>
<br>
There is something not clear for me about divergence tolerance. Firstly, my computation diverges with the reason of dtol (-4), which was set by default (10000). When I increased dtol to 1.0e+8, it became converged. However, the relative residual where it was diverged is less than the default dtol. I would like to know, how it is exactly calculated.<br>
<br>
----------I describe my problem more in detail here.-------------------<br>
As I set the tolerances for the solver as below, my problem diverges with converged reason -4 (from divergence tolerance)<br>
<br>
call KSPSetTolerances(ksp,1.0e-06,1.0e-20, PETSC_DEFAULT_DOUBLE_PRECISION,10000,ierr)<br>
<br>
I monitor the residual. it printed the information below and quit the computation.(I delete the true residual norm and Ax/Ae. Please tell me if you need them.)<br>
<br>
0 KSP preconditioned resid norm 5.139790011051e+02<br>
<br>
With -ksp_view, it shows that default value of dtol is 10000. I increased dtol to 1.0e+8, then the solver solved the problem. With -ksp_monitor_true_residual, the first 5 iterations read:<br>
<br>
0 KSP preconditioned resid norm 5.139790011051e+02<br>
1 KSP preconditioned resid norm 1.840751662590e+01<br>
2 KSP preconditioned resid norm 3.653339750400e+00<br>
3 KSP preconditioned resid norm 2.538794826933e+00<br>
4 KSP preconditioned resid norm 2.299844715275e-01<br>
<br>
Here, from iteration 0 to iteration 1,the relative residual is 0.03580, much less than 1.0e+4 the default dtol value. So, why was it diverged at the first time?<br>
----------------------------------------------------------------------------<br>
<br>
Regards,<br>
Jarunan<br>
<br>
<br>
<br>
<br>
-- <br>
Jarunan Panyasantisuk<br>
Development Engineer<br>
ASCOMP GmbH, Technoparkstr. 1<br>
CH-8005 Zurich, Switzerland<br>
Phone : +41 44 445 4072<br>
Fax : +41 44 445 4075<br>
E-mail: <a href="mailto:jarunan@ascomp.ch" target="_blank">jarunan@ascomp.ch</a><br>
<a href="http://www.ascomp.ch" target="_blank">www.ascomp.ch</a><br>
</blockquote></div><br><br clear="all"><br>-- <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>