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