SNESDAComputeJacobianWithAdic

This is a universal Jacobian evaluation routine that may be used with SNESSetJacobian() as long as the user context has a DMDA as its first record and DMDASetLocalAdicFunction() has been called.

Synopsis

#include "petscdmda.h"    
#include "petscpcmg.h"    
#include "petscdmmg.h"  
PetscErrorCode  SNESDAComputeJacobianWithAdic(SNES snes,Vec X,Mat *J,Mat *B,MatStructure *flag,void *ptr)
Collective on SNES

Input Parameters

snes - the SNES context
X - input vector
J - Jacobian
B - Jacobian used in preconditioner (usally same as J)
flag - indicates if the matrix changed its structure
ptr - optional user-defined context, as set by SNESSetFunction()

See Also

DMDASetLocalFunction(), DMDASetLocalAdicFunction(), SNESSetFunction(), SNESSetJacobian()

Level:intermediate
Location:
src/snes/utils/adutils/damgsnesad.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages