PetscErrorCode PCRegisterDynamic(const char *name_solver,const char *path,const char *name_create,PetscErrorCode (*routine_create)(PC))Not collective
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 |
If dynamic libraries are used, then the fourth input argument (routine_create) is ignored.
PCRegisterDynamic("my_solver","/home/username/my_lib/lib/libO/solaris/mylib", "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
Notes: ${PETSC_ARCH}, ${PETSC_DIR}, ${PETSC_LIB_DIR}, or ${any environmental variable} occuring in pathname will be replaced with appropriate values. If your function is not being put into a shared library then use PCRegister() instead
Level:advanced
Location:src/ksp/pc/../../../include/petscpc.h
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages