petsc-3.7.1 2016-05-15
Report Typos and Errors

TSAdjointSetRHSJacobian

Sets the function that computes the Jacobian of G w.r.t. the parameters p where y_t = G(y,p,t), as well as the location to store the matrix.

Synopsis

#include "petscts.h"  
PetscErrorCode  TSAdjointSetRHSJacobian(TS ts,Mat Amat,PetscErrorCode (*func)(TS,PetscReal,Vec,Mat,void*),void *ctx)
Logically Collective on TS Many br

Input Parameters

ts - The TS context obtained from TSCreate() Many br
func - The function Many br

Calling sequence of func

func (TS ts,PetscReal t,Vec y,Mat A,void *ctx);
t - current timestep Many br
y - input vector (current ODE solution) Many br
A - output matrix Many br
ctx - [optional] user-defined function context Many br

Many br

Notes: Amat has the same number of rows and the same row parallel layout as u, Amat has the same number of columns and parallel layout as p Many br

Keywords

TS, sensitivity

See Also


Level:intermediate
Location:
src/ts/interface/ts.c
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ts/examples/tutorials/ex16adj.c.html
src/ts/examples/tutorials/ex16opt_p.c.html
src/ts/examples/tutorials/ex20adj.c.html
src/ts/examples/tutorials/ex20opt_p.c.html