petsc-3.7.1 2016-05-15
Report Typos and Errors

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_use_amat -use the matrix that defines the linear system, Amat as the matrix for the Many brinner solver, otherwise by default it uses the matrix used to construct Many brthe preconditioner, Pmat (see PCSetOperators()) Many br

Many br

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

Developer Notes: If the outer Krylov method has a nonzero initial guess it will compute a new residual based on that initial guess Many brand pass that as the right hand side into this KSP (and hence this KSP will always have a zero initial guess). For all outer Krylov methods Many brexcept Richardson this is neccessary since Krylov methods, even the flexible ones, need to "see" the result of the action of the preconditioner on the Many brinput (current residual) vector, the action of the preconditioner cannot depend also on some other vector (the "initial guess"). For Many brKSPRICHARDSON it is possible to provide a PCApplyRichardson_PCKSP() that short circuits returning to the KSP object at each iteration to compute the Many brresidual, see for example PCApplyRichardson_SOR(). We do not implement a PCApplyRichardson_PCKSP() because (1) using a KSP directly inside a Richardson Many bris not an efficient algorithm anyways and (2) implementing it for its > 1 would essentially require that we implement Richardson (reimplementing the Many brRichardson code) inside the PCApplyRichardson_PCKSP() leading to duplicate code. Many br

See Also

PCCreate(), PCSetType(), PCType (for list of available types), PC,
PCSHELL, PCCOMPOSITE, PCSetUseAmat(), PCKSPGetKSP() Many br

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