Skip to main content
`Ctrl`+`K`

# KSPQCG

Code to run conjugate gradient method subject to a constraint on the solution norm [Ste83].

## Options Database Key

- -ksp_qcg_trustregionradius r - Trust Region Radius

## Notes

This is rarely used directly, it is used in Trust Region methods for nonlinear equations, `SNESNEWTONTR`

Uses preconditioned conjugate gradient to compute an approximate minimizer of the quadratic function \( q(s) = g^T * s + .5 * s^T * H * s \) subject to the Euclidean norm trust region constraint \( || D * s || \le delta\), where

         delta is the trust region radius,
         g is the gradient vector, and
         H is Hessian matrix,
         D is a scaling matrix.

`KSPConvergedReason` may include

- `KSP_CONVERGED_NEG_CURVE` - if convergence is reached along a negative curvature direction,

- `KSP_CONVERGED_STEP_LENGTH` - if convergence is reached along a constrained step,

## Note

## Allows symmetric preconditioning with the following scaling matrices

          `PCNONE`:   D = Identity matrix
          `PCJACOBI`: D = diag [d_1, d_2, ...., d_n], where d_i = sqrt(H[i,i])
          `PCICC`:    D = L^T, implemented with forward and backward solves. Here L is an incomplete Cholesky factor of H.

## References

[Ste83]

Trond Steihaug. The conjugate gradient method and trust regions in large scale optimization. SIAM J. Numer. Anal., 20:626–637, 1983.

## See Also

KSP: Linear System Solvers, `KSPNASH`, `KSPGLTR`, `KSPSTCG`, `KSPCreate()`, `KSPSetType()`, `KSPType`, `KSP`, `KSPQCGSetTrustRegionRadius()`, `KSPQCGGetTrialStepNorm()`, `KSPQCGGetQuadratic()`

## Level

developer

## Location

src/ksp/ksp/impls/qcg/qcg.c

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