#include "petscts.h" int TSRegisterDestroy(void)
TSSerializeRegister(char *name, char *path, char *func_name, int (*serialize_func)(MPI_Comm, TS *, PetscViewer, PetscTruth))
Not Collective
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 |
If dynamic libraries are used, then the fourth input argument (serialize_func) is ignored.
TSSerializeRegisterDynamic("my_store", "/home/username/my_lib/lib/libO/solaris/libmy.a", "MyStoreFunc", MyStoreFunc);
Then, your serialization can be chosen with the procedural interface via
TSSetSerializeType(ts, "my_store")or at runtime via the option
-ts_serialize_type my_store
Note: $PETSC_ARCH and $BOPT occuring in pathname will be replaced with appropriate values.
PetscFunctionBegin; ierr = PetscStrcpy(fullname, path); CHKERRQ(ierr); ierr = PetscStrcat(fullname, ":"); CHKERRQ(ierr); ierr = PetscStrcat(fullname, name); CHKERRQ(ierr); ierr = PetscFListAdd(&TSSerializeList, sname, fullname, (void (*)(void)) function); CHKERRQ(ierr); PetscFunctionReturn(0); }
/*-------------------------------------------------------------------------------------------------------------------*/ #undef __FUNCT__ #define __FUNCT__ "TSRegisterDestroy" /*@C TSRegisterDestroy - Frees the list of timestepping routines that were registered by TSRegister()/TSRegisterDynamic().
Not Collective
Level:advanced
Location:src/ts/interface/tsreg.c
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages