Skip to main content
`Ctrl`+`K`

# TaoDefaultComputeHessianMFFD

Computes the Hessian using finite differences with `MATMFFD`.

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoDefaultComputeHessianMFFD(Tao tao, Vec X, Mat H, Mat B, PetscCtx ctx)

Collective

## Input Parameters

- tao - the `Tao` context

- X - compute Hessian at this point

- ctx - ignored

## Output Parameters

- H - Hessian matrix of type `MATMFFD`

- B - should be `NULL` or equal to `H`

## Note

This can be passed to `TaoSetHessian()` to use `MATMFFD` for approximate Hessian-vector products. The matrix `H` can originate from `MatCreateMFFD()` or from `TaoTermCreateHessianMFFD()`.

## See Also

`Tao`, `MATMFFD`, `MatCreateMFFD()`, `TaoTermCreateHessianMFFD()`

## Level

advanced

## Location

src/tao/interface/fdiff.c

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