# TaoRegister
Adds a method to the Tao package for unconstrained minimization. 
## Synopsis
```
TaoRegister(char *name_solver,char *path,char *name_Create,PetscErrorCode (*routine_Create)(Tao))
```
Not collective


## Input Parameters

- ***sname -*** name of a new user-defined solver
- ***func -*** routine to Create method context



## Note
`TaoRegister()` may be called multiple times to add several user-defined solvers.


## Sample usage
```none
   TaoRegister("my_solver",MySolverCreate);
```


Then, your solver can be chosen with the procedural interface via
```none
TaoSetType(tao,"my_solver")
```
or at runtime via the option
```none
-tao_type my_solver
```




## See Also
 `Tao`, `TaoSetType()`, `TaoRegisterAll()`, `TaoRegisterDestroy()`

## Level
advanced

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


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
