tao-2.1-p0 2012-07-24

TaoSetObjectiveRoutine

Sets the function evaluation routine for minimization

Synopsis

#include "taosolver.h" 
PetscErrorCode TaoSetObjectiveRoutine(TaoSolver tao, PetscErrorCode (*func)(TaoSolver, Vec, PetscReal*,void*),void *ctx) 
Logically collective on TaoSolver

Input Parameter

tao - the TaoSolver context
func - the objective function
ctx - [optional] user-defined context for private data for the function evaluation routine (may be PETSC_NULL)

Calling sequence of func

     func (TaoSolver tao, Vec x, PetscReal *f, void *ctx);

x - input vector
f - function value
ctx - [optional] user-defined function context

See Also

TaoSetGradientRoutine(), TaoSetHessianRoutine() TaoSetObjectiveAndGradientRoutine()

Level:beginner
Location:src/interface/taosolver_fg.c
TAO Solver Index
Table of Contents

Examples

src/pde_constrained/examples/tutorials/elliptic.c.html
src/pde_constrained/examples/tutorials/parabolic.c.html
src/pde_constrained/examples/tutorials/hyperbolic.c.html