petsc-3.3-p7 2013-05-11

DMSetFunction

sets a function to compute the right hand side vector entries for the KSP solver or nonlinear function for SNES

Synopsis

#include "petscdm.h"     
PetscErrorCode  DMSetFunction(DM dm,PetscErrorCode (*f)(DM,Vec,Vec))
Logically Collective on DM

Input Parameter

dm - the DM object
f - the function to compute (use PETSC_NULL to cancel a previous function that was set)

Notes: This sets both the function for function evaluations and the function used to compute Jacobians via finite differences if no Jacobian computer is provided with DMSetJacobian(). Canceling cancels the function, but not the function used to compute the Jacobian.

See Also

DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMGetApplicationContext(), DMSetInitialGuess(),
DMSetJacobian()

Level:intermediate
Location:
src/dm/interface/dm.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ksp/ksp/examples/tutorials/ex22f.F.html
src/snes/examples/tutorials/ex35.c.html