petsc4py.PETSc.KSP.NormType#

class petsc4py.PETSc.KSP.NormType#

Bases: IntEnum

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

NORM_DEFAULT

Enum member NORM_DEFAULT of KSPNormType

NORM_NONE

Enum member NORM_NONE of KSPNormType

NORM_PRECONDITIONED

Enum member NORM_PRECONDITIONED of KSPNormType

NORM_UNPRECONDITIONED

Enum member NORM_UNPRECONDITIONED of KSPNormType

NORM_NATURAL

Enum member NORM_NATURAL of KSPNormType

DEFAULT

Enum member DEFAULT of KSPNormType

NONE

Enum member NONE of KSPNormType

NO

Enum member NO of KSPNormType

PRECONDITIONED

Enum member PRECONDITIONED of KSPNormType

UNPRECONDITIONED

Enum member UNPRECONDITIONED of KSPNormType

NATURAL

Enum member NATURAL of KSPNormType

Attributes Documentation

NORM_DEFAULT = -1#

Enum member NORM_DEFAULT of KSPNormType

NORM_NONE = 0#

Enum member NORM_NONE of KSPNormType

NORM_PRECONDITIONED = 1#

Enum member NORM_PRECONDITIONED of KSPNormType

NORM_UNPRECONDITIONED = 2#

Enum member NORM_UNPRECONDITIONED of KSPNormType

NORM_NATURAL = 3#

Enum member NORM_NATURAL of KSPNormType

DEFAULT = -1#

Enum member DEFAULT of KSPNormType

NONE = 0#

Enum member NONE of KSPNormType

NO = 0#

Enum member NO of KSPNormType

PRECONDITIONED = 1#

Enum member PRECONDITIONED of KSPNormType

UNPRECONDITIONED = 2#

Enum member UNPRECONDITIONED of KSPNormType

NATURAL = 3#

Enum member NATURAL of KSPNormType