SNESComputeHessian

Computes the Hessian matrix that has been set with SNESSetHessian().

Synopsis

#include "snes.h"  
int SNESComputeHessian(SNES snes,Vec x,Mat *A,Mat *B,MatStructure *flag)
Collective on SNES and Mat

Input Parameters

snes - the SNES context
x - input vector

Output Parameters

A - Hessian matrix
B - optional preconditioning matrix
flag - flag indicating matrix structure

Notes

Most users should not need to explicitly call this routine, as it is used internally within the nonlinear solvers.

See SLESSetOperators() for important information about setting the flag parameter.

SNESComputeHessian() is valid only for SNES_UNCONSTRAINED_MINIMIZATION methods. An analogous routine for SNES_NONLINEAR_EQUATIONS methods is SNESComputeJacobian().

SNESComputeHessian() is typically used within minimization implementations, so most users would not generally call this routine themselves.

Keywords

SNES, compute, Hessian, matrix

See Also

SNESSetHessian(), SLESSetOperators(), SNESComputeGradient(),
SNESComputeMinimizationFunction()

Level:developer
Location:src/snes/interface/snes.c
SNES Index
Table of Contents