#include "petscksp.h" int KSPDefaultConverged(KSP ksp,int n,PetscReal rnorm,KSPConvergedReason *reason,void *dummy)Collective on KSP
ksp | - iterative context | |
n | - iteration number | |
rnorm | - 2-norm residual value (may be estimated) | |
dummy | - unused convergence context |
1 | - if the iteration has converged; | |
-1 | - if residual norm exceeds divergence threshold; | |
0 | - otherwise. |
rnorm < MAX (rtol * rnorm_0, atol);Divergence is detected if
rnorm > dtol * rnorm_0,
where
Use KSPSetTolerances() to alter the defaults for rtol, atol, dtol.
Level:intermediate
Location:src/sles/ksp/interface/iterativ.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages
rtol = relative tolerance, | - . atol = absolute tolerance. | |
dtol = divergence tolerance, | - - rnorm_0 = initial residual norm |