petsc-3.10.5 2019-03-28
Report Typos and Errors

# TaoLineSearchComputeGradient

Computes the gradient of the objective function

### Synopsis

    #include "petsctaolinesearch.h"
    PetscErrorCode TaoLineSearchComputeGradient(TaoLineSearch ls, Vec x, Vec g)

Collective on TaoLineSearch

### Input Parameters

| ls | - the TaoLineSearch context
| x | - input vector

### Output Parameter

g -gradient vector

### Notes

TaoComputeGradient() is typically used within line searches so most users would not generally call this routine themselves.

### See Also

TaoLineSearchComputeObjective(), TaoLineSearchComputeObjectiveAndGradient(), TaoLineSearchSetGradient()

### Level

developer

### Location

src/tao/linesearch/interface/taolinesearch.c
Index of all TaoLineSearch routines
Table of Contents for all manual pages
Index of all manual pages