1a5eb4965SSatish Balay #ifdef PETSC_RCS_HEADER 2*82bf6240SBarry Smith static char vcid[] = "$Id: tsregall.c,v 1.13 1998/01/17 17:38:11 bsmith Exp bsmith $"; 3eb293426SBarry Smith #endif 4eb293426SBarry Smith 5eb293426SBarry Smith #include "src/ts/tsimpl.h" /*I "ts.h" I*/ 6eb293426SBarry Smith extern int TSCreate_Euler(TS); 7eb293426SBarry Smith extern int TSCreate_BEuler(TS); 8eb293426SBarry Smith extern int TSCreate_Pseudo(TS); 93914022bSBarry Smith extern int TSCreate_PVode(TS); 10eb293426SBarry Smith 11*82bf6240SBarry Smith #if defined(USE_DYNAMIC_LIBRARIES) 12*82bf6240SBarry Smith #define TSRegister(a,b,c,d) TSRegister_Private(a,b,c,0) 13*82bf6240SBarry Smith #else 14*82bf6240SBarry Smith #define TSRegister(a,b,c,d) TSRegister_Private(a,b,c,d) 15*82bf6240SBarry Smith #endif 16*82bf6240SBarry Smith 17*82bf6240SBarry Smith #undef __FUNC__ 18*82bf6240SBarry Smith #define __FUNC__ "TSRegister_Private" 19*82bf6240SBarry Smith static int TSRegister_Private(char *sname,char *path,char *name,int (*function)(TS)) 20*82bf6240SBarry Smith { 21*82bf6240SBarry Smith char fullname[256]; 22*82bf6240SBarry Smith 23*82bf6240SBarry Smith PetscFunctionBegin; 24*82bf6240SBarry Smith PetscStrcpy(fullname,path); PetscStrcat(fullname,":"); PetscStrcat(fullname,name); 25*82bf6240SBarry Smith DLRegister(&TSList,sname,fullname, (int (*)(void*))function); 26*82bf6240SBarry Smith PetscFunctionReturn(0); 27*82bf6240SBarry Smith } 28*82bf6240SBarry Smith 295615d1e5SSatish Balay #undef __FUNC__ 30d4bb536fSBarry Smith #define __FUNC__ "TSRegisterAll" 31eb293426SBarry Smith /*@C 32eb293426SBarry Smith TSRegisterAll - Registers all of the timesteppers in the TS 33eb293426SBarry Smith package. 34eb293426SBarry Smith 35fb4a63b6SLois Curfman McInnes .keywords: TS, timestepper, register, all 36eb293426SBarry Smith 37*82bf6240SBarry Smith .seealso: TSRegisterDestroy() 38eb293426SBarry Smith @*/ 39*82bf6240SBarry Smith int TSRegisterAll(char *path) 40eb293426SBarry Smith { 413a40ed3dSBarry Smith PetscFunctionBegin; 4284cb2905SBarry Smith TSRegisterAllCalled = 1; 4384cb2905SBarry Smith 44*82bf6240SBarry Smith TSRegister(TS_EULER, path,"TSCreate_Euler", TSCreate_Euler); 45*82bf6240SBarry Smith TSRegister(TS_BEULER, path,"TSCreate_BEuler",TSCreate_BEuler); 46*82bf6240SBarry Smith TSRegister(TS_PSEUDO, path,"TSCreate_Pseudo",TSCreate_Pseudo); 47a5020ba8SBarry Smith #if defined(HAVE_PVODE) && !defined(__cplusplus) 48*82bf6240SBarry Smith TSRegister(TS_PVODE, path,"TSCreate_PVode", TSCreate_PVode); 493914022bSBarry Smith #endif 503a40ed3dSBarry Smith PetscFunctionReturn(0); 51eb293426SBarry Smith } 52