TaoSetJacobianResidualRoutine#
Sets the function to compute the least-squares residual Jacobian as well as the location to store the matrix.
Synopsis#
#include "petsctao.h" 
PetscErrorCode TaoSetJacobianResidualRoutine(Tao tao, Mat J, Mat Jpre, PetscErrorCode (*func)(Tao tao, Vec x, Mat J, Mat Jpre, void *ctx), void *ctx)
Logically Collective
Input Parameters#
- tao - the - Taocontext
- J - Matrix used for the jacobian 
- Jpre - Matrix that will be used to construct the preconditioner, can be same as - J
- func - Jacobian evaluation routine 
- ctx - [optional] user-defined context for private data for the Jacobian evaluation routine (may be - NULL)
Calling sequence of func#
- tao - the - Taocontext
- x - input vector 
- J - Jacobian matrix 
- Jpre - matrix used to construct the preconditioner, usually the same as - J
- ctx - [optional] user-defined Jacobian context 
See Also#
TAO: Optimization Solvers, Tao, TaoSetGradient(), TaoSetObjective()
Level#
intermediate
Location#
Examples#
src/tao/leastsquares/tutorials/tomography.c
src/tao/leastsquares/tutorials/cs1.c
src/tao/leastsquares/tutorials/chwirut1.c
Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages