#include "petscksp.h" PetscErrorCode KSPSetTolerances(KSP ksp,PetscReal rtol,PetscReal abstol,PetscReal dtol,PetscInt maxits)Logically Collective on KSP
ksp | - the Krylov subspace context | |
rtol | - the relative convergence tolerance, relative decrease in the (possibly preconditioned) residual norm | |
abstol | - the absolute convergence tolerance absolute size of the (possibly preconditioned) residual norm | |
dtol | - the divergence tolerance, amount (possibly preconditioned) residual norm can increase before KSPConvergedDefault() concludes that the method is diverging | |
maxits | - maximum number of iterations to use |
-ksp_atol <abstol> | - Sets abstol | |
-ksp_rtol <rtol> | - Sets rtol | |
-ksp_divtol <dtol> | - Sets dtol | |
-ksp_max_it <maxits> | - Sets maxits |
See KSPConvergedDefault() for details how these parameters are used in the default convergence test. See also KSPSetConvergenceTest() for setting user-defined stopping criteria.