xref: /petsc/src/snes/interface/snesregi.c (revision 6b5873e37b549cc139dbd34cfb32e6aff4f310b3)
1 #ifndef lint
2 static char vcid[] = "$Id: snesregi.c,v 1.2 1995/04/05 20:34:27 bsmith Exp bsmith $";
3 #endif
4 
5 #include "snesimpl.h"
6 extern int SNESCreate_LS(SNES);
7 extern int SNESCreate_TR(SNES);
8 
9 /*@
10   SNESRegisterAll - This routine registers all of the solution methods
11   in the SNES package.
12 
13   Notes:
14   Methods within the SNES package for solving systems of nonlinear
15   equations follow the naming convention SNES_XXXX, while methods
16   for solving unconstrained minimization problems (within the SUMS
17   component) follow the naming convention SUMS_XXXX.
18 
19   Adding new methods:
20   To add a new method to the registry
21 $   1.  Copy this routine and modify it to incorporate
22 $       a call to NLRegister() for the new method.
23 $   2.  Modify the file "TOOLSDIR/include/snes.h"
24 $       by appending the method's identifier as an
25 $       enumerator of the SNESMETHOD enumeration.
26 $       As long as the enumerator is appended to
27 $       the existing list, only the SNESRegisterAll()
28 $       routine requires recompilation.
29 
30   The procedure for adding new methods is currently being
31   revised ... stay tuned for further details.
32 
33   Restricting the choices:
34   To prevent all of the methods from being registered and thus
35   save memory, copy this routine and modify it to register only
36   those methods you desire.  Make sure that the replacement routine
37   is linked before libsnes.a .
38 @*/
39 int SNESRegisterAll()
40 {
41    SNESRegister((int)SNES_NLS,         "ls",      SNESCreate_LS);
42    SNESRegister((int)SNES_NTR,         "tr",      SNESCreate_TR);
43 /*
44    SNESRegister((int)SNES_NTR_DOG_LEG, "snes_ndog_leg", SNESCreate_DogLeg);
45 */
46   return 0;
47 }
48