TaoTermObjectiveAndGradientFn — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# TaoTermObjectiveAndGradientFn

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

## Synopsis

    PETSC_EXTERN_TYPEDEF typedef PetscErrorCode(TaoTermObjectiveAndGradientFn)(TaoTerm term, Vec x, Vec params, PetscReal *value, Vec g);

## Calling Sequence

- term - a `TaoTerm`

- x - the solution vector

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

- value - output, the value of the term

- g - output, the gradient of the term

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TAOTERMSHELL`, `TaoTermShellSetObjectiveAndGradient()`, `TaoTermObjectiveFn`, `TaoTermGradientFn`, `TaoTermHessianFn`

## Level

intermediate

## Location

include/petsctaoterm.h

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