TSDefaultComputeJacobianWithColoring

Computes the Jacobian using finite differences and coloring to exploit matrix sparsity.

Synopsis

int TSDefaultComputeJacobianWithColoring(TS ts,double t,Vec x1,Mat *J,Mat *B,MatStructure *flag,void *ctx)

Input Parameters

ts -nonlinear solver object
t -current time
x1 -location at which to evaluate Jacobian
ctx -coloring context, where
     ctx must have type MatFDColoring, 
     as created via MatFDColoringCreate()

Output Parameters

J -Jacobian matrix (not altered in this routine)
B -newly computed Jacobian matrix to use with preconditioner (generally the same as J)
flag -flag indicating whether the matrix sparsity structure has changed

Collective on TS, Vec and Mat

Options Database Keys

 -mat_fd_coloring_freq <freq> 

Keywords

TS, finite differences, Jacobian, coloring, sparse

See Also

TSSetJacobian()

Location: src/ts/interface/tsfd.c
Time Stepping
Table of Contents