PCRegister

Adds a method to the preconditioner package.

Synopsis

PCRegister(char *name_solver,char *path,char *name_create,int (*routine_create)(PC))
Not collective

Input Parameters

name_solver - name of a new user-defined solver
path - path (either absolute or relative) the library containing this solver
name_create - name of routine to create method context
routine_create - routine to create method context

Notes

PCRegister() may be called multiple times to add several user-defined preconditioners.

If dynamic libraries are used, then the fourth input argument (routine_create) is ignored.

Sample usage

   PCRegister("my_solver",/home/username/my_lib/lib/libO/solaris/mylib.a,
              "MySolverCreate",MySolverCreate);

Then, your solver can be chosen with the procedural interface via

    PCSetType(pc,"my_solver")
or at runtime via the option
    -pc_type my_solver

Keywords

PC, register

See Also

PCRegisterAll(), PCRegisterDestroy()

Examples

src/sles/examples/tutorials/ex12.c

Location: src/pc/interface/precon.c
PC Index
Table of Contents