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