TaoTermComputeGradient#
Evaluate the gradient of a TaoTerm for a given solution vector and parameter vector
Synopsis#
#include "petsctao.h"
PetscErrorCode TaoTermComputeGradient(TaoTerm term, Vec x, Vec params, Vec g)
Collective
Input Parameters#
term - a
TaoTermrepresenting a parametric function \(f(x; p)\)x - the solution variable \(x\) in \(f(x; p)\)
params - the parameters \(p\) in \(f(x; p)\) (may be NULL if the term is not parametric)
Output Parameter#
g - the value of \(\nabla_x f(x; p)\)
See Also#
TaoTerm: composable objective function terms,
TaoTerm,
TaoTermComputeObjective(),
TaoTermComputeObjectiveAndGradient(),
TaoTermComputeHessian(),
TaoTermShellSetGradient()
Level#
developer
Location#
Implementations#
TaoTermComputeGradient_Callbacks() in src/tao/term/impls/callbacks/taotermcallbacks.c
TaoTermComputeGradient_Halfl2squared() in src/tao/term/impls/halfl2squared/taotermhalfl2squared.c
TaoTermComputeGradient_L1() in src/tao/term/impls/l1/taoterml1.c
TaoTermComputeGradient_Quadratic() in src/tao/term/impls/quadratic/taotermquadratic.c
TaoTermComputeGradient_Test() in src/tao/term/impls/shell/tests/ex1.c
TaoTermComputeGradient_Sum() in src/tao/term/impls/sum/taotermsum.c
Index of all TaoTerm routines
Table of Contents for all manual pages
Index of all manual pages