#include "petsctao.h" PetscErrorCode TaoSetJacobianDesignRoutine(Tao tao, Mat J, PetscErrorCode (*func)(Tao, Vec, Mat, void*), void *ctx)Logically collective on Tao
tao | - the Tao context | |
J | - Matrix used for the jacobian | |
jac | - Jacobian evaluation routine | |
ctx | - [optional] user-defined context for private data for the Jacobian evaluation routine (may be NULL) |
jac (Tao tao,Vec x,Mat *J,void *ctx);
tao | - the Tao context | |
x | - input vector | |
J | - Jacobian matrix | |
ctx | - [optional] user-defined Jacobian context |
The function jac() takes Mat * as the matrix arguments rather than Mat. This allows the Jacobian evaluation routine to replace A and/or B with a completely new new matrix structure (not just different matrix elements) when appropriate, for instance, if the nonzero structure is changing throughout the global iterations.
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