Skip to main content
`Ctrl`+`K`

# TaoTermComputeHessianSetUseFD

Set whether to use finite differences instead of the user-provided or built-in methods in `TaoTermComputeHessian()`.

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoTermComputeHessianSetUseFD(TaoTerm term, PetscBool use_fd)

Logically collective

## Input Parameters

- term - a `TaoTerm`

- use_fd - `PETSC_TRUE` to use finite differences, `PETSC_FALSE` to use the user-provided or built-in Hessian method

## Options Database Keys

- -tao_term_hessian_use_fd <bool> - use finite differences for Hessian computation

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TaoTermGetFDDelta()`, `TaoTermSetFDDelta()`, `TaoTermComputeGradientFD()`, `TaoTermComputeGradientSetUseFD()`, `TaoTermComputeGradientGetUseFD()`, `TaoTermComputeHessianFD()`, `TaoTermComputeHessianGetUseFD()`

## Level

advanced

## Location

src/tao/term/interface/taoterm.c

## Examples

src/tao/unconstrained/tutorials/rosenbrock1_taoterm.c

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