:orphan:
# TaoSetType
Sets the `TaoType` for the minimization solver. 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoSetType(Tao tao, TaoType type)
```
Collective


## Input Parameters

- ***solver -*** the `Tao` solver context
- ***type -*** a known method



## Options Database Key

- ***-tao_type <type> -*** Sets the method; use -help for a list
of available methods (for instance, "-tao_type lmvm" or "-tao_type tron")





## See Also
 [](ch_tao), `Tao`, `TaoCreate()`, `TaoGetType()`, `TaoType`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/interface/taosolver.c.html#TaoSetType">src/tao/interface/taosolver.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/bound/tutorials/jbearing2.c.html">src/tao/bound/tutorials/jbearing2.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/bound/tutorials/plate2.c.html">src/tao/bound/tutorials/plate2.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/bound/tutorials/plate2f.F90.html">src/tao/bound/tutorials/plate2f.F90</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/complementarity/tutorials/blackscholes.c.html">src/tao/complementarity/tutorials/blackscholes.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/complementarity/tutorials/minsurf1.c.html">src/tao/complementarity/tutorials/minsurf1.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/constrained/tutorials/ex1.c.html">src/tao/constrained/tutorials/ex1.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/constrained/tutorials/maros.c.html">src/tao/constrained/tutorials/maros.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/constrained/tutorials/tomographyADMM.c.html">src/tao/constrained/tutorials/tomographyADMM.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/leastsquares/tutorials/chwirut1.c.html">src/tao/leastsquares/tutorials/chwirut1.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/leastsquares/tutorials/chwirut1f.F90.html">src/tao/leastsquares/tutorials/chwirut1f.F90</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/leastsquares/tutorials/chwirut2.c.html">src/tao/leastsquares/tutorials/chwirut2.c</A><BR>


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


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