Krylov Methods - KSP: : Examples

The Scalable Linear Equations Solvers (KSP) component provides an easy-to-use interface to the combination of a Krylov subspace iterative method and a preconditioner (in the KSP and PC components, respectively) or a sequential direct solver. KSP users can set various Krylov subspace options at runtime via the options database (e.g., -ksp_type cg ). KSP users can also set KSP options directly in application by directly calling the KSP routines listed below (e.g., KSPSetType() ). KSP components can be used directly to create and destroy solvers; this is not needed for users but is intended for library developers.

Beginner - Basic usage
KSP KSPConvergedReason KSPSetInitialGuessNonzero
KSPCG KSPFGMRES KSPSetMonitor
KSPCGNE KSPGMRES KSPSetOperators
KSPCGType KSPLGMRES KSPSolve
KSPCHEBYCHEV KSPRICHARDSON KSPType
Intermediate - Setting options for algorithms and data structures
KSPCGSetType KSPGMRESSetRestart KSPLGTrueMonitorCreate
KSPChebychevSetEigenvalues KSPGetConvergedReason KSPLGTrueMonitorDestroy
KSPClearMonitor KSPGetDiagonalScale KSPRichardsonSetScale
KSPDefaultConverged KSPGetDiagonalScaleFix KSPSetDiagonalScale
KSPDefaultMonitor KSPGetInitialGuessNonzero KSPSetDiagonalScaleFix
KSPFGMRESModifyPCKSP KSPGetIterationNumber KSPSetPreconditionerSide
KSPFGMRESModifyPCNoChange KSPGetMonitorContext KSPSetTolerances
KSPFGMRESSetModifyPC KSPGetPreconditionerSide KSPSetType
KSPGMRESKrylovMonitor KSPGetResidualNorm KSPSingularValueMonitor
KSPGMRESSetCGSRefinementType KSPGetTolerances KSPTrueMonitor
KSPGMRESSetHapTol KSPGetType KSPVecViewMonitor
KSPGMRESSetOrthogonalization KSPLGMonitorCreate
KSPGMRESSetPreAllocateVectors KSPLGMonitorDestroy
Advanced - Setting more advanced options and customization
DMMGCreate KSPComputeEigenvaluesExplicitly KSPRegisterDynamic
DMMGDestroy KSPComputeExplicitOperator KSPSetComputeEigenvalues
DMMGSetDM KSPComputeExtremeSingularValues KSPSetComputeSingularValues
DMMGSetKSP KSPGMRESCGSRefinementType KSPSetConvergenceTest
DMMGSetUp KSPGetConvergenceContext KSPSetInitialGuessKnoll
DMMGSetUseGalerkinCoarse KSPGetInitialGuessKnoll KSPSetNormType
DMMGSolve KSPGetOptionsPrefix KSPSetOptionsPrefix
DMMGView KSPGetResidualHistory KSPSetResidualHistory
KSPAppendOptionsPrefix KSPNormType KSPSetUpOnBlocks
KSPBuildResidual KSPRegister KSPSkipConverged
KSPBuildSolution KSPRegisterAll KSPUnwindPreconditioner
KSPComputeEigenvalues KSPRegisterDestroy
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
KSPAddOptionsChecker KSPInitialResidual KSPSetUp
KSPCreate KSPInitializePackage KSPSolveTranspose
KSPDestroy KSPSetFromOptions KSPView
KSPGetPC KSPSetPC PCInitializePackage
KSPGetRhs KSPSetRhs
KSPGetSolution KSPSetSolution

Table of Contents