TaoTermComputeHessianFD#

Use finite difference to compute Hessian matrix.

Synopsis#

#include "petsctao.h" 
PetscErrorCode TaoTermComputeHessianFD(TaoTerm term, Vec x, Vec params, Mat H, Mat Hpre)

Collective

Input Parameters#

Output Parameters#

  • H - (optional) Hessian matrix

  • Hpre - (optional) Hessian preconditioning matrix

Options Database Keys#

Notes#

This routine is slow and expensive, and is not optimized to take advantage of sparsity in the problem. Although not recommended for general use in large-scale applications, it can be useful in checking the correctness of a user-provided Hessian. Call TaoTermComputeHessianSetUseFD() to start using this routine in TaoTermComputeHessian().

See Also#

TaoTerm: composable objective function terms, TaoTerm, TaoTermComputeHessian(), TaoTermGetFDDelta(), TaoTermSetFDDelta(), TaoTermComputeHessianSetUseFD(), TaoTermComputeHessianGetUseFD()

Level#

advanced

Location#

src/tao/term/utils/taotermfdiff.c


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