xref: /petsc/src/snes/interface/snesregi.c (revision 3a40ed3dce77c081171d005ae1a6ff4bb9d13b6f)
1 #ifdef PETSC_RCS_HEADER
2 static char vcid[] = "$Id: snesregi.c,v 1.20 1997/08/22 15:17:50 bsmith Exp bsmith $";
3 #endif
4 
5 #include "src/snes/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 #undef __FUNC__
13 #define __FUNC__ "SNESRegisterAll"
14 /*@C
15   SNESRegisterAll - Registers all of the nonlinear solvers in the SNES
16   package.
17 
18   Adding new methods:
19   To add a new method to the registry, copy this routine and modify
20   it to incorporate a call to SNESRegister() for the new method.
21 
22   Restricting the choices:
23   To prevent all of the methods from being registered and thus
24   save memory, copy this routine and modify it to register only
25   those methods you desire.  Make sure that the replacement routine
26   is linked before libpetscsnes.a.
27 
28 .keywords: SNES, nonlinear, register, all
29 
30 .seealso: SNESRegister(), SNESRegisterDestroy()
31 @*/
32 int SNESRegisterAll()
33 {
34   PetscFunctionBegin;
35   SNESRegisterAllCalled = 1;
36   SNESRegister(SNES_EQ_LS,         0,"ls",      SNESCreate_EQ_LS);
37   SNESRegister(SNES_EQ_TR,         0,"tr",      SNESCreate_EQ_TR);
38   SNESRegister(SNES_EQ_TEST,       0,"test",    SNESCreate_Test);
39   SNESRegister(SNES_UM_TR,         0,"umtr",    SNESCreate_UM_TR);
40   SNESRegister(SNES_UM_LS,         0,"umls",    SNESCreate_UM_LS);
41   PetscFunctionReturn(0);
42 }
43