SNESGetGradient
Returns the vector where the gradient is stored.
Synopsis
#include "snes.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
SNES Index
Table of Contents