petsc4py.PETSc.KSP.Type#

class petsc4py.PETSc.KSP.Type#

Bases: StrEnum

KSP Type.

The available types are:

RICHARDSON

The preconditioned Richardson iterative method KSPRICHARDSON.

CHEBYSHEV

The preconditioned Chebyshev iterative method. KSPCHEBYSHEV.

CG

The Preconditioned Conjugate Gradient (PCG) iterative method. KSPCG

GROPPCG

A pipelined conjugate gradient method (Gropp). KSPGROPPCG

PIPECG

A pipelined conjugate gradient method. KSPPIPECG

PIPECGRR

Pipelined Conjugate Gradients with Residual Replacement. KSPPIPECGRR

PIPELCG

Deep pipelined (length l) Conjugate Gradient method. KSPPIPELCG

PIPEPRCG

Pipelined predict-and-recompute conjugate gradient method. KSPPIPEPRCG

PIPECG2

Pipelined conjugate gradient method with a single non-blocking reduction per two iterations. KSPPIPECG2

CGNE

Applies the preconditioned conjugate gradient method to the normal equations without explicitly forming AᵀA. KSPCGNE

NASH

Conjugate gradient method subject to a constraint on the solution norm. KSPNASH

STCG

Conjugate gradient method subject to a constraint on the solution norm. KSPSTCG

GLTR

Conjugate gradient method subject to a constraint on the solution norm. KSPGLTR

FCG

Flexible Conjugate Gradient method (FCG). Unlike most KSP methods this allows the preconditioner to be nonlinear. KSPFCG

PIPEFCG

Pipelined, Flexible Conjugate Gradient method. KSPPIPEFCG

GMRES

Generalized Minimal Residual method with restart. KSPGMRES

PIPEFGMRES

Pipelined (1-stage) Flexible Generalized Minimal Residual method. KSPPIPEFGMRES

FGMRES

Implements the Flexible Generalized Minimal Residual method. KSPFGMRES

LGMRES

Augments the standard Generalized Minimal Residual method approximation space with approximations to the error from previous restart cycles. KSPLGMRES

DGMRES

Deflated Generalized Minimal Residual method. In this implementation, the adaptive strategy allows to switch to the deflated GMRES when the stagnation occurs. KSPDGMRES

PGMRES

Pipelined Generalized Minimal Residual method. KSPPGMRES

TCQMR

A variant of Quasi Minimal Residual (QMR). KSPTCQMR

BCGS

Stabilized version of Biconjugate Gradient (BiCGStab) method. KSPBCGS

IBCGS

Improved Stabilized version of BiConjugate Gradient (IBiCGStab) method in an alternative form to have only a single global reduction operation instead of the usual 3 (or 4). KSPIBCGS

QMRCGS

Quasi- Minimal Residual variant of the Bi-CGStab algorithm (QMRCGStab) method. KSPQMRCGS

FBCGS

Flexible Stabilized version of BiConjugate Gradient (BiCGStab) method. KSPFBCGS

FBCGSR

A mathematically equivalent variant of flexible stabilized BiConjugate Gradient (BiCGStab). KSPFBCGSR

BCGSL

Variant of the L-step stabilized BiConjugate Gradient (BiCGStab(L)) algorithm. Uses “L-step” Minimal Residual (MR) polynomials. The variation concerns cases when some parameters are negative due to round-off. KSPBCGSL

PIPEBCGS

Pipelined stabilized BiConjugate Gradient (BiCGStab) method. KSPPIPEBCGS

CGS

Conjugate Gradient Squared method. KSPCGS

TFQMR

A Transpose Free Quasi-Minimal Residual (TFQMR) method. KSPTFQMR

CR

(Preconditioned) Conjugate Residuals (CR) method. KSPCR

PIPECR

Pipelined Conjugate Residual (CR) method. KSPPIPECR

LSQR

Least squares solver. KSPLSQR

PREONLY

Applies ONLY the preconditioner exactly once. This may be used in inner iterations, where it is desired to allow multiple iterations as well as the “0-iteration” case. It is commonly used with the direct solver preconditioners like PCLU and PCCHOLESKY. There is an alias of KSPNONE. KSPPREONLY

NONE

No solver KSPNONE

QCG

Conjugate Gradient (CG) method subject to a constraint on the solution norm. KSPQCG

BICG

Implements the Biconjugate gradient method (BiCG). Similar to running the conjugate gradient on the normal equations. KSPBICG

MINRES

Minimum Residual (MINRES) method. KSPMINRES

SYMMLQ

Symmetric LQ method (SymmLQ). Uses LQ decomposition (lower trapezoidal). KSPSYMMLQ

LCD

Left Conjugate Direction (LCD) method. KSPLCD

PYTHON

Python shell solver. Call Python function to implement solver. KSPPYTHON

GCR

Preconditioned flexible Generalized Conjugate Residual (GCR) method. KSPGCR

PIPEGCR

Pipelined Generalized Conjugate Residual method. KSPPIPEGCR

TSIRM

Two-Stage Iteration with least-squares Residual Minimization method. KSPTSIRM

CGLS

Conjugate Gradient method for Least-Squares problems. Supports non-square (rectangular) matrices. KSPCGLS

FETIDP

Dual-Primal (DP) Finite Element Tearing and Interconnect (FETI) method. KSPFETIDP

HPDDM

Interface with the HPDDM library. This KSP may be used to further select methods that are currently not implemented natively in PETSc, e.g., GCRODR, a recycled Krylov method which is similar to KSPLGMRES. KSPHPDDM

IDR

Induced Dimension Reduction method for general nonsymmetric linear systems

EKSM

Extended Krylov Subspace Method for shifted linear systems

Attributes Summary

RICHARDSON

Enum member RICHARDSON of KSPType

CHEBYSHEV

Enum member CHEBYSHEV of KSPType

CG

Enum member CG of KSPType

GROPPCG

Enum member GROPPCG of KSPType

PIPECG

Enum member PIPECG of KSPType

PIPECGRR

Enum member PIPECGRR of KSPType

PIPELCG

Enum member PIPELCG of KSPType

PIPEPRCG

Enum member PIPEPRCG of KSPType

PIPECG2

Enum member PIPECG2 of KSPType

CGNE

Enum member CGNE of KSPType

NASH

Enum member NASH of KSPType

STCG

Enum member STCG of KSPType

GLTR

Enum member GLTR of KSPType

FCG

Enum member FCG of KSPType

PIPEFCG

Enum member PIPEFCG of KSPType

GMRES

Enum member GMRES of KSPType

PIPEFGMRES

Enum member PIPEFGMRES of KSPType

FGMRES

Enum member FGMRES of KSPType

LGMRES

Enum member LGMRES of KSPType

DGMRES

Enum member DGMRES of KSPType

PGMRES

Enum member PGMRES of KSPType

TCQMR

Enum member TCQMR of KSPType

BCGS

Enum member BCGS of KSPType

IBCGS

Enum member IBCGS of KSPType

QMRCGS

Enum member QMRCGS of KSPType

FBCGS

Enum member FBCGS of KSPType

FBCGSR

Enum member FBCGSR of KSPType

BCGSL

Enum member BCGSL of KSPType

PIPEBCGS

Enum member PIPEBCGS of KSPType

CGS

Enum member CGS of KSPType

TFQMR

Enum member TFQMR of KSPType

CR

Enum member CR of KSPType

PIPECR

Enum member PIPECR of KSPType

LSQR

Enum member LSQR of KSPType

PREONLY

Enum member PREONLY of KSPType

NONE

Enum member NONE of KSPType

QCG

Enum member QCG of KSPType

BICG

Enum member BICG of KSPType

MINRES

Enum member MINRES of KSPType

SYMMLQ

Enum member SYMMLQ of KSPType

LCD

Enum member LCD of KSPType

PYTHON

Enum member PYTHON of KSPType

GCR

Enum member GCR of KSPType

PIPEGCR

Enum member PIPEGCR of KSPType

TSIRM

Enum member TSIRM of KSPType

CGLS

Enum member CGLS of KSPType

FETIDP

Enum member FETIDP of KSPType

HPDDM

Enum member HPDDM of KSPType

IDR

Enum member IDR of KSPType

EKSM

Enum member EKSM of KSPType

Attributes Documentation

RICHARDSON = 'richardson'#

Enum member RICHARDSON of KSPType

CHEBYSHEV = 'chebyshev'#

Enum member CHEBYSHEV of KSPType

CG = 'cg'#

Enum member CG of KSPType

GROPPCG = 'groppcg'#

Enum member GROPPCG of KSPType

PIPECG = 'pipecg'#

Enum member PIPECG of KSPType

PIPECGRR = 'pipecgrr'#

Enum member PIPECGRR of KSPType

PIPELCG = 'pipelcg'#

Enum member PIPELCG of KSPType

PIPEPRCG = 'pipeprcg'#

Enum member PIPEPRCG of KSPType

PIPECG2 = 'pipecg2'#

Enum member PIPECG2 of KSPType

CGNE = 'cgne'#

Enum member CGNE of KSPType

NASH = 'nash'#

Enum member NASH of KSPType

STCG = 'stcg'#

Enum member STCG of KSPType

GLTR = 'gltr'#

Enum member GLTR of KSPType

FCG = 'fcg'#

Enum member FCG of KSPType

PIPEFCG = 'pipefcg'#

Enum member PIPEFCG of KSPType

GMRES = 'gmres'#

Enum member GMRES of KSPType

PIPEFGMRES = 'pipefgmres'#

Enum member PIPEFGMRES of KSPType

FGMRES = 'fgmres'#

Enum member FGMRES of KSPType

LGMRES = 'lgmres'#

Enum member LGMRES of KSPType

DGMRES = 'dgmres'#

Enum member DGMRES of KSPType

PGMRES = 'pgmres'#

Enum member PGMRES of KSPType

TCQMR = 'tcqmr'#

Enum member TCQMR of KSPType

BCGS = 'bcgs'#

Enum member BCGS of KSPType

IBCGS = 'ibcgs'#

Enum member IBCGS of KSPType

QMRCGS = 'qmrcgs'#

Enum member QMRCGS of KSPType

FBCGS = 'fbcgs'#

Enum member FBCGS of KSPType

FBCGSR = 'fbcgsr'#

Enum member FBCGSR of KSPType

BCGSL = 'bcgsl'#

Enum member BCGSL of KSPType

PIPEBCGS = 'pipebcgs'#

Enum member PIPEBCGS of KSPType

CGS = 'cgs'#

Enum member CGS of KSPType

TFQMR = 'tfqmr'#

Enum member TFQMR of KSPType

CR = 'cr'#

Enum member CR of KSPType

PIPECR = 'pipecr'#

Enum member PIPECR of KSPType

LSQR = 'lsqr'#

Enum member LSQR of KSPType

PREONLY = 'preonly'#

Enum member PREONLY of KSPType

NONE = 'none'#

Enum member NONE of KSPType

QCG = 'qcg'#

Enum member QCG of KSPType

BICG = 'bicg'#

Enum member BICG of KSPType

MINRES = 'minres'#

Enum member MINRES of KSPType

SYMMLQ = 'symmlq'#

Enum member SYMMLQ of KSPType

LCD = 'lcd'#

Enum member LCD of KSPType

PYTHON = 'python'#

Enum member PYTHON of KSPType

GCR = 'gcr'#

Enum member GCR of KSPType

PIPEGCR = 'pipegcr'#

Enum member PIPEGCR of KSPType

TSIRM = 'tsirm'#

Enum member TSIRM of KSPType

CGLS = 'cgls'#

Enum member CGLS of KSPType

FETIDP = 'fetidp'#

Enum member FETIDP of KSPType

HPDDM = 'hpddm'#

Enum member HPDDM of KSPType

IDR = 'idr'#

Enum member IDR of KSPType

EKSM = 'eksm'#

Enum member EKSM of KSPType