TSDefaultComputeJacobian

Computes the Jacobian using finite differences.

Synopsis

#include "petscmat.h"  
#include "petscts.h"  
PetscErrorCode TSDefaultComputeJacobian(TS ts,PetscReal t,Vec xx1,Mat *J,Mat *B,MatStructure *flag,void *ctx)

Input Parameters

ts - TS context
xx1 - compute Jacobian at this point
ctx - application's function context, as set with SNESSetFunction()

Output Parameters

J - Jacobian
B - preconditioner, same as Jacobian
flag - matrix flag

Notes

This routine is slow and expensive, and is not optimized.

Sparse approximations using colorings are also available and would be a much better alternative!

See Also

TSDefaultComputeJacobianColor()

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