# TaoComputeJacobian
Computes the Jacobian matrix that has been set with TaoSetJacobianRoutine(). 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoComputeJacobian(Tao tao, Vec X, Mat J, Mat Jpre)
```
Collective


## Input Parameters

- ***tao -*** the Tao solver context
- ***X   -*** input vector



## Output Parameters

- ***J    -*** Jacobian matrix
- ***Jpre -*** Preconditioning matrix



## Notes
Most users should not need to explicitly call this routine, as it
is used internally within the minimization solvers.

`TaoComputeJacobian()` is typically used within minimization
implementations, so most users would not generally call this routine
themselves.




## See Also
 `TaoComputeObjective()`, `TaoComputeObjectiveAndGradient()`, `TaoSetJacobianRoutine()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/interface/taosolver_hj.c.html#TaoComputeJacobian">src/tao/interface/taosolver_hj.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/interface/taosolver_hj.c)


[Index of all Tao routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
