tao-2.1-p0 2012-07-24

TaoDefaultComputeHessian

Computes the Hessian using finite differences.

Synopsis

#include "taosolver.h"  
PetscErrorCode TaoDefaultComputeHessian(TaoSolver tao,Vec V,Mat *H,Mat *B,
                           MatStructure *flag,void *dummy)
Collective on TaoSolver

Input Parameters

tao - the TaoSolver 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)
flag - flag indicating whether the matrix sparsity structure has changed

Options Database Key

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

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(), SNESDefaultComputeJacobian(), TaoSetGradientRoutine(), TaoDefaultComputeGradient()

Level:advanced
Location:src/interface/fdiff.c
TAO Solver Index
Table of Contents

Examples

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