Skip to main content
`Ctrl`+`K`

# petsc4py.PETSc.KSP.Type

class petsc4py.PETSc.KSP.Type

  Bases: `object`

  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 Tree Quasi- Minimal Residual (QMR). `KSPCR`

  `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`

  See also

  Working with PETSc options, `KSPType`

  Attributes Summary

  `BCGS` | Object `BCGS` of type `str`
  `BCGSL` | Object `BCGSL` of type `str`
  `BICG` | Object `BICG` of type `str`
  `CG` | Object `CG` of type `str`
  `CGLS` | Object `CGLS` of type `str`
  `CGNE` | Object `CGNE` of type `str`
  `CGS` | Object `CGS` of type `str`
  `CHEBYSHEV` | Object `CHEBYSHEV` of type `str`
  `CR` | Object `CR` of type `str`
  `DGMRES` | Object `DGMRES` of type `str`
  `FBCGS` | Object `FBCGS` of type `str`
  `FBCGSR` | Object `FBCGSR` of type `str`
  `FCG` | Object `FCG` of type `str`
  `FETIDP` | Object `FETIDP` of type `str`
  `FGMRES` | Object `FGMRES` of type `str`
  `GCR` | Object `GCR` of type `str`
  `GLTR` | Object `GLTR` of type `str`
  `GMRES` | Object `GMRES` of type `str`
  `GROPPCG` | Object `GROPPCG` of type `str`
  `HPDDM` | Object `HPDDM` of type `str`
  `IBCGS` | Object `IBCGS` of type `str`
  `LCD` | Object `LCD` of type `str`
  `LGMRES` | Object `LGMRES` of type `str`
  `LSQR` | Object `LSQR` of type `str`
  `MINRES` | Object `MINRES` of type `str`
  `NASH` | Object `NASH` of type `str`
  `NONE` | Object `NONE` of type `str`
  `PGMRES` | Object `PGMRES` of type `str`
  `PIPEBCGS` | Object `PIPEBCGS` of type `str`
  `PIPECG` | Object `PIPECG` of type `str`
  `PIPECG2` | Object `PIPECG2` of type `str`
  `PIPECGRR` | Object `PIPECGRR` of type `str`
  `PIPECR` | Object `PIPECR` of type `str`
  `PIPEFCG` | Object `PIPEFCG` of type `str`
  `PIPEFGMRES` | Object `PIPEFGMRES` of type `str`
  `PIPEGCR` | Object `PIPEGCR` of type `str`
  `PIPELCG` | Object `PIPELCG` of type `str`
  `PIPEPRCG` | Object `PIPEPRCG` of type `str`
  `PREONLY` | Object `PREONLY` of type `str`
  `PYTHON` | Object `PYTHON` of type `str`
  `QCG` | Object `QCG` of type `str`
  `QMRCGS` | Object `QMRCGS` of type `str`
  `RICHARDSON` | Object `RICHARDSON` of type `str`
  `STCG` | Object `STCG` of type `str`
  `SYMMLQ` | Object `SYMMLQ` of type `str`
  `TCQMR` | Object `TCQMR` of type `str`
  `TFQMR` | Object `TFQMR` of type `str`
  `TSIRM` | Object `TSIRM` of type `str`

  Attributes Documentation

  BCGS: str = BCGS

    Object `BCGS` of type `str`

  BCGSL: str = BCGSL

    Object `BCGSL` of type `str`

  BICG: str = BICG

    Object `BICG` of type `str`

  CG: str = CG

    Object `CG` of type `str`

  CGLS: str = CGLS

    Object `CGLS` of type `str`

  CGNE: str = CGNE

    Object `CGNE` of type `str`

  CGS: str = CGS

    Object `CGS` of type `str`

  CHEBYSHEV: str = CHEBYSHEV

    Object `CHEBYSHEV` of type `str`

  CR: str = CR

    Object `CR` of type `str`

  DGMRES: str = DGMRES

    Object `DGMRES` of type `str`

  FBCGS: str = FBCGS

    Object `FBCGS` of type `str`

  FBCGSR: str = FBCGSR

    Object `FBCGSR` of type `str`

  FCG: str = FCG

    Object `FCG` of type `str`

  FETIDP: str = FETIDP

    Object `FETIDP` of type `str`

  FGMRES: str = FGMRES

    Object `FGMRES` of type `str`

  GCR: str = GCR

    Object `GCR` of type `str`

  GLTR: str = GLTR

    Object `GLTR` of type `str`

  GMRES: str = GMRES

    Object `GMRES` of type `str`

  GROPPCG: str = GROPPCG

    Object `GROPPCG` of type `str`

  HPDDM: str = HPDDM

    Object `HPDDM` of type `str`

  IBCGS: str = IBCGS

    Object `IBCGS` of type `str`

  LCD: str = LCD

    Object `LCD` of type `str`

  LGMRES: str = LGMRES

    Object `LGMRES` of type `str`

  LSQR: str = LSQR

    Object `LSQR` of type `str`

  MINRES: str = MINRES

    Object `MINRES` of type `str`

  NASH: str = NASH

    Object `NASH` of type `str`

  NONE: str = NONE

    Object `NONE` of type `str`

  PGMRES: str = PGMRES

    Object `PGMRES` of type `str`

  PIPEBCGS: str = PIPEBCGS

    Object `PIPEBCGS` of type `str`

  PIPECG: str = PIPECG

    Object `PIPECG` of type `str`

  PIPECG2: str = PIPECG2

    Object `PIPECG2` of type `str`

  PIPECGRR: str = PIPECGRR

    Object `PIPECGRR` of type `str`

  PIPECR: str = PIPECR

    Object `PIPECR` of type `str`

  PIPEFCG: str = PIPEFCG

    Object `PIPEFCG` of type `str`

  PIPEFGMRES: str = PIPEFGMRES

    Object `PIPEFGMRES` of type `str`

  PIPEGCR: str = PIPEGCR

    Object `PIPEGCR` of type `str`

  PIPELCG: str = PIPELCG

    Object `PIPELCG` of type `str`

  PIPEPRCG: str = PIPEPRCG

    Object `PIPEPRCG` of type `str`

  PREONLY: str = PREONLY

    Object `PREONLY` of type `str`

  PYTHON: str = PYTHON

    Object `PYTHON` of type `str`

  QCG: str = QCG

    Object `QCG` of type `str`

  QMRCGS: str = QMRCGS

    Object `QMRCGS` of type `str`

  RICHARDSON: str = RICHARDSON

    Object `RICHARDSON` of type `str`

  STCG: str = STCG

    Object `STCG` of type `str`

  SYMMLQ: str = SYMMLQ

    Object `SYMMLQ` of type `str`

  TCQMR: str = TCQMR

    Object `TCQMR` of type `str`

  TFQMR: str = TFQMR

    Object `TFQMR` of type `str`

  TSIRM: str = TSIRM

    Object `TSIRM` of type `str`

  __init__()
  classmethod __new__(*args, **kwargs)