:orphan:
# TaoBRGNSetRegularizerHessianRoutine
Sets the user-defined regularizer call-back function into the algorithm.
## Synopsis
```
#include "petsctao.h"
PetscErrorCode TaoBRGNSetRegularizerHessianRoutine(Tao tao, Mat Hreg, PetscErrorCode (*func)(Tao, Vec, Mat, void *), void *ctx)
```
## Input Parameters
- ***tao -*** the `Tao` context
- ***Hreg -*** user-created matrix for the Hessian of the regularization term
- ***func -*** function pointer for the regularizer Hessian evaluation
- ***ctx -*** user context for the regularizer Hessian
## Calling Sequence of `func`
```none
PetscErrorCode func(Tao tao, Vec u, Mat H, void *ctx)
```
- ***tao -*** the `Tao` context
- ***u -*** the location at which to compute the Hessian
- ***Hreg -*** user-created matrix for the Hessian of the regularization term
- ***ctx -*** user context for the regularizer Hessian
## See Also
`Tao`, `Mat`, `TAOBRGN`
## Level
advanced
## Location
src/tao/leastsquares/impls/brgn/brgn.c
## Examples
src/tao/leastsquares/tutorials/tomography.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/leastsquares/impls/brgn/brgn.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)