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