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