:orphan: # KSPSetConvergedNegativeCurvature Allows to declare convergence and return `KSP_CONVERGED_NEG_CURVE` when negative curvature is detected ## Synopsis ``` #include "petscksp.h" PetscErrorCode KSPSetConvergedNegativeCurvature(KSP ksp, PetscBool flg) ``` Collective ## Input Parameters - ***ksp -*** iterative context - ***flg -*** the Boolean value ## Options Database Key - ***-ksp_converged_neg_curve -*** Declare convergence if negative curvature is detected ## Notes This is currently used only by a subset of the Krylov solvers, namely `KSPCG`, `KSPSTCG`, `KSPQCG`, `KSPGLTR`, `KSPNASH`, and `KSPMINRES`. ## See Also [](ch_ksp), `KSP`, `KSPConvergedReason`, `KSPGetConvergedNegativeCurvature()` ## Level advanced ## Location src/ksp/ksp/interface/iterativ.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/interface/iterativ.c) [Index of all KSP routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)