petsc-3.12.5 2020-03-29
TaoDefaultComputeHessian
Computes the Hessian using finite differences.
Synopsis
#include "petsctao.h"
PetscErrorCode TaoDefaultComputeHessian(Tao tao,Vec V,Mat H,Mat B,void *dummy)
Collective on Tao
Input Parameters
| tao | - the Tao context
|
| V | - compute Hessian at this point
|
| dummy | - not used
|
Output Parameters
| H | - Hessian matrix (not altered in this routine)
|
| B | - newly computed Hessian matrix to use with preconditioner (generally the same as H)
|
Options Database Key
-tao_fd_hessian -activates TaoDefaultComputeHessian()
Notes
This routine is slow and expensive, and is not currently optimized
to take advantage of sparsity in the problem. Although
TaoDefaultComputeHessian() is not recommended for general use
in large-scale applications, It can be useful in checking the
correctness of a user-provided Hessian.
See Also
TaoSetHessianRoutine(), TaoDefaultComputeHessianColor(), SNESComputeJacobianDefault(), TaoSetGradientRoutine(), TaoDefaultComputeGradient()
Level
advanced
Location
src/tao/interface/fdiff.c
Examples
src/tao/unconstrained/examples/tutorials/minsurf2.c.html
Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages