petsc-3.3-p7 2013-05-11

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

Developer Notes: PCApply_KSP() uses the flag set by PCSetInitialGuessNonzero(), I think this is totally wrong, because it is then not using this inner KSP as a preconditioner (that is a linear operator applied to some vector), it is actually just using the inner KSP just like the outer KSP.

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