petsc-3.7.3 2016-08-01
Report Typos and Errors

KSPRegister

Adds a method to the Krylov subspace solver package.

Synopsis

#include "petscksp.h" 
PetscErrorCode  KSPRegister(const char sname[],PetscErrorCode (*function)(KSP))
Not Collective

Input Parameters

name_solver - name of a new user-defined solver
routine_create - routine to create method context

Notes

KSPRegister() may be called multiple times to add several user-defined solvers.

Sample usage

   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

Keywords

KSP, register

See Also

KSPRegisterAll(), KSPRegisterDestroy()

Level:advanced
Location:
src/ksp/ksp/interface/itcreate.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages