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

Table of Contents