xref: /petsc/src/snes/interface/snesregi.c (revision 6b9ee512bd5c43d16cdff3a08826a4bc1d3647e2)
1 #ifndef lint
2 static char vcid[] = "$Id: snesregi.c,v 1.11 1996/01/01 01:05:05 bsmith Exp curfman $";
3 #endif
4 
5 #include "snesimpl.h"     /*I  "snes.h"  I*/
6 extern int SNESCreate_EQ_LS(SNES);
7 extern int SNESCreate_EQ_TR(SNES);
8 extern int SNESCreate_UM_TR(SNES);
9 extern int SNESCreate_UM_LS(SNES);
10 extern int SNESCreate_Test(SNES);
11 
12 /*@C
13   SNESRegisterAll - Registers all of the nonlinear solvers in the SNES
14   package.
15 
16   Adding new methods:
17   To add a new method to the registry
18 $   1.  Copy this routine and modify it to incorporate
19 $       a call to SNESRegister() for the new method.
20 $   2.  Modify the file "PETSCDIR/include/snes.h"
21 $       by appending the method's identifier as an
22 $       enumerator of the SNESType enumeration.
23 $       As long as the enumerator is appended to
24 $       the existing list, only the SNESRegisterAll()
25 $       routine requires recompilation.
26 
27   Restricting the choices:
28   To prevent all of the methods from being registered and thus
29   save memory, copy this routine and modify it to register only
30   those methods you desire.  Make sure that the replacement routine
31   is linked before libpetscsnes.a.
32 
33 .keywords: SNES, nonlinear, register, all
34 
35 .seealso: SNESRegister(), SNESRegisterDestroy()
36 @*/
37 int SNESRegisterAll()
38 {
39   SNESRegister((int)SNES_EQ_LS,         "ls",      SNESCreate_EQ_LS);
40   SNESRegister((int)SNES_EQ_TR,         "tr",      SNESCreate_EQ_TR);
41   SNESRegister((int)SNES_EQ_TEST,       "test",    SNESCreate_Test);
42   SNESRegister((int)SNES_UM_TR,         "umtr",    SNESCreate_UM_TR);
43   SNESRegister((int)SNES_UM_LS,         "umls",    SNESCreate_UM_LS);
44   return 0;
45 }
46