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

Table of Contents