petsc-3.4.5 2014-06-29

DMPlexComputeJacobianFEM

Form the local portion of the Jacobian matrix J at the local solution X using pointwise functions specified by the user.

Synopsis

#include "petscdmplex.h"   
PetscErrorCode DMPlexComputeJacobianFEM(DM dm, Vec X, Mat Jac, Mat JacP, MatStructure *str,void *user)

Input Parameters

dm - The mesh
X - Local input vector
user - The user context

Output Parameter

Jac -Jacobian matrix

Note

The second member of the user context must be an FEMContext.

We form the residual one batch of elements at a time. This allows us to offload work onto an accelerator, like a GPU, or vectorize on a multicore machine.

See Also

FormFunctionLocal()

Level:developer
Location:
src/dm/impls/plex/plexfem.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/snes/examples/tutorials/ex12.c.html
src/snes/examples/tutorials/ex31.c.html
src/snes/examples/tutorials/ex62.c.html