:orphan:
# TaoLineSearchCreate
Creates a `TaoLineSearch` object. Algorithms in `Tao` that use line-searches will automatically create one so this all is rarely needed
## Synopsis
```
#include "petsctaolinesearch.h"
PetscErrorCode TaoLineSearchCreate(MPI_Comm comm, TaoLineSearch *newls)
```
Collective
## Input Parameter
- ***comm -*** MPI communicator
## Output Parameter
- ***newls -*** the new `TaoLineSearch` context
## Options Database Key
- ***-tao_ls_type -*** select which method `Tao` should use
## See Also
[](ch_tao), `Tao`, `TaoLineSearch`, `TaoLineSearchType`, `TaoLineSearchSetType()`, `TaoLineSearchApply()`, `TaoLineSearchDestroy()`
## Level
developer
## Location
src/tao/linesearch/interface/taolinesearch.c
## Implementations
TaoLineSearchCreate_Armijo in src/tao/linesearch/impls/armijo/armijo.c
TaoLineSearchCreate_GPCG in src/tao/linesearch/impls/gpcglinesearch/gpcglinesearch.c
TaoLineSearchCreate_MT in src/tao/linesearch/impls/morethuente/morethuente.c
TaoLineSearchCreate_OWArmijo in src/tao/linesearch/impls/owarmijo/owarmijo.c
TaoLineSearchCreate_Unit in src/tao/linesearch/impls/unit/unit.c
---
[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](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)