#include "petscksp.h" int KSPSetConvergenceTest(KSP ksp,int (*converge)(KSP,int,PetscReal,KSPConvergedReason*,void*),void *cctx)Collective on KSP
ksp | - iterative context obtained from KSPCreate() | |
converge | - pointer to int function | |
cctx | - context for private data for the convergence routine (may be null) |
converge (KSP ksp, int it, PetscReal rnorm, KSPConvergedReason *reason,void *mctx)
ksp | - iterative context obtained from KSPCreate() | |
it | - iteration number | |
rnorm | - (estimated) 2-norm of (preconditioned) residual | |
reason | - the reason why it has converged or diverged | |
cctx | - optional convergence context, as set by KSPSetConvergenceTest() |
The default convergence test, KSPDefaultConverged(), aborts if the residual grows to more than 10000 times the initial residual.
The default is a combination of relative and absolute tolerances. The residual value that is tested may be an approximation; routines that need exact values should compute them.
Level:advanced
Location:src/sles/ksp/interface/itfunc.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages