petsc-master 2020-09-18
Report Typos and Errors

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 KSPSetComputeRHS
KSPAGMRES KSPGMRES KSPSetFromOptions
KSPBCGS KSPGuess KSPSetInitialGuessNonzero
KSPBCGSL KSPGuessCreate KSPSetOperators
KSPBICG KSPGuessDestroy KSPSolve
KSPCG KSPGuessType KSPTCQMR
KSPCGLS KSPIBCGS KSPTFQMR
KSPCGNE KSPLCD KSPType
KSPCGS KSPLGMRES KSPView
KSPCGType KSPLSQR KSP_CONVERGED_ATOL
KSPCHEBYSHEV KSPMINRES KSP_CONVERGED_ITERATING
KSPCR KSPMonitorSet KSP_CONVERGED_ITS
KSPConvergedReason KSPPGMRES KSP_CONVERGED_RTOL
KSPConvergedReasonView KSPPREONLY KSP_DIVERGED_BREAKDOWN
KSPCreate KSPRICHARDSON KSP_DIVERGED_BREAKDOWN_BICG
KSPDGMRES KSPReset KSP_DIVERGED_DTOL
KSPDestroy KSPResetFromOptions KSP_DIVERGED_INDEFINITE_PC
KSPFBCGS KSPResetViewers KSP_DIVERGED_ITS
KSPFBCGSR KSPSYMMLQ KSP_DIVERGED_NONSYMMETRIC
KSPFCG KSPSetComputeInitialGuess KSP_DIVERGED_PC_FAILED
KSPFGMRES KSPSetComputeOperators MatLMVMSetHistorySize
Intermediate - Setting options for algorithms and data structures
DMProjectField KSPGetOperatorsSet KSPPIPEGCR
KSPBCGSLSetEll KSPGetPCSide KSPPIPEGCRGetMmax
KSPBCGSLSetPol KSPGetResidualNorm KSPPIPEGCRGetTruncationType
KSPBCGSLSetUsePseudoinverse KSPGetReusePreconditioner KSPPIPEGCRGetUnrollW
KSPBCGSLSetXRes KSPGetTolerances KSPPIPEGCRSetMmax
KSPCGSetType KSPGetTotalIterations KSPPIPEGCRSetModifyPC
KSPCGUseSingleReduction KSPGetType KSPPIPEGCRSetTruncationType
KSPChebyshevEstEigGetKSP KSPGuessFormGuess KSPPIPEGCRSetUnrollW
KSPChebyshevEstEigSet KSPGuessGetType KSPPIPEPRCG
KSPChebyshevEstEigSetUseNoisy KSPGuessSetFromOptions KSPPythonSetType
KSPChebyshevSetEigenvalues KSPGuessSetType KSPRichardsonSetScale
KSPConvergedDefault KSPGuessSetUp KSPRichardsonSetSelfScale
KSPConvergedDefaultCreate KSPGuessUpdate KSPSetApplicationContext
KSPConvergedDefaultDestroy KSPGuessView KSPSetDM
KSPConvergedDefaultSetConvergedMaxits KSPHPDDM KSPSetDMActive
KSPConvergedDefaultSetUIRNorm KSPHPDDMGetDeflationSpace KSPSetDiagonalScale
KSPConvergedDefaultSetUMIRNorm KSPHPDDMGetType KSPSetDiagonalScaleFix
KSPConvergedReasonViewFromOptions KSPHPDDMSetDeflationSpace KSPSetErrorIfNotConverged
KSPFCDTruncationType KSPHPDDMSetType KSPSetPCSide
KSPFCGGetMmax KSPHPDDMType KSPSetReusePreconditioner
KSPFCGGetTruncationType KSPLSQRConvergedDefault KSPSetSkipPCSetFromOptions
KSPFCGSetMmax KSPLSQRGetNorms KSPSetTolerances
KSPFCGSetTruncationType KSPLSQRGetStandardErrorVec KSPSetType
KSPFGMRESModifyPCKSP KSPLSQRMonitorDefault KSPViewFromOptions
KSPFGMRESModifyPCNoChange KSPLSQRSetComputeStandardErrorVec MatCreateLMVMBFGS
KSPFGMRESSetModifyPC KSPLSQRSetExactMatNorm MatCreateLMVMBadBroyden
KSPGCRSetModifyPC KSPLoad MatCreateLMVMBroyden
KSPGMRESClassicalGramSchmidtOrthogonalization KSPMatSolve MatCreateLMVMDFP
KSPGMRESGetCGSRefinementType KSPMonitorCancel MatCreateLMVMDiagBroyden
KSPGMRESGetOrthogonalization KSPMonitorDefault MatCreateLMVMSR1
KSPGMRESGetRestart KSPMonitorLGResidualNormCreate MatCreateLMVMSymBadBroyden
KSPGMRESModifiedGramSchmidtOrthogonalization KSPMonitorLGTrueResidualNormCreate MatCreateLMVMSymBroyden
KSPGMRESMonitorKrylov KSPMonitorRange MatCreateSchurComplement
KSPGMRESSetCGSRefinementType KSPMonitorSingularValue MatLMVMAllocate
KSPGMRESSetHapTol KSPMonitorSolution MatLMVMGetRejectCount
KSPGMRESSetOrthogonalization KSPMonitorTrueResidualMaxNorm MatLMVMGetUpdateCount
KSPGMRESSetPreAllocateVectors KSPMonitorTrueResidualNorm MatLMVMIsAllocated
KSPGMRESSetRestart KSPPIPEBCGS MatLMVMReset
KSPGROPPCG KSPPIPECG MatLMVMResetShift
KSPGetApplicationContext KSPPIPECG2 MatLMVMSymBroydenSetDelta
KSPGetConvergedReason KSPPIPECGRR MatLMVMSymBroydenSetScaleType
KSPGetDM KSPPIPECR MatLMVMUpdate
KSPGetDiagonalScale KSPPIPEFCG MatSchurComplementAinvType
KSPGetDiagonalScaleFix KSPPIPEFCGGetMmax MatSchurComplementGetKSP
KSPGetErrorIfNotConverged KSPPIPEFCGGetTruncationType MatSchurComplementGetSubMatrices
KSPGetInitialGuessNonzero KSPPIPEFCGSetMmax MatSchurComplementSetSubMatrices
KSPGetIterationNumber KSPPIPEFCGSetTruncationType MatSchurComplementUpdateSubMatrices
KSPGetMonitorContext KSPPIPEFGMRES
KSPGetOperators KSPPIPEFGMRESSetShift
Advanced - Setting more advanced options and customization
DMGlobalToLocalSolve KSPGetComputeSingularValues KSPSetNormType
DMKSPGetComputeInitialGuess KSPGetConvergenceContext KSPSetOptionsPrefix
DMKSPGetComputeOperators KSPGetConvergenceTest KSPSetResidualHistory
DMKSPGetComputeRHS KSPGetInitialGuessKnoll KSPSetUpOnBlocks
DMKSPSetComputeInitialGuess KSPGetMatSolveBlockSize KSPSetUseFischerGuess
DMKSPSetComputeOperators KSPGetNormType KSPTSIRM
DMKSPSetComputeRHS KSPGetOptionsPrefix KSPUnwindPreconditioner
KSPAppendOptionsPrefix KSPGetResidualHistory KSP_GMRES_CGS_REFINE_IFNEEDED
KSPBuildResidual KSPGuessFischerSetModel KSP_GMRES_CGS_REFINE_NEVER
KSPBuildSolution KSPMatRegisterAll KSP_NORM_NATURAL
KSPCGGetNormD KSPMonitorDynamicTolerance KSP_NORM_NONE
KSPCGGetObjFcn KSPMonitorSAWs KSP_NORM_PRECONDITIONED
KSPCGSetRadius KSPNormType KSP_NORM_UNPRECONDITIONED
KSPComputeEigenvalues KSPPIPEFCGGetNprealloc MatCreateSchurComplementPmat
KSPComputeEigenvaluesExplicitly KSPPIPEFCGSetNprealloc MatGetSchurComplement
KSPComputeExtremeSingularValues KSPPIPEGCRGetNprealloc MatLMVMApplyJ0Fwd
KSPComputeOperator KSPPIPEGCRSetNprealloc MatLMVMApplyJ0Inv
KSPComputeRitz KSPPIPELCG MatLMVMClearJ0
KSPConvergedSkip KSPQCGGetQuadratic MatLMVMGetJ0
KSPCreateVecs KSPQCGGetTrialStepNorm MatLMVMGetJ0KSP
KSPFCGGetNprealloc KSPQCGSetTrustRegionRadius MatLMVMGetJ0PC
KSPFCGSetNprealloc KSPRegister MatLMVMSetJ0
KSPFETIDP KSPRegisterAll MatLMVMSetJ0Diag
KSPFETIDPGetInnerBDDC KSPSetCheckNormIteration MatLMVMSetJ0KSP
KSPFETIDPGetInnerKSP KSPSetComputeEigenvalues MatLMVMSetJ0PC
KSPFETIDPSetInnerBDDC KSPSetComputeRitz MatLMVMSetJ0Scale
KSPFETIDPSetPressureOperator KSPSetComputeSingularValues MatSchurComplementComputeExplicitOperator
KSPGLTRGetLambda KSPSetConvergenceTest MatSchurComplementGetAinvType
KSPGLTRGetMinEig KSPSetGuess MatSchurComplementGetPmat
KSPGMRESCGSRefinementType KSPSetInitialGuessKnoll MatSchurComplementSetAinvType
KSPGetAndClearConvergenceTest KSPSetLagNorm
KSPGetComputeEigenvalues KSPSetMatSolveBlockSize
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMKSP KSPGetRhs KSPSetPC
DMGetDMKSP KSPGetSolution KSPSetPostSolve
DMGetDMKSPWrite KSPInitialResidual KSPSetPreSolve
DMKSPCopy KSPInitializePackage KSPSetSupportedNorm
KSPCheckDot KSPMonitor KSPSetUp
KSPCheckNorm KSPMonitorSAWsCreate KSPSetWorkVecs
KSPCheckSolve KSPMonitorSAWsDestroy KSPSolveTranspose
KSPFinalizePackage KSPMonitorSetFromOptions MatSchurComplementSetKSP
KSPGLTR KSPNASH PCFinalizePackage
KSPGetGuess KSPQCG PCInitializePackage
KSPGetPC KSPSTCG
No deprecated routines

Table of Contents