# TaoAppComputeHessian

Compute the Hessian of the objective function using the routine set by TaoApplicationSetGradientRoutine().

## Synopsis

    #include "tao.h"
    int TaoAppComputeHessian(TAO_APPLICATION taoapp, Vec X, Mat *HH, Mat *HHPre, MatStructure *flag)

Collective on TAO_APPLICATION

## Input Parameters

| taopp | - the TAO_APPLICATION context
| X | - the variable vector
| H | - the Hessian matrix
| HP | - the preconditioner for the Hessian matrix.
| flag | - flag used in KSPSetOperators()

## Output Parameter

| H | - the Hessian matrix
| HP | - the preconditioner for the Hessian matrix.
| flag | - flag used in KSPSetOperators()

## Keywords

TAO_APPLICATION, objective

## See Also

TaoAppComputeObjectiveAndGradient()

Level:developer
Location:src/petsctao/application/petscapp/tao_app_fg.c
TAO Solver Index
Table of Contents