#include "petscksp.h" #include "petscmat.h" PetscErrorCode KSPSetErrorIfNotConverged(KSP ksp,PetscBool flg)Logically Collective on ksp
ksp | - iterative context obtained from KSPCreate() | |
flg | - PETSC_TRUE indicates you want the error generated |
-ksp_error_if_not_converged <true,false> | - generate an error and stop the program |
A KSP_DIVERGED_ITS will not generate an error in a KSPSolve() inside a nested linear solver