TaoGetTerm#
Get the entire objective function of the Tao as a single TaoTerm in the form \(\alpha f(Ax; p)\), where \(\alpha\) is a scaling coefficient, \(f\) is a TaoTerm, \(A\) is an (optional) map and \(p\) are the parameters of \(f\).
Synopsis#
#include "petsctao.h"
PetscErrorCode TaoGetTerm(Tao tao, PetscReal *scale, TaoTerm *term, Vec *params, Mat *map)
Not collective
Input Parameter#
tao - a
Taocontext
Output Parameters#
scale - the scale of the term
term - a
TaoTermfor the real-valued function defining the objectiveparams - the vector of parameters for
term, orNULLif no parameters were specified fortermmap - a map from the solution space of
taoto the solution space ofterm, ifNULLthen the map is the identity
Notes#
If the objective function was defined by providing function callbacks directly to Tao (for example, with TaoSetObjectiveAndGradient()), then
TaoGetTerm will return a TaoTerm with the type TAOTERMCALLBACKS that encapsulates
those functions.
If multiple TaoTerms were provided to Tao via, for example, TaoAddTerm(), or in combination with giving functions directly to Tao, then the type TAOTERMSUM is returned.
See Also#
TAO: Optimization Solvers, Tao, TaoTerm, TAOTERMSUM, TaoAddTerm()
Level#
intermediate
Location#
Examples#
src/tao/unconstrained/tutorials/elastic_net_regularization.c
Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages