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 KSPGMRES KSPSolve
KSPBCGS KSPGetConvergedReason KSPType
KSPBCGSL KSPLGMRES KSPView
KSPBICG KSPLSQR KSP_CONVERGED_ATOL
KSPCG KSPMINRES KSP_CONVERGED_ITERATING
KSPCGNE KSPMonitorSet KSP_CONVERGED_ITS
KSPCGS KSPPREONLY KSP_CONVERGED_RTOL
KSPCGType KSPRICHARDSON KSP_DIVERGED_BREAKDOWN
KSPCHEBYCHEV KSPRTCQMR KSP_DIVERGED_BREAKDOWN_BICG
KSPCR KSPRTFQMR KSP_DIVERGED_DTOL
KSPConvergedReason KSPSYMMLQ KSP_DIVERGED_INDEFINITE_PC
KSPCreate KSPSetFromOptions KSP_DIVERGED_ITS
KSPDestroy KSPSetInitialGuessNonzero KSP_DIVERGED_NONSYMMETRIC
KSPFGMRES KSPSetOperators
Intermediate - Setting options for algorithms and data structures
KSPBCGSLSetEll KSPGMRESSetHapTol KSPMonitorCancel
KSPBCGSLSetPol KSPGMRESSetOrthogonalization KSPMonitorDefault
KSPBCGSLSetXRes KSPGMRESSetPreAllocateVectors KSPMonitorLGCreate
KSPCGSetType KSPGMRESSetRestart KSPMonitorLGDestroy
KSPChebychevSetEigenvalues KSPGetDiagonalScale KSPMonitorLGTrueResidualNormCreate
KSPDefaultConverged KSPGetDiagonalScaleFix KSPMonitorLGTrueResidualNormDestroy
KSPDefaultConvergedSetUIRNorm KSPGetInitialGuessNonzero KSPMonitorSingularValue
KSPDefaultConvergedSetUMIRNorm KSPGetIterationNumber KSPMonitorSolution
KSPFGMRESModifyPCKSP KSPGetMonitorContext KSPMonitorTrueResidualNorm
KSPFGMRESModifyPCNoChange KSPGetOperators KSPRichardsonSetScale
KSPFGMRESSetModifyPC KSPGetOperatorsSet KSPSetDiagonalScale
KSPGMRESClassicalGramSchmidtOrthogonalization KSPGetPreconditionerSide KSPSetDiagonalScaleFix
KSPGMRESModifiedGramSchmidtOrthogonalization KSPGetResidualNorm KSPSetPreconditionerSide
KSPGMRESMonitorKrylov KSPGetTolerances KSPSetTolerances
KSPGMRESSetCGSRefinementType KSPGetType KSPSetType
Advanced - Setting more advanced options and customization
KSPAppendOptionsPrefix KSPGetVecs KSPSetNormType
KSPBuildResidual KSPNormType KSPSetNullSpace
KSPBuildSolution KSPQCGGetQuadratic KSPSetOptionsPrefix
KSPComputeEigenvalues KSPQCGGetTrialStepNorm KSPSetResidualHistory
KSPComputeEigenvaluesExplicitly KSPQCGSetTrustRegionRadius KSPSetUpOnBlocks
KSPComputeExplicitOperator KSPRegister KSPSkipConverged
KSPComputeExtremeSingularValues KSPRegisterAll KSPUnwindPreconditioner
KSPGMRESCGSRefinementType KSPRegisterDestroy KSP_GMRES_CGS_REFINE_IFNEEDED
KSPGetComputeEigenvalues KSPRegisterDynamic KSP_GMRES_CGS_REFINE_NEVER
KSPGetComputeSingularValues KSPSTCGGetNormD KSP_NATURAL_NORM
KSPGetConvergenceContext KSPSTCGSetRadius KSP_NO_NORM
KSPGetInitialGuessKnoll KSPSetComputeEigenvalues KSP_PRECONDITIONED_NORM
KSPGetNullSpace KSPSetComputeSingularValues KSP_UNPRECONDITIONED_NORM
KSPGetOptionsPrefix KSPSetConvergenceTest
KSPGetResidualHistory KSPSetInitialGuessKnoll
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
KSPAddOptionsChecker KSPInitialResidual KSPSetPC
KSPGetPC KSPInitializePackage KSPSetUp
KSPGetRhs KSPQCG KSPSolveTranspose
KSPGetSolution KSPSTCG PCInitializePackage
No deprecated routines

Table of Contents