DMMGSetSNES

Sets the nonlinear function that defines the nonlinear set of equations to be solved using the grid hierarchy.

Synopsis

#include "petscda.h"     
#include "petscmg.h"    
int DMMGSetSNES(DMMG *dmmg,int (*function)(SNES,Vec,Vec,void*),int (*jacobian)(SNES,Vec,Mat*,Mat*,MatStructure*,void*))
Collective on DMMG

Input Parameter

dmmg - the context
function - the function that defines the nonlinear system
jacobian - optional function to compute Jacobian

Options Database Keys

-dmmg_snes_monitor- . -dmmg_jacobian_fd
-dmmg_jacobian_ad- . -dmmg_jacobian_mf_fd_operator
-dmmg_jacobian_mf_fd- . -dmmg_jacobian_mf_ad_operator
-dmmg_jacobian_mf_ad-

See Also

DMMGCreate(), DMMGDestroy, DMMGSetSLES(), DMMGSetSNESLocal()

Level:advanced
Location:
src/snes/utils/damgsnes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/snes/examples/tutorials/ex18.c.html
src/snes/examples/tutorials/ex20.c.html
src/snes/examples/tutorials/ex22.c.html
src/snes/examples/tutorials/ex23.c.html
src/snes/examples/tutorials/ex24.c.html
src/snes/examples/tutorials/ex25.c.html