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

TSComputeIJacobianDefaultColor

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

Synopsis

#include "petscts.h"  
PetscErrorCode TSComputeIJacobianDefaultColor(TS ts,PetscReal t,Vec U,Vec Udot,PetscReal shift,Mat J,Mat B,void *ctx)
Collective on SNES Many br

Input Parameters

ts - the TS context Many br
t - current timestep Many br
U - state vector Many br
Udot - time derivative of state vector Many br
shift - shift to apply, see note below Many br
ctx - an optional user context Many br

Output Parameters

J - Jacobian matrix (not altered in this routine) Many br
B - newly computed Jacobian matrix to use with preconditioner (generally the same as J) Many br

Many br

Notes

If F(t,U,Udot)=0 is the DAE, the required Jacobian is Many br

dF/dU + shift*dF/dUdot Many br

Most users should not need to explicitly call this routine, as it Many bris used internally within the nonlinear solvers. Many br

This will first try to get the coloring from the DM. If the DM type has no coloring Many brroutine, then it will try to get the coloring from the matrix. This requires that the Many brmatrix have nonzero entries precomputed. Many br

Keywords

TS, finite differences, Jacobian, coloring, sparse

See Also

TSSetIJacobian(), MatFDColoringCreate(), MatFDColoringSetFunction()

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