:orphan:
# TaoADMMSetRegularizerObjectiveAndGradientRoutine
Sets the user-defined regularizer call-back function 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoADMMSetRegularizerObjectiveAndGradientRoutine(Tao tao, PetscErrorCode (*func)(Tao, Vec, PetscReal *, Vec, void *), void *ctx)
```
Collective


## Input Parameters

- ***tao -*** the Tao context
- ***func -*** function pointer for the regularizer value and gradient evaluation
- ***ctx -*** user context for the regularizer





## See Also
 `TAOADMM`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/constrained/impls/admm/admm.c.html#TaoADMMSetRegularizerObjectiveAndGradientRoutine">src/tao/constrained/impls/admm/admm.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/constrained/tutorials/tomographyADMM.c.html">src/tao/constrained/tutorials/tomographyADMM.c</A><BR>


---
[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)  
