1 2 #ifndef lint 3 static char vcid[] = "$Id: tsregall.c,v 1.1 1996/09/30 18:36:07 bsmith Exp curfman $"; 4 #endif 5 6 #include "src/ts/tsimpl.h" /*I "ts.h" I*/ 7 extern int TSCreate_Euler(TS); 8 extern int TSCreate_BEuler(TS); 9 extern int TSCreate_Pseudo(TS); 10 11 /*@C 12 TSRegisterAll - Registers all of the timesteppers in the TS 13 package. 14 15 Adding new methods: 16 To add a new method to the registry 17 $ 1. Copy this routine and modify it to incorporate 18 $ a call to TSRegister() for the new method. 19 $ 2. Modify the file "PETSCDIR/include/ts.h" 20 $ by appending the method's identifier as an 21 $ enumerator of the TSType enumeration. 22 $ As long as the enumerator is appended to 23 $ the existing list, only the TSRegisterAll() 24 $ routine requires recompilation. 25 26 Restricting the choices: 27 To prevent all of the methods from being registered and thus 28 save memory, copy this routine and modify it to register only 29 those methods you desire. Make sure that the replacement routine 30 is linked before libpetscsnes.a. 31 32 .keywords: TS, timestepper, register, all 33 34 .seealso: TSRegister(), TSRegisterDestroy() 35 @*/ 36 int TSRegisterAll() 37 { 38 TSRegister((int)TS_EULER, "euler", TSCreate_Euler); 39 TSRegister((int)TS_BEULER, "beuler", TSCreate_BEuler); 40 TSRegister((int)TS_PSEUDO, "pseudo", TSCreate_Pseudo); 41 return 0; 42 } 43