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

Table of Contents