DMMGSetSNES

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

Synopsis

#include "petscdmda.h"    
#include "petscdmmesh.h"  
#include "petscpcmg.h"    
#include "petscdmmg.h"  
#include "petscmat.h" 
PetscErrorCode  DMMGSetSNES(DMMG *dmmg,PetscErrorCode (*function)(SNES,Vec,Vec,void*),PetscErrorCode (*jacobian)(SNES,Vec,Mat*,Mat*,MatStructure*,void*))
This is being deprecated. Use KSPSetDM() for linear problems and SNESSetDM() for nonlinear problems. See src/ksp/ksp/examples/tutorials/ex45.c and src/snes/examples/tutorials/ex57.c

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

See Also

DMMGCreate(), DMMGDestroy, DMMGSetKSP(), DMMGSetSNESLocal(), DMMGSetFromOptions()

Level:advanced
Location:
src/snes/utils/damgsnes.c
Index of all DMMG routines
Table of Contents for all manual pages
Index of all manual pages 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
src/snes/examples/tutorials/ex31.c.html
src/snes/examples/tutorials/ex32.c.html
src/snes/examples/tutorials/ex49.c.html
src/ts/examples/tutorials/ex14.c.html

-snes_monitor- . -dmmg_coloring_from_mat - use graph coloring on the actual matrix nonzero structure instead of getting the coloring from the DM
-dmmg_jacobian_fd- . -dmmg_jacobian_ad
-dmmg_jacobian_mf_fd_operator- . -dmmg_jacobian_mf_fd
-dmmg_jacobian_mf_ad_operator- . -dmmg_jacobian_mf_ad
-dmmg_iscoloring_type- - The period at which the Jacobian is recomputed can be set differently for different levels of the Jacobian (for example lag all Jacobians except on the finest level). There is no user interface currently for setting a different period on the different levels, one must set the fields dmmg[i]->updatejacobian and dmmg[i]->updatejacobianperiod directly in the DMMG data structure.