Krylov Methods - KSP: : Examples

The Scalable Linear Equations Solvers (SLES) 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. SLES users can set various Krylov subspace options at runtime via the options database (e.g., -ksp_type cg ). SLES users can also set KSP options directly in application codes by first extracting the KSP context from the SLES context via SLESGetKSP() and then 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 KSPSetMonitor
KSPCGType KSPSetInitialGuessNonzero KSPType
Intermediate - Setting options for algorithms and data structures
KSPCGSetType KSPGMRESSetRestart KSPLGTrueMonitorCreate
KSPChebychevSetEigenvalues KSPGetConvergedReason KSPLGTrueMonitorDestroy
KSPClearMonitor KSPGetInitialGuessNonzero KSPRichardsonSetScale
KSPDefaultConverged KSPGetIterationNumber KSPSetPreconditionerSide
KSPDefaultMonitor KSPGetMonitorContext KSPSetTolerances
KSPFGMRESModifyPCNoChange KSPGetPreconditionerSide KSPSetType
KSPFGMRESModifyPCSLES KSPGetResidualNorm KSPSingularValueMonitor
KSPFGMRESSetModifyPC KSPGetTolerances KSPTrueMonitor
KSPGMRESKrylovMonitor KSPGetType KSPVecViewMonitor
KSPGMRESSetOrthogonalization KSPLGMonitorCreate
KSPGMRESSetPreAllocateVectors KSPLGMonitorDestroy
Advanced - Setting more advanced options and customization
KSPAppendOptionsPrefix KSPGetConvergenceContext KSPSetComputeResidual
KSPBuildResidual KSPGetOptionsPrefix KSPSetComputeSingularValues
KSPBuildSolution KSPGetResidualHistory KSPSetConvergenceTest
KSPComputeEigenvalues KSPRegisterAll KSPSetOptionsPrefix
KSPComputeEigenvaluesExplicitly KSPRegisterDestroy KSPSetResidualHistory
KSPComputeExplicitOperator KSPRegisterDynamic KSPSetUsePreconditionedResidual
KSPComputeExtremeSingularValues KSPSetAvoidNorms KSPSkipConverged
KSPGMRESSetHapTol KSPSetComputeEigenvalues KSPUnwindPreconditioner
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
KSPAddOptionsChecker KSPGetSolution KSPSetSolution
KSPCreate KSPInitialResidual KSPSetUp
KSPDestroy KSPSetFromOptions KSPSolve
KSPGetPC KSPSetPC KSPSolveTranspose
KSPGetRhs KSPSetRhs KSPView

Table of Contents