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
KSPBCGS KSPDestroy KSPMINRES
KSPBCGSL KSPDGMRES KSPMonitorSet
KSPBICG KSP_DIVERGED_BREAKDOWN_BICG KSPNGMRES
KSPBROYDEN KSP_DIVERGED_BREAKDOWN KSPPREONLY
KSPCG KSP_DIVERGED_DTOL KSPReset
KSPCGNE KSP_DIVERGED_INDEFINITE_PC KSPRICHARDSON
KSPCGS KSP_DIVERGED_ITS KSPSetFromOptions
KSPCGType KSP_DIVERGED_NONSYMMETRIC KSPSetInitialGuessNonzero
KSPCHEBYCHEV KSPFGMRES KSPSetOperators
KSP_CONVERGED_ATOL KSPGCR KSPSolve
KSP_CONVERGED_ITERATING KSPGMRES KSPSYMMLQ
KSP_CONVERGED_ITS KSP KSPTCQMR
KSPConvergedReason KSPIBCGS KSPTFQMR
KSP_CONVERGED_RTOL KSPLCD KSPType
KSPCreate KSPLGMRES KSPView
KSPCR KSPLSQR
Intermediate - Setting options for algorithms and data structures
KSPBCGSLSetEll KSPGetOperators KSPMonitorLGTrueResidualNormCreate
KSPBCGSLSetPol KSPGetOperatorsSet KSPMonitorLGTrueResidualNormDestroy
KSPBCGSLSetXRes KSPGetPCSide KSPMonitorRange
KSPCGSetType KSPGetResidualNorm KSPMonitorSingularValue
KSPCGUseSingleReduction KSPGetTolerances KSPMonitorSolution
KSPChebychevSetEigenvalues KSPGetType KSPMonitorTrueResidualNorm
KSPChebychevSetEstimateEigenvalues KSPGMRESClassicalGramSchmidtOrthogonalization KSPPythonSetType
KSPDefaultConvergedCreate KSPGMRESGetCGSRefinementType KSPRichardsonSetScale
KSPDefaultConvergedDestroy KSPGMRESGetOrthogonalization KSPRichardsonSetSelfScale
KSPDefaultConverged KSPGMRESGetRestart KSPSetApplicationContext
KSPDefaultConvergedSetUIRNorm KSPGMRESModifiedGramSchmidtOrthogonalization KSPSetDiagonalScaleFix
KSPDefaultConvergedSetUMIRNorm KSPGMRESMonitorKrylov KSPSetDiagonalScale
KSPFGMRESModifyPCKSP KSPGMRESSetCGSRefinementType KSPSetDMActive
KSPFGMRESModifyPCNoChange KSPGMRESSetHapTol KSPSetDM
KSPFGMRESSetModifyPC KSPGMRESSetOrthogonalization KSPSetErrorIfNotConverged
KSPGCRSetModifyPC KSPGMRESSetPreAllocateVectors KSPSetPCSide
KSPGetApplicationContext KSPGMRESSetRestart KSPSetTolerances
KSPGetConvergedReason KSPLSQRDefaultConverged KSPSetType
KSPGetDiagonalScaleFix KSPLSQRMonitorDefault KSPSPECEST
KSPGetDiagonalScale KSPMonitorCancel MatCreateSchurComplement
KSPGetDM KSPMonitorDefault MatSchurComplementGetKSP
KSPGetErrorIfNotConverged KSPMonitorLGCreate MatSchurComplementGetSubmatrices
KSPGetInitialGuessNonzero KSPMonitorLGDestroy MatSchurComplementUpdate
KSPGetIterationNumber KSPMonitorLGRangeCreate
KSPGetMonitorContext KSPMonitorLGRangeDestroy
Advanced - Setting more advanced options and customization
KSPAppendOptionsPrefix KSPGLTRGetObjFcn KSPSetCheckNormIteration
KSPBuildResidual KSPGLTRSetRadius KSPSetComputeEigenvalues
KSPBuildSolution KSP_GMRES_CGS_REFINE_IFNEEDED KSPSetComputeSingularValues
KSPComputeEigenvaluesExplicitly KSPGMRESCGSRefinementType KSPSetConvergenceTest
KSPComputeEigenvalues KSP_GMRES_CGS_REFINE_NEVER KSPSetFischerGuess
KSPComputeExplicitOperator KSPNASHGetNormD KSPSetInitialGuessKnoll
KSPComputeExtremeSingularValues KSPNASHGetObjFcn KSPSetLagNorm
KSPFischerGuessCreate KSPNASHSetRadius KSPSetNormType
KSPGetComputeEigenvalues KSP_NORM_NATURAL KSPSetNullSpace
KSPGetComputeSingularValues KSP_NORM_NONE KSPSetOptionsPrefix
KSPGetConvergenceContext KSP_NORM_PRECONDITIONED KSPSetResidualHistory
KSPGetInitialGuessKnoll KSPNormType KSPSetUpOnBlocks
KSPGetNormType KSP_NORM_UNPRECONDITIONED KSPSetUseFischerGuess
KSPGetNullSpace KSPQCGGetQuadratic KSPSkipConverged
KSPGetOptionsPrefix KSPQCGGetTrialStepNorm KSPSTCGGetNormD
KSPGetResidualHistory KSPQCGSetTrustRegionRadius KSPSTCGGetObjFcn
KSPGetVecs KSPRegisterAll KSPSTCGSetRadius
KSPGLTRGetLambda KSPRegisterDestroy KSPUnwindPreconditioner
KSPGLTRGetMinEig KSPRegisterDynamic MatGetSchurComplement
KSPGLTRGetNormD KSPRegister
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
KSPFinalizePackage KSPInitializePackage KSPSetSupportedNorm
KSPGetFischerGuess KSPInitialResidual KSPSetUp
KSPGetPC KSPMonitor KSPSolveTranspose
KSPGetRhs KSPNASH KSPSTCG
KSPGetSolution KSPQCG PCFinalizePackage
KSPGLTR KSPSetPC PCInitializePackage
No deprecated routines

Table of Contents