As discussed in Section Preconditioning within KSP
, the Krylov space methods are
typically used in conjunction with a preconditioner.
To employ a particular preconditioning method, the user can either select
it from the options database using input of the form
-pc_type <methodname> or set the method with the
command
ierr = PCSetType(PC pc,PCType method);In Table 4 we summarize the basic preconditioning methods supported in PETSc. The PCSHELL preconditioner uses a specific, application-provided preconditioner. The direct preconditioner, PCLU, is, in fact, a direct solver for the linear system that uses LU factorization. PCLU is included as a preconditioner so that PETSc has a consistent interface among direct and iterative linear solvers.
Each preconditioner may have associated with it a set of options, which can be set with routines and options database commands provided for this purpose. Such routine names and commands are all of the form PC<TYPE>Option and -pc_<type>_option [value]. A complete list can be found by consulting the manual pages; we discuss just a few in the sections below.