SNESComputeGradient

Computes the gradient that has been set with SNESSetGradient().

Synopsis

#include "petscsnes.h"  
int SNESComputeGradient(SNES snes,Vec x,Vec y)
Collective on SNES

Input Parameters

snes - the SNES context
x - input vector

Output Parameter

y -gradient vector

Notes

SNESComputeGradient() is valid only for SNES_UNCONSTRAINED_MINIMIZATION methods. An analogous routine for SNES_NONLINEAR_EQUATIONS methods is SNESComputeFunction().

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

Keywords

SNES, nonlinear, compute, gradient

See Also

SNESSetGradient(), SNESGetGradient(),
SNESComputeMinimizationFunction(), SNESComputeHessian()

Level:developer
Location:
src/snes/interface/snes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages