#include "petscts.h" PetscErrorCode TSSetRHSJacobian(TS ts,Mat Amat,Mat Pmat,TSRHSJacobian f,void *ctx)Logically Collective on TS
ts | - the TS context obtained from TSCreate() | |
Amat | - (approximate) Jacobian matrix | |
Pmat | - matrix from which preconditioner is to be constructed (usually the same as Amat) | |
f | - the Jacobian evaluation routine | |
ctx | - [optional] user-defined context for private data for the Jacobian evaluation routine (may be NULL) |
PetscErrorCode func (TS ts,PetscReal t,Vec u,Mat A,Mat B,void *ctx);
t | - current timestep | |
u | - input vector | |
Amat | - (approximate) Jacobian matrix | |
Pmat | - matrix from which preconditioner is to be constructed (usually the same as Amat) | |
ctx | - [optional] user-defined context for matrix evaluation routine |
The TS solver may modify the nonzero structure and the entries of the matrices Amat and Pmat between the calls to f() You should not assume the values are the same in the next call to f() as you set them in the previous call.