1a5eb4965SSatish Balay #ifdef PETSC_RCS_HEADER 2*fee21e36SBarry Smith static char vcid[] = "$Id: tsregall.c,v 1.14 1998/03/06 00:17:24 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 1182bf6240SBarry Smith #if defined(USE_DYNAMIC_LIBRARIES) 1282bf6240SBarry Smith #define TSRegister(a,b,c,d) TSRegister_Private(a,b,c,0) 1382bf6240SBarry Smith #else 1482bf6240SBarry Smith #define TSRegister(a,b,c,d) TSRegister_Private(a,b,c,d) 1582bf6240SBarry Smith #endif 1682bf6240SBarry Smith 1782bf6240SBarry Smith #undef __FUNC__ 1882bf6240SBarry Smith #define __FUNC__ "TSRegister_Private" 1982bf6240SBarry Smith static int TSRegister_Private(char *sname,char *path,char *name,int (*function)(TS)) 2082bf6240SBarry Smith { 2182bf6240SBarry Smith char fullname[256]; 2282bf6240SBarry Smith 2382bf6240SBarry Smith PetscFunctionBegin; 2482bf6240SBarry Smith PetscStrcpy(fullname,path); PetscStrcat(fullname,":"); PetscStrcat(fullname,name); 2582bf6240SBarry Smith DLRegister(&TSList,sname,fullname, (int (*)(void*))function); 2682bf6240SBarry Smith PetscFunctionReturn(0); 2782bf6240SBarry Smith } 2882bf6240SBarry 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 35*fee21e36SBarry Smith Not Collective 36*fee21e36SBarry Smith 37fb4a63b6SLois Curfman McInnes .keywords: TS, timestepper, register, all 38eb293426SBarry Smith 3982bf6240SBarry Smith .seealso: TSRegisterDestroy() 40eb293426SBarry Smith @*/ 4182bf6240SBarry Smith int TSRegisterAll(char *path) 42eb293426SBarry Smith { 433a40ed3dSBarry Smith PetscFunctionBegin; 4484cb2905SBarry Smith TSRegisterAllCalled = 1; 4584cb2905SBarry Smith 4682bf6240SBarry Smith TSRegister(TS_EULER, path,"TSCreate_Euler", TSCreate_Euler); 4782bf6240SBarry Smith TSRegister(TS_BEULER, path,"TSCreate_BEuler",TSCreate_BEuler); 4882bf6240SBarry Smith TSRegister(TS_PSEUDO, path,"TSCreate_Pseudo",TSCreate_Pseudo); 49a5020ba8SBarry Smith #if defined(HAVE_PVODE) && !defined(__cplusplus) 5082bf6240SBarry Smith TSRegister(TS_PVODE, path,"TSCreate_PVode", TSCreate_PVode); 513914022bSBarry Smith #endif 523a40ed3dSBarry Smith PetscFunctionReturn(0); 53eb293426SBarry Smith } 54