petsc-3.3-p7 2013-05-11

DMDASetLocalFunction

Caches in a DM a local function.

Synopsis

#include "petscdmda.h"   
PetscErrorCode  DMDASetLocalFunction(DM da,DMDALocalFunction1 lf)
Logically Collective on DMDA

Input Parameter

da - initial distributed array
lf - the local function

Notes

If you use SNESSetDM() and did not use SNESSetFunction() then the context passed to your function is the context set with DMSetApplicationContext()

Developer Notes: It is possibly confusing which context is passed to the user function, it would be nice to unify them somehow.

Keywords

distributed array, refine

See Also

DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMDestroy(), DMDAGetLocalFunction(), DMDASetLocalFunctioni()

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

Examples

src/snes/examples/tutorials/ex4.c.html
src/snes/examples/tutorials/ex5.c.html
src/snes/examples/tutorials/ex7.c.html
src/snes/examples/tutorials/ex8.c.html
src/snes/examples/tutorials/ex15.c.html
src/snes/examples/tutorials/ex19.c.html
src/snes/examples/tutorials/ex25.c.html
src/snes/examples/tutorials/ex30.c.html
src/snes/examples/tutorials/ex46.c.html
src/snes/examples/tutorials/ex5f.F.html
src/snes/examples/tutorials/ex40f90.F90.html