# DAAppSetObjectiveRoutine

Set a routine that will evaluate the objective function on the given DA at the given point.

## Synopsis

    #include "taodaapplication.h"
    int DAAppSetObjectiveRoutine(TAO_APPLICATION daapplication, int (*func)(TAO_APPLICATION,DA,Vec,double*, void*),void *ctx)

Collective on TAO_APPLICATION

## Input Parameters

| daapplication | - the DA Application object
| func | - the function pointer for the objecive evaluation routine
| ctx | - the monitor context

## Calling sequence of func

        func(TAO_APPLICATION daapplication,DA da,Vec x,double *f,void *ctx);

| daapplication | - the TAO_APPLICATION context
| da | - the Distributed Array
| x | - input vector
| f | - application sets equal to the function value
| ctx | - user-defined function context set from DAAppSetObjectiveRoutine()

## Keywords

DA, objective

## See Also

DAAppSetObjectiveAndGradientRoutine();

Level:beginner
Location:src/petsctao/gridapplication/interface/daapp.c
TAO DA Application Index
Table of Contents