petsc-3.7.1 2016-05-15
Report Typos and Errors

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 Many br

Input Parameters

tao - the Tao context Many br
V - compute Hessian at this point Many br
dummy - not used Many br

Output Parameters

H - Hessian matrix (not altered in this routine) Many br
B - newly computed Hessian matrix to use with preconditioner (generally the same as H) Many br

Options Database Key

-tao_fd - Activates TaoDefaultComputeHessian() Many br
-tao_view_hessian - view the hessian after each evaluation using PETSC_VIEWER_STDOUT_WORLD Many br

Many br

Notes

This routine is slow and expensive, and is not currently optimized Many brto take advantage of sparsity in the problem. Although Many brTaoDefaultComputeHessian() is not recommended for general use Many brin large-scale applications, It can be useful in checking the Many brcorrectness of a user-provided Hessian. Many br

See Also

TaoSetHessianRoutine(), TaoDefaultComputeHessianColor(), SNESComputeJacobianDefault(), TaoSetGradientRoutine(), TaoDefaultComputeGradient()

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

Examples

src/tao/unconstrained/examples/tutorials/minsurf2.c.html