1 #ifndef lint 2 static char vcid[] = "$Id: snesregi.c,v 1.4 1995/04/17 03:11:02 curfman Exp bsmith $"; 3 #endif 4 5 #include "snesimpl.h" 6 extern int SNESCreate_LS(SNES); 7 extern int SNESCreate_TR(SNES); 8 extern int SNESCreate_Test(SNES); 9 10 /*@ 11 SNESRegisterAll - This routine registers all of the solution methods 12 in the SNES package. 13 14 Notes: 15 Methods within the SNES package for solving systems of nonlinear 16 equations follow the naming convention SNES_XXXX, while methods 17 for solving unconstrained minimization problems (within the SUMS 18 component) follow the naming convention SUMS_XXXX. 19 20 Adding new methods: 21 To add a new method to the registry 22 $ 1. Copy this routine and modify it to incorporate 23 $ a call to SNESRegister() for the new method. 24 $ 2. Modify the file "PETSCDIR/include/snes.h" 25 $ by appending the method's identifier as an 26 $ enumerator of the SNESMETHOD enumeration. 27 $ As long as the enumerator is appended to 28 $ the existing list, only the SNESRegisterAll() 29 $ routine requires recompilation. 30 31 The procedure for adding new methods is currently being 32 revised ... stay tuned for further details. 33 34 Restricting the choices: 35 To prevent all of the methods from being registered and thus 36 save memory, copy this routine and modify it to register only 37 those methods you desire. Make sure that the replacement routine 38 is linked before petsclibsnes.a . 39 40 .keywords: SNES, nonlinear, register, all 41 42 .seealso: SNESRegister(), SNESRegisterDestroy() 43 @*/ 44 int SNESRegisterAll() 45 { 46 SNESRegister((int)SNES_NLS, "ls", SNESCreate_LS); 47 SNESRegister((int)SNES_NTR, "tr", SNESCreate_TR); 48 SNESRegister((int)SNES_NTEST, "test", SNESCreate_Test); 49 /* 50 SNESRegister((int)SNES_NTR_DOG_LEG, "snes_ndog_leg", SNESCreate_DogLeg); 51 */ 52 return 0; 53 } 54