SNESComputeJacobian

Computes the Jacobian matrix that has been set with SNESSetJacobian().

Synopsis

int SNESComputeJacobian(SNES snes,Vec X,Mat *A,Mat *B,MatStructure *flg)
Collective on SNES and Mat

Input Parameters

snes - the SNES context
x - input vector

Output Parameters

A - Jacobian 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.

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

SNESComputeJacobian() is typically used within nonlinear solver implementations, so most users would not generally call this routine themselves.

Keywords

SNES, compute, Jacobian, matrix

See Also

SNESSetJacobian(), SLESSetOperators()

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