int DAAppSetElementObjectiveAndGradientRoutine(TAO_APPLICATION daapplication, int (*funcgrad)(PetscInt[2],PetscScalar[4],double*,PetscScalar[4],void*),
PetscInt flops, void *ctx)
Collective on TAO_APPLICATION
| daapp | - the TAO_APPLICATION solver context | |
| funcgrad | - local function gradient routine | |
| flops | - the number of flops done performed in the funcgrad routine | |
| fgctx | - [optional] user-defined context for private data for the evaluation. |
int funcgrad(int coordinates[2], PetscScalar x[4], double *f, PetscScalar g[4], void* ctx)
| coord | - the global coordinates [i j] in each direction of the DA | |
| x | - the variables on the DA ( da[j][i], da[j][j+1], da[j+1][i], da[j+1][i+1] ) (bottom left, bottom right, top left, top right) | |
| f | - the local function value | |
| g | - the gradient of this local function for with respect to each variable | |
| ctx | - user defined context |
Level:intermediate
Location:src/petsctao/gridapplication/element/daelement.c
TAO DA Application Index
Table of Contents