Skip to main content
`Ctrl`+`K`

# TaoRegister

Adds a method to the Tao package for minimization.

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoRegister(const char sname[], PetscErrorCode (*func)(Tao tao))

Not Collective, No Fortran Support

## Input Parameters

- sname - name of a new user-defined solver

- func - routine to create `TaoType` specific method context

## Calling sequence of `func`

- tao - the `Tao` object to be created

## Example Usage

       TaoRegister("my_solver", MySolverCreate);

Then, your solver can be chosen with the procedural interface via

      TaoSetType(tao, "my_solver")

or at runtime via the option

      -tao_type my_solver

## Note

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

## See Also

TAO: Optimization Solvers, `Tao`, `TaoSetType()`, `TaoRegisterAll()`, `TaoRegisterDestroy()`

## Level

advanced

## Location

src/tao/interface/taosolver.c

Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages