KSP_NORM_NATURAL#

Computes \(((b - Ax)^TB(b - Ax))^{1/2}\) and passes that to the convergence test routine.

Notes#

This is supported by the conjugate gradient-type methods KSPCG, KSPCR, KSPCGNE, KSPCGS, KSPFCG, KSPPIPEFCG, KSPPIPELCG, KSPPIPEGCR, KSPPIPECGRR, KSPPIPECG, KSPPIPECG2, KSPPIPEPRCG, KSPGROPPCG, KSPGLTR, and KSPNASH.

KSPFETIDP and KSPPREONLY accept this setting for compatibility but do not use it directly. For KSPFETIDP, configure the norm type on the inner KSP returned by KSPFETIDPGetInnerKSP().

Since \((b - Ax)^TB(b - Ax) = e^TA^TBAe \approx e^TAe\), where \(e\) is the error and \(A\) is the discretization of the differential operator arising from the weak formulation of the governing equations, the code is approximating the norm that operator induces on the error. For many problems, the underlying norm is \(H^1\), often called the energy norm.

Since the application of \(B\) to \((b - Ax)\) is already computed in the conjugate gradient and related routines, the use of KSP_NORM_NATURAL does not require any additional operations over using other KSPNormTypes.

See Also#

KSP: Linear System Solvers, KSPNormType, KSP, KSPSetNormType(), KSP_NORM_NONE, KSP_NORM_PRECONDITIONED, KSP_NORM_UNPRECONDITIONED, KSPSetConvergenceTest()

Level#

advanced

Location#

include/petscksp.h

Examples#

src/ksp/ksp/tests/ex94.c
src/snes/tutorials/ex11.c


Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages