VecRegisterDynamic(char *name_solver,char *path,char *name_create, int (*routine_create)(MPI_Comm,int,int,Vec*))Not Collective
name_solver | - name of a new user-defined vector object | |
path | - path (either absolute or relative) the library containing this vector object | |
name_create | - name of routine to create vector | |
routine_create | - routine to create vector |
If dynamic libraries are used, then the fourth input argument (routine_create) is ignored.
VecRegisterDynamic("my_solver","/home/username/my_lib/lib/libO/solaris/libmine", "MyVectorCreate",MyVectorCreate);
Then, your solver can be chosen with the procedural interface via
VecCreate(MPI_Comm,int n,int N,Vec *); VecSetType(Vec,"my_vector_name");or at runtime via the option
-vec_type my_vector_name
${PETSC_ARCH}, ${PETSC_DIR}, ${PETSC_LDIR}, ${BOPT}, or ${any environmental variable} occuring in pathname will be replaced with appropriate values.
Level:advanced
Location:src/vec/utils/gcreatev.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages