Skip to main content
`Ctrl`+`K`

# TaoTermGradientFn

A prototype of a `TaoTerm` function that would be passed to `TaoTermShellSetGradient()`

## Synopsis

    PETSC_EXTERN_TYPEDEF typedef PetscErrorCode(TaoTermGradientFn)(TaoTerm term, Vec x, Vec params, Vec g);

## Calling Sequence

- term - a `TaoTerm`

- x - the solution vector

- params - the parameters vector (for some `TaoTerm` this may be `NULL`, see `TaoTermGetParametersMode()`)

- g - output, the gradient of the term

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TAOTERMSHELL`, `TaoTermShellSetGradient()`, `TaoTermObjectiveFn`, `TaoTermObjectiveAndGradientFn`, `TaoTermHessianFn`

## Level

intermediate

## Location

include/petsctaoterm.h

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