TaoAppSetObjectiveRoutine

Sets a routine that evaluates the function at the specified point.

Synopsis

#include "tao.h"  
int TaoAppSetObjectiveRoutine(TAO_APPLICATION taoapp, int (*func)(TAO_APPLICATION,Vec,double*,void*),void *ctx)
Collective on TAO_APPLICATION

Input Parameters

taoapp - the TAO_APPLICATION context
func - function evaluation routine
ctx - [optional] user-defined context for private data for the function and gradient evaluation routine (may be TAO_NULL)

Calling sequence of func

    func (TAO_APPLICATION taoapp, Vec x,double *f,void *ctx);

taoapp - the TAO_APPLICATION context
x - input vector
f - objective function value
ctx - [optional] user-defined function context

Note

Most applications do not need this routine. The routine TaoAppSetObjectiveFunctionGradient() is sufficient.

Keywords

TAO_APPLICATION, set, minimization, function

See Also

TaoAppSetHessianRoutine(), TaoAppSetObjectiveAndGradientRoutine(), TaoAppSetInitialSolutionVec()

Level:intermediate
Location:src/petsctao/application/petscapp/tao_app_fg.c
TAO Solver Index
Table of Contents