[petsc-users] Question on PETSc solver iteration and convergence

Matthew Knepley knepley at gmail.com
Mon Jan 27 16:39:34 CST 2014


On Mon, Jan 27, 2014 at 4:27 PM, Danyang Su <danyang.su at gmail.com> wrote:

> Hi All,
>
> I implement KSP solver in a Newton iteration. The convergence parameters
> are: rtol 1.0E-8, abstol 1.0E-50, dtol 1.0E5, maxits 1000.
>

These tolerances use the preconditioned residual norm. You can sue the true
residual norm for some solver types:


http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/KSP/KSPSetNormType.html

     Matt


> Does the following convergence monitoring make sense? I thought the solver
> should stop before iteration 36, but it stops at iteration 70.
>
>   0 KSP preconditioned resid norm 4.208619583781e-002 true resid norm
> 2.227983625699e-005 ||r(i)||/||b|| 1.000000000000e+000
>   1 KSP preconditioned resid norm 6.403275610900e-003 true resid norm
> 2.795175726580e-007 ||r(i)||/||b|| 1.254576422528e-002
>   2 KSP preconditioned resid norm 7.416300263102e-004 true resid norm
> 3.382118379502e-010 ||r(i)||/||b|| 1.518017610404e-005
>   3 KSP preconditioned resid norm 6.144409100696e-005 true resid norm
> 1.260466100377e-009 ||r(i)||/||b|| 5.657429820568e-005
>   4 KSP preconditioned resid norm 4.990158094666e-005 true resid norm
> 3.632496726225e-008 ||r(i)||/||b|| 1.630396509349e-003
>   5 KSP preconditioned resid norm 2.743769015994e-005 true resid norm
> 1.101666758939e-009 ||r(i)||/||b|| 4.944680680017e-005
>   6 KSP preconditioned resid norm 4.269805798759e-006 true resid norm
> 7.915494521121e-011 ||r(i)||/||b|| 3.552761532813e-006
>   7 KSP preconditioned resid norm 1.632413041808e-006 true resid norm
> 1.163794439302e-009 ||r(i)||/||b|| 5.223532282187e-005
>   8 KSP preconditioned resid norm 8.010590587547e-007 true resid norm
> 1.246839309256e-011 ||r(i)||/||b|| 5.596267831030e-007
>   9 KSP preconditioned resid norm 4.794695759395e-007 true resid norm
> 3.155943984006e-012 ||r(i)||/||b|| 1.416502324166e-007
>  10 KSP preconditioned resid norm 4.500033799628e-007 true resid norm
> 4.554787575528e-011 ||r(i)||/||b|| 2.044354151884e-006
> ...
>  36 KSP preconditioned resid norm 2.752424650444e-009 true resid norm
> 2.990835953592e-016 ||r(i)||/||b|| 1.342395841286e-011
> ...
>  51 KSP preconditioned resid norm 5.761764412500e-010 true resid norm
> 2.557370618510e-016 ||r(i)||/||b|| 1.147840849911e-011
> ...
>  69 KSP preconditioned resid norm 4.324655127362e-010 true resid norm
> 1.982933485715e-014 ||r(i)||/||b|| 8.900125938281e-010
>  70 KSP preconditioned resid norm 3.923752626311e-010 true resid norm
> 1.065002491928e-015 ||r(i)||/||b|| 4.780118128535e-011
>
> Thanks,
>
> Danyang
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140127/c190eada/attachment.html>


More information about the petsc-users mailing list