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