[petsc-users] rtol meaning
Barry Smith
bsmith at mcs.anl.gov
Thu May 29 15:03:37 CDT 2014
Danny,
The manual pages are a little sloppy and inconsistent. By default it uses ||b|| or || preconditioned b|| as the starting point. At the bottom of the badly formatted page you’ll see "- - rnorm_0 is the two norm of the right hand side. When initial guess is non-zero you can call KSPDefaultConvergedSetUIRNorm() to use the norm of (b - A*(initial guess)) as the starting point for relative norm convergence testing."
Likely you want to call KSPDefaultConvergedSetUIRNorm if that is how you want to detect convergence.
We’ll cleanup the manual pages, thanks for pointing out the confusion.
Barry
You can see the source code at http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/interface/iterativ.c.html#KSPDefaultConverged and confirm that what Matt said is correct.
On May 29, 2014, at 2:49 PM, Danny Lathouwers - TNW <D.Lathouwers at tudelft.nl> wrote:
> Thanks Matt for your quick response.
>
> I got to believe that it was the relative ratio of the residual from the following petsc links:
>
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetTolerances.html
> and
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPDefaultConverged.html#KSPDefaultConverged
>
> Perhaps these pages are outdated?
>
> Cheers,
> Danny.
More information about the petsc-users
mailing list