#include "petscksp.h" PetscErrorCode KSPRegister(const char sname[],PetscErrorCode (*function)(KSP))Not Collective
name_solver | - name of a new user-defined solver | |
routine_create | - routine to create method context |
KSPRegister("my_solver",MySolverCreate);
Then, your solver can be chosen with the procedural interface via
KSPSetType(ksp,"my_solver")or at runtime via the option
-ksp_type my_solver