SNESGetGradient

Returns the vector where the gradient is stored.

Synopsis

#include "petscsnes.h"  
int SNESGetGradient(SNES snes,Vec *r,void **ctx)
Not Collective, but Vec is parallel if SNES is parallel

Input Parameter

snes -the SNES context

Output Parameter

r - the gradient (or PETSC_NULL)
ctx - the gradient context (or PETSC_NULL)

Notes

SNESGetGradient() is valid for SNES_UNCONSTRAINED_MINIMIZATION methods only. An analogous routine for SNES_NONLINEAR_EQUATIONS methods is SNESGetFunction().

Keywords

SNES, nonlinear, get, gradient

See Also

SNESGetMinimizationFunction(), SNESGetSolution(), SNESGetFunction(),
SNESSetGradient(), SNESSetFunction()

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