VecSerializeRegisterDynamic

Adds a serialization method to the vec package.

Synopsis


VecSerializeRegisterDynamic(char *name, char *path, char *func_name,
int (*serialize_func)(MPI_Comm, Vec *, PetscViewer, PetscTruth))

Not Collective

Input Parameters

name - The name of a new user-defined serialization routine
path - The path (either absolute or relative) of the library containing this routine
func_name - The name of the serialization routine
serialize_func - The serialization routine itself

Notes

VecSerializeRegister() may be called multiple times to add several user-defined serializers.

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

Sample usage

  VecSerializeRegisterDynamic("my_store", "/home/username/my_lib/lib/libO/solaris/libmy.a", "MyStoreFunc", MyStoreFunc);

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

    VecSetSerializeType(vec, "my_store")
or at runtime via the option
    -vec_serialize_type my_store

Note: $PETSC_ARCH and $BOPT occuring in pathname will be replaced with appropriate values.

Keywords

Vec, register

See Also

VecSerializeRegisterAll(), VecSerializeRegisterDestroy()

Level:advanced
Location:
src/vec/interface/vecreg.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages