1 #ifndef lint 2 static char vcid[] = "$Id: snesregi.c,v 1.12 1996/03/26 00:11:24 curfman 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 /*@C 13 SNESRegisterAll - Registers all of the nonlinear solvers in the SNES 14 package. 15 16 Adding new methods: 17 To add a new method to the registry 18 $ 1. Copy this routine and modify it to incorporate 19 $ a call to SNESRegister() for the new method. 20 $ 2. Modify the file "PETSCDIR/include/snes.h" 21 $ by appending the method's identifier as an 22 $ enumerator of the SNESType enumeration. 23 $ As long as the enumerator is appended to 24 $ the existing list, only the SNESRegisterAll() 25 $ routine requires recompilation. 26 27 Restricting the choices: 28 To prevent all of the methods from being registered and thus 29 save memory, copy this routine and modify it to register only 30 those methods you desire. Make sure that the replacement routine 31 is linked before libpetscsnes.a. 32 33 .keywords: SNES, nonlinear, register, all 34 35 .seealso: SNESRegister(), SNESRegisterDestroy() 36 @*/ 37 int SNESRegisterAll() 38 { 39 SNESRegister((int)SNES_EQ_LS, "ls", SNESCreate_EQ_LS); 40 SNESRegister((int)SNES_EQ_TR, "tr", SNESCreate_EQ_TR); 41 SNESRegister((int)SNES_EQ_TEST, "test", SNESCreate_Test); 42 SNESRegister((int)SNES_UM_TR, "umtr", SNESCreate_UM_TR); 43 SNESRegister((int)SNES_UM_LS, "umls", SNESCreate_UM_LS); 44 return 0; 45 } 46