xref: /petsc/src/snes/interface/snesregi.c (revision d4bb536f0e426e9a0292bbfd5743770a9b03f0d5)
1a5eb4965SSatish Balay #ifdef PETSC_RCS_HEADER
2*d4bb536fSBarry Smith static char vcid[] = "$Id: snesregi.c,v 1.19 1997/07/09 20:59:37 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__
13*d4bb536fSBarry Smith #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:
192d872ea7SLois Curfman McInnes   To add a new method to the registry, copy this routine and modify
202d872ea7SLois Curfman McInnes   it to incorporate a call to SNESRegister() for the new method.
21eaa2832dSBarry Smith 
22eaa2832dSBarry Smith   Restricting the choices:
23eaa2832dSBarry Smith   To prevent all of the methods from being registered and thus
24eaa2832dSBarry Smith   save memory, copy this routine and modify it to register only
25eaa2832dSBarry Smith   those methods you desire.  Make sure that the replacement routine
2652392280SLois Curfman McInnes   is linked before libpetscsnes.a.
27412ae834SLois Curfman McInnes 
28412ae834SLois Curfman McInnes .keywords: SNES, nonlinear, register, all
29412ae834SLois Curfman McInnes 
30412ae834SLois Curfman McInnes .seealso: SNESRegister(), SNESRegisterDestroy()
31eaa2832dSBarry Smith @*/
32eaa2832dSBarry Smith int SNESRegisterAll()
33eaa2832dSBarry Smith {
3484cb2905SBarry Smith   SNESRegisterAllCalled = 1;
3584cb2905SBarry Smith   SNESRegister(SNES_EQ_LS,         0,"ls",      SNESCreate_EQ_LS);
3684cb2905SBarry Smith   SNESRegister(SNES_EQ_TR,         0,"tr",      SNESCreate_EQ_TR);
3784cb2905SBarry Smith   SNESRegister(SNES_EQ_TEST,       0,"test",    SNESCreate_Test);
3884cb2905SBarry Smith   SNESRegister(SNES_UM_TR,         0,"umtr",    SNESCreate_UM_TR);
3984cb2905SBarry Smith   SNESRegister(SNES_UM_LS,         0,"umls",    SNESCreate_UM_LS);
405e42470aSBarry Smith   return 0;
41eaa2832dSBarry Smith }
42