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