petsc-3.6.4 2016-04-12
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 KSPSetInitialGuessNonzero
KSPBCGS KSPGMRES KSPSetOperators
KSPBCGSL KSPIBCGS KSPSolve
KSPBICG KSPLCD KSPTCQMR
KSPCG KSPLGMRES KSPTFQMR
KSPCGNE KSPLSQR KSPType
KSPCGS KSPMINRES KSPView
KSPCGType KSPMonitorSet KSP_CONVERGED_ATOL
KSPCHEBYSHEV KSPPGMRES KSP_CONVERGED_ITERATING
KSPCR KSPPREONLY KSP_CONVERGED_ITS
KSPConvergedReason KSPRICHARDSON KSP_CONVERGED_RTOL
KSPCreate KSPReasonView KSP_DIVERGED_BREAKDOWN
KSPDGMRES KSPReset KSP_DIVERGED_BREAKDOWN_BICG
KSPDestroy KSPSYMMLQ KSP_DIVERGED_DTOL
KSPFBCGS KSPSetComputeInitialGuess KSP_DIVERGED_INDEFINITE_PC
KSPFBCGSR KSPSetComputeOperators KSP_DIVERGED_ITS
KSPFCG KSPSetComputeRHS KSP_DIVERGED_NONSYMMETRIC
KSPFGMRES KSPSetFromOptions
Intermediate - Setting options for algorithms and data structures
KSPBCGSLSetEll KSPGMRESSetCGSRefinementType KSPMonitorLGTrueResidualNormDestroy
KSPBCGSLSetPol KSPGMRESSetHapTol KSPMonitorRange
KSPBCGSLSetUsePseudoinverse KSPGMRESSetOrthogonalization KSPMonitorSingularValue
KSPBCGSLSetXRes KSPGMRESSetPreAllocateVectors KSPMonitorSolution
KSPCGSetType KSPGMRESSetRestart KSPMonitorTrueResidualMaxNorm
KSPCGUseSingleReduction KSPGROPPCG KSPMonitorTrueResidualNorm
KSPChebyshevEstEigGetKSP KSPGetApplicationContext KSPPIPECG
KSPChebyshevEstEigSet KSPGetConvergedReason KSPPIPECR
KSPChebyshevEstEigSetRandom KSPGetDM KSPPythonSetType
KSPChebyshevSetEigenvalues KSPGetDiagonalScale KSPReasonViewFromOptions
KSPConvergedDefault KSPGetDiagonalScaleFix KSPRichardsonSetScale
KSPConvergedDefaultCreate KSPGetErrorIfNotConverged KSPRichardsonSetSelfScale
KSPConvergedDefaultDestroy KSPGetInitialGuessNonzero KSPSetApplicationContext
KSPConvergedDefaultSetUIRNorm KSPGetIterationNumber KSPSetDM
KSPConvergedDefaultSetUMIRNorm KSPGetMonitorContext KSPSetDMActive
KSPFCGGetMmax KSPGetOperators KSPSetDiagonalScale
KSPFCGGetTruncationType KSPGetOperatorsSet KSPSetDiagonalScaleFix
KSPFCGSetMmax KSPGetPCSide KSPSetErrorIfNotConverged
KSPFCGSetTruncationType KSPGetResidualNorm KSPSetPCSide
KSPFCGTruncationType KSPGetTolerances KSPSetReusePreconditioner
KSPFGMRESModifyPCKSP KSPGetTotalIterations KSPSetSkipPCSetFromOptions
KSPFGMRESModifyPCNoChange KSPGetType KSPSetTolerances
KSPFGMRESSetModifyPC KSPLSQRDefaultConverged KSPSetType
KSPGCRSetModifyPC KSPLSQRMonitorDefault MatCreateSchurComplement
KSPGMRESClassicalGramSchmidtOrthogonalization KSPLoad MatSchurComplementAinvType
KSPGMRESGetCGSRefinementType KSPMonitorCancel MatSchurComplementGetKSP
KSPGMRESGetOrthogonalization KSPMonitorDefault MatSchurComplementGetSubMatrices
KSPGMRESGetRestart KSPMonitorLGResidualNormCreate MatSchurComplementSetSubMatrices
KSPGMRESModifiedGramSchmidtOrthogonalization KSPMonitorLGResidualNormDestroy MatSchurComplementUpdateSubMatrices
KSPGMRESMonitorKrylov KSPMonitorLGTrueResidualNormCreate
Advanced - Setting more advanced options and customization
DMGlobalToLocalSolve KSPGMRESCGSRefinementType KSPSetComputeEigenvalues
DMKSPGetComputeInitialGuess KSPGetComputeEigenvalues KSPSetComputeSingularValues
DMKSPGetComputeOperators KSPGetComputeSingularValues KSPSetConvergenceTest
DMKSPGetComputeRHS KSPGetConvergenceContext KSPSetFischerGuess
DMKSPSetComputeInitialGuess KSPGetInitialGuessKnoll KSPSetInitialGuessKnoll
DMKSPSetComputeOperators KSPGetNormType KSPSetLagNorm
DMKSPSetComputeRHS KSPGetOptionsPrefix KSPSetNormType
KSPAppendOptionsPrefix KSPGetResidualHistory KSPSetOptionsPrefix
KSPBuildResidual KSPMatRegisterAll KSPSetResidualHistory
KSPBuildSolution KSPMonitorDynamicTolerance KSPSetUpOnBlocks
KSPComputeEigenvalues KSPMonitorSAWs KSPSetUseFischerGuess
KSPComputeEigenvaluesExplicitly KSPNASHGetNormD KSPUnwindPreconditioner
KSPComputeExplicitOperator KSPNASHGetObjFcn KSP_GMRES_CGS_REFINE_IFNEEDED
KSPComputeExtremeSingularValues KSPNASHSetRadius KSP_GMRES_CGS_REFINE_NEVER
KSPConvergedSkip KSPNormType KSP_NORM_NATURAL
KSPCreateVecs KSPQCGGetQuadratic KSP_NORM_NONE
KSPFCGGetNprealloc KSPQCGGetTrialStepNorm KSP_NORM_PRECONDITIONED
KSPFCGSetNprealloc KSPQCGSetTrustRegionRadius KSP_NORM_UNPRECONDITIONED
KSPFischerGuessCreate KSPRegister MatCreateSchurComplementPmat
KSPGLTRGetLambda KSPRegisterAll MatGetSchurComplement
KSPGLTRGetMinEig KSPSTCGGetNormD MatSchurComplementComputeExplicitOperator
KSPGLTRGetNormD KSPSTCGGetObjFcn MatSchurComplementGetAinvType
KSPGLTRGetObjFcn KSPSTCGSetRadius MatSchurComplementGetPmat
KSPGLTRSetRadius KSPSetCheckNormIteration MatSchurComplementSetAinvType
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMKSP KSPGetSolution KSPSetPC
DMGetDMKSP KSPGetTabLevel KSPSetPostSolve
DMGetDMKSPWrite KSPInitialResidual KSPSetPreSolve
DMKSPCopy KSPInitializePackage KSPSetSupportedNorm
DMPlexProjectField KSPMonitor KSPSetTabLevel
KSPFinalizePackage KSPMonitorSAWsCreate KSPSetUp
KSPGLTR KSPMonitorSAWsDestroy KSPSolveTranspose
KSPGetFischerGuess KSPNASH MatSchurComplementSetKSP
KSPGetPC KSPQCG PCFinalizePackage
KSPGetRhs KSPSTCG PCInitializePackage
No deprecated routines

Table of Contents