DAGetColoring

Gets the coloring required for computing the Jacobian via finite differences on a function defined using a stencil on the DA.

Synopsis

#include "petscda.h"     
#include "petscmat.h"    
int DAGetColoring(DA da,ISColoring *coloring,Mat *J)
Collective on DA

Input Parameter

da -the distributed array

Output Parameters

coloring - matrix coloring for use in computing Jacobians (or PETSC_NULL if not needed)
J - matrix with the correct nonzero structure (or PETSC_NULL if not needed) (obviously without the correct Jacobian values)

See Also

ISColoringView(), ISColoringGetIS(), MatFDColoringCreate()

Level:advanced
Location:
src/dm/da/utils/fdda.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/snes/examples/tutorials/ex5c.c
src/snes/examples/tutorials/ex7.c
src/snes/examples/tutorials/ex8.c
src/snes/examples/tutorials/ex9.c