# TAOCG
Nonlinear conjugate gradient method is an extension of the nonlinear conjugate gradient solver for nonlinear optimization. 
## Options Database Keys

- ***-tao_cg_eta <r> -*** restart tolerance
- ***-tao_cg_type <taocg_type> -*** cg formula
- ***-tao_cg_delta_min <r> -*** minimum delta value
- ***-tao_cg_delta_max <r> -*** maximum delta value



## Notes

## CG formulas are
"fr" - Fletcher-Reeves
"pr" - Polak-Ribiere
"prp" - Polak-Ribiere-Plus
"hs" - Hestenes-Steifel
"dy" - Dai-Yuan


## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/unconstrained/impls/cg/taocg.c.html#TAOCG">src/tao/unconstrained/impls/cg/taocg.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/unconstrained/tutorials/eptorsion2.c.html">src/tao/unconstrained/tutorials/eptorsion2.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/unconstrained/tutorials/eptorsion2f.F90.html">src/tao/unconstrained/tutorials/eptorsion2f.F90.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/unconstrained/tutorials/minsurf2.c.html">src/tao/unconstrained/tutorials/minsurf2.c.html</A><BR>


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


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