Skip to main content
`Ctrl`+`K`

# petsc4py.PETSc.KSP.NormType

class petsc4py.PETSc.KSP.NormType

  Bases: `object`

  KSP norm type.

  The available norm types are:

  `NONE`

    Skips computing the norm, this should generally only be used if you are using the Krylov method as a smoother with a fixed small number of iterations. Implicitly sets `KSPConvergedSkip` as KSP convergence test. Note that certain algorithms such as `Type.GMRES` ALWAYS require the norm calculation, for these methods the norms are still computed, they are just not used in the convergence test.

  `PRECONDITIONED`

    The default for left preconditioned solves, uses the l₂ norm of the preconditioned residual P⁻¹(b - Ax).

  `UNPRECONDITIONED`

    Uses the l₂ norm of the true b - Ax residual.

  `NATURAL`

    Supported by `Type.CG`, `Type.CR`, `Type.CGNE`, `Type.CGS`.

  Attributes Summary

  `DEFAULT` | Constant `DEFAULT` of type `int`
  `NATURAL` | Constant `NATURAL` of type `int`
  `NO` | Constant `NO` of type `int`
  `NONE` | Constant `NONE` of type `int`
  `NORM_DEFAULT` | Constant `NORM_DEFAULT` of type `int`
  `NORM_NATURAL` | Constant `NORM_NATURAL` of type `int`
  `NORM_NONE` | Constant `NORM_NONE` of type `int`
  `NORM_PRECONDITIONED` | Constant `NORM_PRECONDITIONED` of type `int`
  `NORM_UNPRECONDITIONED` | Constant `NORM_UNPRECONDITIONED` of type `int`
  `PRECONDITIONED` | Constant `PRECONDITIONED` of type `int`
  `UNPRECONDITIONED` | Constant `UNPRECONDITIONED` of type `int`

  Attributes Documentation

  DEFAULT: int = DEFAULT

    Constant `DEFAULT` of type `int`

  NATURAL: int = NATURAL

    Constant `NATURAL` of type `int`

  NO: int = NO

    Constant `NO` of type `int`

  NONE: int = NONE

    Constant `NONE` of type `int`

  NORM_DEFAULT: int = NORM_DEFAULT

    Constant `NORM_DEFAULT` of type `int`

  NORM_NATURAL: int = NORM_NATURAL

    Constant `NORM_NATURAL` of type `int`

  NORM_NONE: int = NORM_NONE

    Constant `NORM_NONE` of type `int`

  NORM_PRECONDITIONED: int = NORM_PRECONDITIONED

    Constant `NORM_PRECONDITIONED` of type `int`

  NORM_UNPRECONDITIONED: int = NORM_UNPRECONDITIONED

    Constant `NORM_UNPRECONDITIONED` of type `int`

  PRECONDITIONED: int = PRECONDITIONED

    Constant `PRECONDITIONED` of type `int`

  UNPRECONDITIONED: int = UNPRECONDITIONED

    Constant `UNPRECONDITIONED` of type `int`