Skip to main content
`Ctrl`+`K`

# TaoTermSetType

Set the type of a `TaoTerm`

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoTermSetType(TaoTerm term, TaoTermType type)

Collective

## Input Parameters

- term - a `TaoTerm`

- type - a `TaoTermType`

## Options Database Keys

- -tao_term_type <type> - l1, halfl2squared, `TaoTermType` for complete list

## Notes

Use `TaoTermCreateShell()` to define a custom term using your own function definition

New types of `TaoTerm` can be created with `TaoTermRegister()`

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TaoTermType`, `TaoTermCreate()`, `TaoTermGetType()`, `TaoTermSetFromOptions()`, `TaoTermSetUp()`, `TaoTermView()`, `TaoTermDestroy()`

## Level

beginner

## Location

src/tao/term/interface/taoterm.c

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