PETSc version 3.17.0
Fix/Edit manual page

# KSPCheckSolve

Checks if the PCSetUp() or KSPSolve() failed and set the error flag for the outer PC. A KSP_DIVERGED_ITS is not considered a failure in this context

### Synopsis

    #include "petscksp.h"
    PetscErrorCode KSPCheckSolve(KSP ksp,PC pc,Vec vec)

Collective on ksp

### Input Parameters

| ksp | - the linear solver (KSP) context.
| pc | - the preconditioner context
| vec | - a vector that will be initialized with Inf to indicate lack of convergence

Notes: this may be called by a subset of the processes in the PC

Developer Note: this is used to manage returning from preconditioners whose inner KSP solvers have failed in some way

### See Also

KSPCreate(), KSPSetType(), KSP, KSPCheckNorm(), KSPCheckDot()

### Level

developer

### Location

src/ksp/ksp/interface/iterativ.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages