:orphan:
# KSPGLTR
Code to run conjugate gradient method subject to a constraint on the solution norm. 
## Options Database Keys

- ***-ksp_cg_radius <r> -*** Trust Region Radius





## Notes
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 trust region constraint

|| s || <= delta,

where

delta is the trust region radius,
g is the gradient vector,
H is the Hessian approximation,
M is the positive definite preconditioner matrix.

`KSPConvergedReason` may have the additional values
```none
   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.
```


The operator and the preconditioner supplied must be symmetric and positive definite.

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


## Reference

- **** -*** Gould, N. and Lucidi, S. and Roma, M. and Toint, P., Solving the Trust-Region Subproblem using the Lanczos Method,
SIAM Journal on Optimization, volume 9, number 2, 1999, 504-525



## See Also
 [](ch_ksp), `KSPQCG`, `KSPNASH`, `KSPSTCG`, `KSPCreate()`, `KSPSetType()`, `KSPType`, `KSP`, `KSPCGSetRadius()`, `KSPCGGetNormD()`, `KSPCGGetObjFcn()`, `KSPGLTRGetMinEig()`, `KSPGLTRGetLambda()`, `KSPCG`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/impls/cg/gltr/gltr.c.html#KSPGLTR">src/ksp/ksp/impls/cg/gltr/gltr.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/impls/cg/gltr/gltr.c)


[Index of all KSP routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
