#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
dmmg | - the context | |
function | - the function that defines the nonlinear system | |
jacobian | - optional function to compute Jacobian |
-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. |