#include "petscpf.h" PetscErrorCode PFRegister(const char sname[],PetscErrorCode (*function)(PF,void*))Not collective
name_solver | - name of a new user-defined solver | |
routine_create | - routine to create method context |
PFRegister("my_function",MyFunctionSetCreate);
Then, your solver can be chosen with the procedural interface via
PFSetType(pf,"my_function")or at runtime via the option
-pf_type my_function