# TaoLineSearchSetFromOptions
Sets various TaoLineSearch parameters from user options. 
## Synopsis
```
#include "petsctaolinesearch.h" 
PetscErrorCode TaoLineSearchSetFromOptions(TaoLineSearch ls)
```
Collective


## Input Parameter

- ***ls -*** the TaoLineSearch context



## Options Database Keys

- ***-tao_ls_type <type> -*** The algorithm that TAO uses (more-thuente, gpcg, unit)
- ***-tao_ls_ftol <tol> -*** tolerance for sufficient decrease
- ***-tao_ls_gtol <tol> -*** tolerance for curvature condition
- ***-tao_ls_rtol <tol> -*** relative tolerance for acceptable step
- ***-tao_ls_stepinit <step> -*** initial steplength allowed
- ***-tao_ls_stepmin <step> -*** minimum steplength allowed
- ***-tao_ls_stepmax <step> -*** maximum steplength allowed
- ***-tao_ls_max_funcs <n> -*** maximum number of function evaluations allowed
- ***-tao_ls_view -*** display line-search results to standard output




## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/linesearch/interface/taolinesearch.c.html#TaoLineSearchSetFromOptions">src/tao/linesearch/interface/taolinesearch.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/linesearch/impls/armijo/armijo.c.html#TaoLineSearchSetFromOptions_Armijo">TaoLineSearchSetFromOptions_Armijo in src/tao/linesearch/impls/armijo/armijo.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/linesearch/impls/morethuente/morethuente.c.html#TaoLineSearchSetFromOptions_MT">TaoLineSearchSetFromOptions_MT in src/tao/linesearch/impls/morethuente/morethuente.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/linesearch/impls/owarmijo/owarmijo.c.html#TaoLineSearchSetFromOptions_OWArmijo">TaoLineSearchSetFromOptions_OWArmijo in src/tao/linesearch/impls/owarmijo/owarmijo.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/linesearch/impls/unit/unit.c.html#TaoLineSearchSetFromOptions_Unit">TaoLineSearchSetFromOptions_Unit in src/tao/linesearch/impls/unit/unit.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/linesearch/interface/taolinesearch.c)


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