Skip to main content
`Ctrl`+`K`

# TaoTermRegister

Register an implementation of `TaoTerm`

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoTermRegister(const char sname[], PetscErrorCode (*func)(TaoTerm))

Not Collective, No Fortran Support

## Input Parameters

- sname - name of a new user-defined term

- func - routine to create the context for the `TaoTermType`

## Example Usage

       TaoTermRegister("my_term", MyTermCreate);

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

    TaoTermSetType(term, "my_term")

or at runtime via the option

    -tao_term_type my_term

## Note

`TaoTermRegister()` may be called multiple times to add multiple new `TaoTermType`.

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TaoTermSetType()`

## Level

advanced

## Location

src/tao/term/interface/taotermregi.c

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