# TaoLineSearchCreate
Creates a TAO Line Search object.  Algorithms in TAO that use line-searches will automatically create one. 
## Synopsis
```
#include "petsctaolinesearch.h" 
PetscErrorCode TaoLineSearchCreate(MPI_Comm comm, TaoLineSearch *newls)
```
Collective


## Input Parameter

- ***comm -*** MPI communicator



## Output Parameter

- ***newls -*** the new TaoLineSearch context



## Available methods include

- ***more-*** thuente - the More-Thuente method
- ***gpcg -*** the GPCG method
- ***unit -*** Do not perform any line search



## Options Database Keys

- ***-tao_ls_type -*** select which method TAO should use





## See Also
 `TaoLineSearchSetType()`, `TaoLineSearchApply()`, `TaoLineSearchDestroy()`

## Level
beginner

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/linesearch/impls/armijo/armijo.c.html#TaoLineSearchCreate_Armijo">TaoLineSearchCreate_Armijo in src/tao/linesearch/impls/armijo/armijo.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/linesearch/impls/gpcglinesearch/gpcglinesearch.c.html#TaoLineSearchCreate_GPCG">TaoLineSearchCreate_GPCG in src/tao/linesearch/impls/gpcglinesearch/gpcglinesearch.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/linesearch/impls/morethuente/morethuente.c.html#TaoLineSearchCreate_MT">TaoLineSearchCreate_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#TaoLineSearchCreate_OWArmijo">TaoLineSearchCreate_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#TaoLineSearchCreate_Unit">TaoLineSearchCreate_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)  
