:orphan:
# TaoADMMSetMisfitObjectiveAndGradientRoutine
Sets the user-defined misfit call-back function
## Synopsis
```
#include "petsctao.h"
PetscErrorCode TaoADMMSetMisfitObjectiveAndGradientRoutine(Tao tao, PetscErrorCode (*func)(Tao, Vec, PetscReal *, Vec, void *), void *ctx)
```
Collective
## Input Parameters
- ***tao -*** the `Tao` context
- ***func -*** function pointer for the misfit value and gradient evaluation
- ***ctx -*** user context for the misfit
## See Also
`TAOADMM`
## Level
advanced
## Location
src/tao/constrained/impls/admm/admm.c
## Examples
src/tao/constrained/tutorials/tomographyADMM.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/constrained/impls/admm/admm.c)
[Index of all Tao routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)