KSPCGSetTRNormType#

Sets the norm used for the trust-region constraint

Synopsis#

#include "petscksp.h" 
PetscErrorCode KSPCGSetTRNormType(KSP ksp, KSPCGTRNormType normtype)

Logically Collective

Input Parameters#

  • ksp - the iterative context

  • normtype - the trust-region norm type

Options Database Key#

  • -ksp_cg_tr_norm_type (preconditioned|unpreconditioned) - select the trust-region norm

Notes#

Supported by KSPCG, KSPSTCG, KSPNASH, and KSPGLTR. The default is KSP_CG_TR_NORM_UNPRECONDITIONED. This choice does not change the residual norm selected by KSPSetNormType().

If the preconditioner applies \(M^{-1}\), KSP_CG_TR_NORM_PRECONDITIONED uses \(\sqrt{x^H M x}\) for the solution vector \(x\). The preconditioner must be symmetric positive definite. KSP_CG_TR_NORM_UNPRECONDITIONED uses the Euclidean norm.

KSPCG and KSPSTCG support nonzero initial guesses only with the Euclidean norm.

See Also#

KSP: Linear System Solvers, KSP, KSPCGTRNormType, KSPCGGetTRNormType(), KSPCGSetRadius(), KSPSetNormType()

Level#

advanced

Location#

src/ksp/ksp/impls/cg/cgtype.c

Examples#

src/ksp/ksp/tests/ex94.c

Implementations#

KSPCGSetTRNormType_CG() in src/ksp/ksp/impls/cg/cg.c
KSPCGSetTRNormType_GLTR() in src/ksp/ksp/impls/cg/gltr/gltr.c
KSPCGSetTRNormType_NASH() in src/ksp/ksp/impls/cg/nash/nash.c


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