#include "petscksp.h" PetscErrorCode KSPConvergedDefault(KSP ksp,PetscInt n,PetscReal rnorm,KSPConvergedReason *reason,void *ctx)Collective on KSP Many br
ksp | - iterative context Many br | |
n | - iteration number Many br | |
rnorm | - residual norm (may be estimated, depending on the method may be the preconditioned residual norm) Many br | |
ctx | - convergence context which must be created by KSPConvergedDefaultCreate() Many br |
positive | - if the iteration has converged; Many br | |
negative | - if residual norm exceeds divergence threshold; Many br | |
0 | - otherwise. Many br |
rtol = relative tolerance, | - . abstol = absolute tolerance. Many br | |
dtol = divergence tolerance, | - - rnorm_0 is the two norm of the right hand side. When initial guess is non-zero you Many brcan call KSPConvergedDefaultSetUIRNorm() to use the norm of (b - A*(initial guess)) Many bras the starting point for relative norm convergence testing, that is as rnorm_0 Many br |