PCLU#
Uses a direct solver, based on LU factorization, as a preconditioner
Options Database Keys#
-pc_factor_reuse_ordering (true|false) - Activate
PCFactorSetReuseOrdering()-pc_factor_mat_solver_type type - Activates
PCFactorSetMatSolverType()to choose the direct solver, seeMatSolverType-pc_factor_reuse_fill (true|false) - Activates
PCFactorSetReuseFill()-pc_factor_fill fill - Sets fill amount
-pc_factor_in_place (true|false) - Activates in-place factorization
-pc_factor_mat_ordering_type ordering - Sets ordering routine, see
MatOrderingType-pc_factor_pivot_in_blocks (true|false) - allow pivoting within the small blocks during factorization (may increase stability of factorization.
-pc_factor_shift_type shifttype - Sets shift type, see
MatFactorShiftType-pc_factor_shift_amount shiftamount - Sets shift amount or -1 for the default
-pc_factor_nonzeros_along_diagonal (true|false) - permutes the rows and columns to try to put nonzero value along the diagonal.
-pc_factor_mat_solver_type packagename - use an external package for the solve, see
MatSolverTypefor possibilities-mat_solvertype_optionname - options for a specific solver package, for example
-mat_mumps_cntl_1
Notes#
Not all options work for all matrix formats
Run with -help to see additional options for particular matrix formats or factorization algorithms
The Cholesky factorization direct solver, PCCHOLESKY will be more efficient than PCLU for symmetric positive-definite (SPD) matrices
Usually this will compute an “exact” solution in one iteration and does
not need a Krylov method (i.e. you can use -ksp_type preonly, or
KSPSetType(ksp,KSPPREONLY) for the Krylov method.
The options prefix of the factored matrix is set to be the same as the PC options prefix, see MatSetOptionsPrefixFactor()
See Also#
KSP: Linear System Solvers, PCCreate(), PCSetType(), PCType, PC, MatSolverType, MatGetFactor(), PCQR, PCSVD,
PCILU, PCCHOLESKY, PCICC, PCFactorSetReuseOrdering(), PCFactorSetReuseFill(), PCFactorGetMatrix(),
PCFactorSetFill(), PCFactorSetUseInPlace(), PCFactorSetMatOrderingType(), PCFactorSetColumnPivot(),
PCFactorSetPivotInBlocks(), PCFactorSetShiftType(), PCFactorSetShiftAmount(),
PCFactorReorderForNonzeroDiagonal()
Level#
beginner
Location#
Examples#
src/ksp/ksp/tutorials/ex53.c
src/ksp/ksp/tutorials/ex13f90.F90
src/ksp/ksp/tutorials/ex77f.F90
src/snes/tutorials/ex31.c
src/ksp/ksp/tutorials/ex61f.F90
src/ksp/ksp/tutorials/ex52f.F90
src/ksp/ksp/tutorials/ex69.c
src/ksp/ksp/tutorials/ex83f.F90
src/ksp/ksp/tutorials/ex13.c
src/ksp/ksp/tutorials/ex77.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages