petsc-3.8.4 2018-03-24
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 KSPGuessSetFromOptions 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
KSPCreate KSPPREONLY KSP_DIVERGED_BREAKDOWN
KSPDGMRES KSPRICHARDSON KSP_DIVERGED_BREAKDOWN_BICG
KSPDestroy KSPReasonView KSP_DIVERGED_DTOL
KSPFBCGS KSPReset KSP_DIVERGED_INDEFINITE_PC
KSPFBCGSR KSPSYMMLQ KSP_DIVERGED_ITS
KSPFCG KSPSetComputeInitialGuess KSP_DIVERGED_NONSYMMETRIC
KSPFGMRES KSPSetComputeOperators KSP_DIVERGED_PCSETUP_FAILED
Intermediate - Setting options for algorithms and data structures
KSPBCGSLSetEll KSPGetConvergedReason KSPPIPEFCG
KSPBCGSLSetPol KSPGetDM KSPPIPEFCGGetMmax
KSPBCGSLSetUsePseudoinverse KSPGetDiagonalScale KSPPIPEFCGGetTruncationType
KSPBCGSLSetXRes KSPGetDiagonalScaleFix KSPPIPEFCGSetMmax
KSPCGSetType KSPGetErrorIfNotConverged KSPPIPEFCGSetTruncationType
KSPCGUseSingleReduction KSPGetInitialGuessNonzero KSPPIPEFGMRES
KSPChebyshevEstEigGetKSP KSPGetIterationNumber KSPPIPEFGMRESSetShift
KSPChebyshevEstEigSet KSPGetMonitorContext KSPPIPEGCR
KSPChebyshevEstEigSetUseNoisy KSPGetOperators KSPPIPEGCRGetMmax
KSPChebyshevSetEigenvalues KSPGetOperatorsSet KSPPIPEGCRGetTruncationType
KSPConvergedDefault KSPGetPCSide KSPPIPEGCRGetUnrollW
KSPConvergedDefaultCreate KSPGetResidualNorm KSPPIPEGCRSetMmax
KSPConvergedDefaultDestroy KSPGetTolerances KSPPIPEGCRSetModifyPC
KSPConvergedDefaultSetUIRNorm KSPGetTotalIterations KSPPIPEGCRSetTruncationType
KSPConvergedDefaultSetUMIRNorm KSPGetType KSPPIPEGCRSetUnrollW
KSPFCDTruncationType KSPGuessFormGuess KSPPythonSetType
KSPFCGGetMmax KSPGuessGetType KSPReasonViewFromOptions
KSPFCGGetTruncationType KSPGuessSetType KSPRichardsonSetScale
KSPFCGSetMmax KSPGuessSetUp KSPRichardsonSetSelfScale
KSPFCGSetTruncationType KSPGuessUpdate KSPSetApplicationContext
KSPFGMRESModifyPCKSP KSPGuessView KSPSetDM
KSPFGMRESModifyPCNoChange KSPLSQRDefaultConverged KSPSetDMActive
KSPFGMRESSetModifyPC KSPLSQRMonitorDefault KSPSetDiagonalScale
KSPGCRSetModifyPC KSPLoad KSPSetDiagonalScaleFix
KSPGMRESClassicalGramSchmidtOrthogonalization KSPMonitorCancel KSPSetErrorIfNotConverged
KSPGMRESGetCGSRefinementType KSPMonitorDefault KSPSetPCSide
KSPGMRESGetOrthogonalization KSPMonitorLGResidualNormCreate KSPSetReusePreconditioner
KSPGMRESGetRestart KSPMonitorLGTrueResidualNormCreate KSPSetSkipPCSetFromOptions
KSPGMRESModifiedGramSchmidtOrthogonalization KSPMonitorRange KSPSetTolerances
KSPGMRESMonitorKrylov KSPMonitorSingularValue KSPSetType
KSPGMRESSetCGSRefinementType KSPMonitorSolution MatCreateSchurComplement
KSPGMRESSetHapTol KSPMonitorTrueResidualMaxNorm MatSchurComplementAinvType
KSPGMRESSetOrthogonalization KSPMonitorTrueResidualNorm MatSchurComplementGetKSP
KSPGMRESSetPreAllocateVectors KSPPIPEBCGS MatSchurComplementGetSubMatrices
KSPGMRESSetRestart KSPPIPECG MatSchurComplementSetSubMatrices
KSPGROPPCG KSPPIPECGRR MatSchurComplementUpdateSubMatrices
KSPGetApplicationContext KSPPIPECR
Advanced - Setting more advanced options and customization
DMGlobalToLocalSolve KSPFETIDPGetInnerKSP KSPSetComputeEigenvalues
DMKSPGetComputeInitialGuess KSPFETIDPSetInnerBDDC KSPSetComputeRitz
DMKSPGetComputeOperators KSPFETIDPSetPressureOperator KSPSetComputeSingularValues
DMKSPGetComputeRHS KSPGMRESCGSRefinementType KSPSetConvergenceTest
DMKSPSetComputeInitialGuess KSPGetComputeEigenvalues KSPSetGuess
DMKSPSetComputeOperators KSPGetComputeSingularValues KSPSetInitialGuessKnoll
DMKSPSetComputeRHS KSPGetConvergenceContext KSPSetLagNorm
KSPAppendOptionsPrefix KSPGetInitialGuessKnoll KSPSetNormType
KSPBuildResidual KSPGetNormType KSPSetOptionsPrefix
KSPBuildSolution KSPGetOptionsPrefix KSPSetResidualHistory
KSPCGGLTRGetLambda KSPGetResidualHistory KSPSetUpOnBlocks
KSPCGGLTRGetMinEig KSPGuessFischerSetModel KSPSetUseFischerGuess
KSPCGGetNormD KSPMatRegisterAll KSPTSIRM
KSPCGGetObjFcn KSPMonitorDynamicTolerance KSPUnwindPreconditioner
KSPCGSetRadius KSPMonitorSAWs KSP_GMRES_CGS_REFINE_IFNEEDED
KSPComputeEigenvalues KSPNormType KSP_GMRES_CGS_REFINE_NEVER
KSPComputeEigenvaluesExplicitly KSPPIPEFCGGetNprealloc KSP_NORM_NATURAL
KSPComputeExplicitOperator KSPPIPEFCGSetNprealloc KSP_NORM_NONE
KSPComputeExtremeSingularValues KSPPIPEGCRGetNprealloc KSP_NORM_PRECONDITIONED
KSPComputeRitz KSPPIPEGCRSetNprealloc KSP_NORM_UNPRECONDITIONED
KSPConvergedSkip KSPQCGGetQuadratic MatCreateSchurComplementPmat
KSPCreateVecs KSPQCGGetTrialStepNorm MatGetSchurComplement
KSPFCGGetNprealloc KSPQCGSetTrustRegionRadius MatSchurComplementComputeExplicitOperator
KSPFCGSetNprealloc KSPRegister MatSchurComplementGetAinvType
KSPFETIDP KSPRegisterAll MatSchurComplementGetPmat
KSPFETIDPGetInnerBDDC KSPSetCheckNormIteration MatSchurComplementSetAinvType
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMKSP KSPGetRhs KSPSetPostSolve
DMGetDMKSP KSPGetSolution KSPSetPreSolve
DMGetDMKSPWrite KSPGetTabLevel KSPSetSupportedNorm
DMKSPCopy KSPInitialResidual KSPSetTabLevel
DMProjectField KSPInitializePackage KSPSetUp
KSPCGGLTR KSPMonitor KSPSetWorkVecs
KSPCGNASH KSPMonitorSAWsCreate KSPSolveTranspose
KSPCGSTCG KSPMonitorSAWsDestroy MatSchurComplementSetKSP
KSPFinalizePackage KSPMonitorSetFromOptions PCFinalizePackage
KSPGetGuess KSPQCG PCInitializePackage
KSPGetPC KSPSetPC
No deprecated routines

Table of Contents