xref: /petsc/src/snes/interface/snesregi.c (revision 84cb2905a512499b542fd30cf471a05f503d96d2)
1eaa2832dSBarry Smith #ifndef lint
2*84cb2905SBarry Smith static char vcid[] = "$Id: snesregi.c,v 1.15 1997/01/06 20:29:45 balay Exp bsmith $";
3eaa2832dSBarry Smith #endif
4eaa2832dSBarry Smith 
570f55243SBarry Smith #include "src/snes/snesimpl.h"     /*I  "snes.h"  I*/
640191667SLois Curfman McInnes extern int SNESCreate_EQ_LS(SNES);
740191667SLois Curfman McInnes extern int SNESCreate_EQ_TR(SNES);
840191667SLois Curfman McInnes extern int SNESCreate_UM_TR(SNES);
940191667SLois Curfman McInnes extern int SNESCreate_UM_LS(SNES);
10c6abb9f5SBarry Smith extern int SNESCreate_Test(SNES);
11eaa2832dSBarry Smith 
125615d1e5SSatish Balay #undef __FUNC__
135615d1e5SSatish Balay #define __FUNC__ "SNESRegisterAll"
1483f0b094SBarry Smith /*@C
1552392280SLois Curfman McInnes   SNESRegisterAll - Registers all of the nonlinear solvers in the SNES
1652392280SLois Curfman McInnes   package.
17eaa2832dSBarry Smith 
18eaa2832dSBarry Smith   Adding new methods:
19eaa2832dSBarry Smith   To add a new method to the registry
20*84cb2905SBarry Smith $     Copy this routine and modify it to incorporate
21412ae834SLois Curfman McInnes $     a call to SNESRegister() for the new method.
22eaa2832dSBarry Smith 
23eaa2832dSBarry Smith   Restricting the choices:
24eaa2832dSBarry Smith   To prevent all of the methods from being registered and thus
25eaa2832dSBarry Smith   save memory, copy this routine and modify it to register only
26eaa2832dSBarry Smith   those methods you desire.  Make sure that the replacement routine
2752392280SLois Curfman McInnes   is linked before libpetscsnes.a.
28412ae834SLois Curfman McInnes 
29412ae834SLois Curfman McInnes .keywords: SNES, nonlinear, register, all
30412ae834SLois Curfman McInnes 
31412ae834SLois Curfman McInnes .seealso: SNESRegister(), SNESRegisterDestroy()
32eaa2832dSBarry Smith @*/
33eaa2832dSBarry Smith int SNESRegisterAll()
34eaa2832dSBarry Smith {
35*84cb2905SBarry Smith   SNESRegisterAllCalled = 1;
36*84cb2905SBarry Smith   SNESRegister(SNES_EQ_LS,         0,"ls",      SNESCreate_EQ_LS);
37*84cb2905SBarry Smith   SNESRegister(SNES_EQ_TR,         0,"tr",      SNESCreate_EQ_TR);
38*84cb2905SBarry Smith   SNESRegister(SNES_EQ_TEST,       0,"test",    SNESCreate_Test);
39*84cb2905SBarry Smith   SNESRegister(SNES_UM_TR,         0,"umtr",    SNESCreate_UM_TR);
40*84cb2905SBarry Smith   SNESRegister(SNES_UM_LS,         0,"umls",    SNESCreate_UM_LS);
415e42470aSBarry Smith   return 0;
42eaa2832dSBarry Smith }
43