petsc-3.7.3 2016-08-01
Report Typos and Errors

TaoSetJacobianRoutine

Sets the function to compute the Jacobian as well as the location to store the matrix.

Synopsis

#include "petsctao.h" 
PetscErrorCode TaoSetJacobianRoutine(Tao tao, Mat J, Mat Jpre, PetscErrorCode (*func)(Tao, Vec, Mat, Mat, void*), void *ctx)
Logically collective on Tao

Input Parameters

tao - the Tao context
J - Matrix used for the jacobian
Jpre - Matrix that will be used operated on by preconditioner, can be same as J
jac - Jacobian evaluation routine
ctx - [optional] user-defined context for private data for the Jacobian evaluation routine (may be NULL)

Calling sequence of jac

   jac (Tao tao,Vec x,Mat *J,Mat *Jpre,void *ctx);

tao - the Tao context
x - input vector
J - Jacobian matrix
Jpre - preconditioner matrix, usually the same as J
ctx - [optional] user-defined Jacobian context

Level:intermediate
Location:
src/tao/interface/taosolver_hj.c
Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/tao/complementarity/examples/tutorials/minsurf1.c.html
src/tao/complementarity/examples/tutorials/blackscholes.c.html
src/tao/leastsquares/examples/tutorials/chwirut1.c.html