# KSP#

Abstract PETSc object that manages all Krylov methods. This is the object that manages the linear solves in PETSc (even those such as direct solvers that do no use Krylov accelerators).

## Synopsis#

typedef struct _p_KSP *KSP;


## Note#

When a direct solver is used, but no Krylov solver is used, the KSP object is still used but with a KSPType of KSPPREONLY, meaning that only application of the preconditioner is used as the linear solver.

KSPCreate(), KSPSetType(), KSPType, SNES, TS, PC, KSP, KSPDestroy(), KSPCG, KSPGMRES

beginner

## Location#

include/petscksp.h

Edit on GitLab