# SNESLINESEARCHCP
Critical point line search. This line search assumes that there exists some artificial G(x) for which the `SNESFunction` F(x) = grad G(x).  Therefore, this line search seeks to find roots of dot(F, Y) via a secant method. 
## Options Database Keys

- ***-snes_linesearch_minlambda <minlambda> -*** the minimum acceptable lambda
- ***-snes_linesearch_maxstep <length> -*** the algorithm insures that a step length is never longer than this value
- ***-snes_linesearch_damping <damping> -*** initial trial step length is scaled by this factor, default is 1.0
- ***-snes_linesearch_max_it <max_it> -*** the maximum number of secant steps performed.



## Notes
This method does NOT use the objective function if it is provided with `SNESSetObjective()`.

This method is the preferred line search for `SNESQN` and `SNESNCG`.




## See Also
 `SNESLineSearch`, `SNESLineSearchType`, `SNESLineSearchCreate()`, `SNESLineSearchSetType()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/linesearch/impls/cp/linesearchcp.c.html#SNESLINESEARCHCP">src/snes/linesearch/impls/cp/linesearchcp.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/linesearch/impls/cp/linesearchcp.c)


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