SNESComputeHessian

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

Synopsis

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 itis used internally within the nonlinear solvers.

See SLESSetOperators() for important information about setting theflag parameter.

SNESComputeHessian() is valid only forSNES_UNCONSTRAINED_MINIMIZATION methods. An analogous routine forSNES_NONLINEAR_EQUATIONS methods is SNESComputeJacobian().

Keywords

SNES, compute, Hessian, matrix

See Also

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

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