petsc-3.7.1 2016-05-15
MatFDColoringSetFunction
Sets the function to use for computing the Jacobian.
Synopsis
#include "petscmat.h"
PetscErrorCode MatFDColoringSetFunction(MatFDColoring matfd,PetscErrorCode (*f)(void),void *fctx)
Logically Collective on MatFDColoring Many br
Input Parameters
| coloring | - the coloring context Many br |
| f | - the function Many br |
| fctx | - the optional user-defined function context Many br |
Calling sequence of (*f) function
For SNES: PetscErrorCode (*f)(SNES,Vec,Vec,void*) Many brIf not using SNES: PetscErrorCode (*f)(void *dummy,Vec,Vec,void*) and dummy is ignored Many br
Many br
Notes: This function is usually used automatically by SNES (when one uses SNESSetJacobian() with the argument Many brSNESComputeJacobianDefaultColor()) and only needs to be used by someone computing a matrix via coloring directly by Many brcalling MatFDColoringApply() Many br
Fortran Notes
In Fortran you must call MatFDColoringSetFunction() for a coloring object to Many brbe used without SNES or within the SNES solvers. Many br
Keywords
Mat, Jacobian, finite differences, set, function
See Also
MatFDColoringCreate(), MatFDColoringGetFunction(), MatFDColoringSetFromOptions()
Level:advanced
Location:src/mat/matfd/fdmatrix.c
Index of all MatFD routines
Table of Contents for all manual pages
Index of all manual pages
Examples
src/snes/examples/tutorials/ex5s.c.html
src/snes/examples/tutorials/ex14.c.html
src/tao/unconstrained/examples/tutorials/minsurf2.c.html