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