# PCKSP

Defines a preconditioner that can consist of any KSP solver. This allows, for example, embedding a Krylov method inside a preconditioner.

### Options Database Key

-pc_ksp_true -use the matrix that defines the linear system as the matrix for the inner solver, otherwise by default it uses the matrix used to construct the preconditioner (see PCSetOperators())

Notes: Using a Krylov method inside another Krylov method can be dangerous (you get divergence or the incorrect answer) unless you use KSPFGMRES as the other Krylov method

### See Also

PCCreate(), PCSetType(), PCType (for list of available types), PC,
PCSHELL, PCCOMPOSITE, PCKSPUseTrue(), PCKSPGetKSP()

Level:intermediate
Location: src/ksp/pc/impls/ksp/pcksp.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages