MatFDColoringSetFunction#
Sets the function to use for computing the Jacobian.
Synopsis#
#include "petscmat.h"
PetscErrorCode MatFDColoringSetFunction(MatFDColoring matfd, MatFDColoringFn *f, void *fctx)
Logically Collective
Input Parameters#
matfd - the coloring context
f - the function, see
MatFDColoringFn
for the calling sequencefctx - the optional user-defined function context
Note#
This function is usually used automatically by SNES
(when one uses SNESSetJacobian()
with the argument
SNESComputeJacobianDefaultColor()
) and only needs to be used by someone computing a matrix via coloring directly by
calling MatFDColoringApply()
Fortran Note#
In Fortran you must call MatFDColoringSetFunction()
for a coloring object to
be used without SNES
or within the SNES
solvers.
See Also#
Mat
, MatFDColoring
, MatFDColoringCreate()
, MatFDColoringGetFunction()
, MatFDColoringSetFromOptions()
, MatFDColoringFn
Level#
advanced
Location#
Examples#
src/tao/unconstrained/tutorials/minsurf2.c
src/snes/tutorials/ex14.c
Index of all MatFD routines
Table of Contents for all manual pages
Index of all manual pages