petsc-master 2021-01-19
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 KSPGetIterationNumber KSPPIPEFGMRES
KSPBCGSLSetEll KSPGetMonitorContext KSPPIPEFGMRESSetShift
KSPBCGSLSetPol KSPGetOperators KSPPIPEGCR
KSPBCGSLSetUsePseudoinverse KSPGetOperatorsSet KSPPIPEGCRGetMmax
KSPBCGSLSetXRes KSPGetPCSide KSPPIPEGCRGetTruncationType
KSPCGSetType KSPGetResidualNorm KSPPIPEGCRGetUnrollW
KSPCGUseSingleReduction KSPGetReusePreconditioner KSPPIPEGCRSetMmax
KSPChebyshevEstEigGetKSP KSPGetTolerances KSPPIPEGCRSetModifyPC
KSPChebyshevEstEigSet KSPGetTotalIterations KSPPIPEGCRSetTruncationType
KSPChebyshevEstEigSetUseNoisy KSPGetType KSPPIPEGCRSetUnrollW
KSPChebyshevSetEigenvalues KSPGuessFormGuess KSPPIPEPRCG
KSPConvergedDefault KSPGuessGetType KSPPythonSetType
KSPConvergedDefaultCreate KSPGuessSetFromOptions KSPRichardsonSetScale
KSPConvergedDefaultDestroy KSPGuessSetType KSPRichardsonSetSelfScale
KSPConvergedDefaultSetConvergedMaxits KSPGuessSetUp KSPSetApplicationContext
KSPConvergedDefaultSetUIRNorm KSPGuessUpdate KSPSetDM
KSPConvergedDefaultSetUMIRNorm KSPGuessView KSPSetDMActive
KSPConvergedRateView KSPHPDDM KSPSetDiagonalScale
KSPConvergedReasonViewFromOptions KSPHPDDMGetDeflationSpace KSPSetDiagonalScaleFix
KSPFCDTruncationType KSPHPDDMGetType KSPSetErrorIfNotConverged
KSPFCGGetMmax KSPHPDDMSetDeflationSpace KSPSetPCSide
KSPFCGGetTruncationType KSPHPDDMSetType KSPSetReusePreconditioner
KSPFCGSetMmax KSPHPDDMType KSPSetSkipPCSetFromOptions
KSPFCGSetTruncationType KSPLSQRConvergedDefault KSPSetTolerances
KSPFGMRESModifyPCKSP KSPLSQRGetNorms KSPSetType
KSPFGMRESModifyPCNoChange KSPLSQRGetStandardErrorVec KSPViewFromOptions
KSPFGMRESSetModifyPC KSPLSQRMonitorDefault MatCreateLMVMBFGS
KSPGCRGetRestart KSPLSQRSetComputeStandardErrorVec MatCreateLMVMBadBroyden
KSPGCRSetModifyPC KSPLSQRSetExactMatNorm MatCreateLMVMBroyden
KSPGCRSetRestart KSPLoad MatCreateLMVMDFP
KSPGMRESClassicalGramSchmidtOrthogonalization KSPMatSolve MatCreateLMVMDiagBroyden
KSPGMRESGetCGSRefinementType KSPMonitorCancel MatCreateLMVMSR1
KSPGMRESGetOrthogonalization KSPMonitorDefault MatCreateLMVMSymBadBroyden
KSPGMRESGetRestart KSPMonitorLGResidualNormCreate MatCreateLMVMSymBroyden
KSPGMRESModifiedGramSchmidtOrthogonalization KSPMonitorLGTrueResidualNormCreate MatCreateSchurComplement
KSPGMRESMonitorKrylov KSPMonitorRange MatLMVMAllocate
KSPGMRESSetBreakdownTolerance KSPMonitorSingularValue MatLMVMGetRejectCount
KSPGMRESSetCGSRefinementType KSPMonitorSolution MatLMVMGetUpdateCount
KSPGMRESSetHapTol KSPMonitorTrueResidualMaxNorm MatLMVMIsAllocated
KSPGMRESSetOrthogonalization KSPMonitorTrueResidualNorm MatLMVMReset
KSPGMRESSetPreAllocateVectors KSPPIPEBCGS MatLMVMResetShift
KSPGMRESSetRestart KSPPIPECG MatLMVMSymBroydenSetDelta
KSPGROPPCG KSPPIPECG2 MatLMVMSymBroydenSetScaleType
KSPGetApplicationContext KSPPIPECGRR MatLMVMUpdate
KSPGetConvergedReason KSPPIPECR MatSchurComplementAinvType
KSPGetDM KSPPIPEFCG MatSchurComplementGetKSP
KSPGetDiagonalScale KSPPIPEFCGGetMmax MatSchurComplementGetSubMatrices
KSPGetDiagonalScaleFix KSPPIPEFCGGetTruncationType MatSchurComplementSetSubMatrices
KSPGetErrorIfNotConverged KSPPIPEFCGSetMmax MatSchurComplementUpdateSubMatrices
KSPGetInitialGuessNonzero KSPPIPEFCGSetTruncationType
Advanced - Setting more advanced options and customization
DMGlobalToLocalSolve KSPGetComputeSingularValues KSPSetLagNorm
DMKSPGetComputeInitialGuess KSPGetConvergenceContext KSPSetMatSolveBlockSize
DMKSPGetComputeOperators KSPGetConvergenceTest KSPSetNormType
DMKSPGetComputeRHS KSPGetErrorHistory KSPSetOptionsPrefix
DMKSPSetComputeInitialGuess KSPGetInitialGuessKnoll KSPSetResidualHistory
DMKSPSetComputeOperators KSPGetMatSolveBlockSize KSPSetUpOnBlocks
DMKSPSetComputeRHS KSPGetNormType KSPSetUseFischerGuess
KSPAppendOptionsPrefix KSPGetOptionsPrefix KSPTSIRM
KSPBuildResidual KSPGetResidualHistory KSPUnwindPreconditioner
KSPBuildSolution KSPGuessFischerSetModel KSP_GMRES_CGS_REFINE_IFNEEDED
KSPCGGetNormD KSPMatRegisterAll KSP_GMRES_CGS_REFINE_NEVER
KSPCGGetObjFcn KSPMonitorDynamicTolerance KSP_NORM_NATURAL
KSPCGSetRadius KSPMonitorSAWs KSP_NORM_NONE
KSPComputeEigenvalues KSPNormType KSP_NORM_PRECONDITIONED
KSPComputeEigenvaluesExplicitly KSPPIPEFCGGetNprealloc KSP_NORM_UNPRECONDITIONED
KSPComputeExtremeSingularValues KSPPIPEFCGSetNprealloc MatCreateSchurComplementPmat
KSPComputeOperator KSPPIPEGCRGetNprealloc MatGetSchurComplement
KSPComputeRitz KSPPIPEGCRSetNprealloc MatLMVMApplyJ0Fwd
KSPConvergedSkip KSPPIPELCG MatLMVMApplyJ0Inv
KSPCreateVecs KSPQCGGetQuadratic MatLMVMClearJ0
KSPFCGGetNprealloc KSPQCGGetTrialStepNorm MatLMVMGetJ0
KSPFCGSetNprealloc KSPQCGSetTrustRegionRadius MatLMVMGetJ0KSP
KSPFETIDP KSPRegister MatLMVMGetJ0PC
KSPFETIDPGetInnerBDDC KSPRegisterAll MatLMVMSetJ0
KSPFETIDPGetInnerKSP KSPSetCheckNormIteration MatLMVMSetJ0Diag
KSPFETIDPSetInnerBDDC KSPSetComputeEigenvalues MatLMVMSetJ0KSP
KSPFETIDPSetPressureOperator KSPSetComputeRitz MatLMVMSetJ0PC
KSPGLTRGetLambda KSPSetComputeSingularValues MatLMVMSetJ0Scale
KSPGLTRGetMinEig KSPSetConvergenceTest MatSchurComplementComputeExplicitOperator
KSPGMRESCGSRefinementType KSPSetErrorHistory MatSchurComplementGetAinvType
KSPGetAndClearConvergenceTest KSPSetGuess MatSchurComplementGetPmat
KSPGetComputeEigenvalues KSPSetInitialGuessKnoll MatSchurComplementSetAinvType
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