[petsc-users] Number of Iteration of KSP and relative tolerance
Matthew Knepley
knepley at gmail.com
Wed Aug 31 10:45:26 CDT 2016
On Wed, Aug 31, 2016 at 10:32 AM, Ivano Barletta <ibarletta at inogs.it> wrote:
> Dear Petsc Users
>
> I'm using Petsc to solve an elliptic equation
>
> The code can be run in parallel but I'm running
> some tests in sequential by the moment
>
> When I look at the output, what it looks odd to
> me is that the relative tolerance that I set is
> not fulfilled.
> I've set -ksp_rtol 1e-8 in my runtime options
> but the solver stops when the ratio
> || r || / || b || is still 9e-8, then almost
> one order of magnitude greater of the rtol
> that I set (as you can see in the txt in attachment).
>
> My question is, isn't the solver supposed to
> make other few iterations to reach the relative tolerance?
>
Here is the code:
https://bitbucket.org/petsc/petsc/src/a4f377b2def412a6138fd768d05e3a45fdbb68fb/src/ksp/ksp/interface/iterativ.c?at=master&fileviewer=file-view-default#iterativ.c-725
If you have a zero initial guess, we do not use ||b||, but ||r0||. In this
case,
the ratio
||r_75|| / ||r_0|| < 1.0e-8
when using preconditioned residuals.
Thanks,
Matt
> Thanks in advance for replies and suggestions
> Kind Regards
> Ivano
>
> P.S. my runtime options are these:
> -ksp_monitor_true_residual -ksp_type cg -ksp_converged_reason -ksp_view
> -ksp_rtol 1e-8
>
>
--
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/20160831/1c7ef9fe/attachment.html>
More information about the petsc-users
mailing list