#include "petscsnes.h" PetscErrorCode SNESRegister(const char sname[],PetscErrorCode (*function)(SNES))Not collective
name_solver | - name of a new user-defined solver | |
routine_create | - routine to create method context |
SNESRegister("my_solver",MySolverCreate);
Then, your solver can be chosen with the procedural interface via
SNESSetType(snes,"my_solver")or at runtime via the option
-snes_type my_solver
Note: If your function is not being put into a shared library then use SNESRegister() instead