1*ca44d042SBarry Smith /*$Id: snesregi.c,v 1.35 2000/05/05 22:18:12 balay Exp bsmith $*/ 2eaa2832dSBarry Smith 3e090d566SSatish Balay #include "src/snes/snesimpl.h" /*I "petscsnes.h" I*/ 4fb2e594dSBarry Smith 5fb2e594dSBarry Smith EXTERN_C_BEGIN 6*ca44d042SBarry Smith EXTERN int SNESCreate_EQ_LS(SNES); 7*ca44d042SBarry Smith EXTERN int SNESCreate_EQ_TR(SNES); 8*ca44d042SBarry Smith EXTERN int SNESCreate_UM_TR(SNES); 9*ca44d042SBarry Smith EXTERN int SNESCreate_UM_LS(SNES); 10*ca44d042SBarry Smith EXTERN int SNESCreate_Test(SNES); 11fb2e594dSBarry Smith EXTERN_C_END 12eaa2832dSBarry Smith 1382bf6240SBarry Smith /* 1482bf6240SBarry Smith This is used by SNESSetType() to make sure that at least one 1582bf6240SBarry Smith SNESRegisterAll() is called. In general, if there is more than one 1682bf6240SBarry Smith DLL then SNESRegisterAll() may be called several times. 1782bf6240SBarry Smith */ 184c49b128SBarry Smith extern PetscTruth SNESRegisterAllCalled; 1982bf6240SBarry Smith 205615d1e5SSatish Balay #undef __FUNC__ 21b2863d3aSBarry Smith #define __FUNC__ /*<a name=""></a>*/"SNESRegisterAll" 2283f0b094SBarry Smith /*@C 2382bf6240SBarry Smith SNESRegisterAll - Registers all of the nonlinear solver methods in the SNES package. 24eaa2832dSBarry Smith 25fee21e36SBarry Smith Not Collective 26fee21e36SBarry Smith 2736851e7fSLois Curfman McInnes Level: advanced 2836851e7fSLois Curfman McInnes 2982bf6240SBarry Smith .keywords: SNES, register, all 30eaa2832dSBarry Smith 3182bf6240SBarry Smith .seealso: SNESRegisterDestroy() 32eaa2832dSBarry Smith @*/ 3382bf6240SBarry Smith int SNESRegisterAll(char *path) 34eaa2832dSBarry Smith { 3582bf6240SBarry Smith int ierr; 3682bf6240SBarry Smith 373a40ed3dSBarry Smith PetscFunctionBegin; 384c49b128SBarry Smith SNESRegisterAllCalled = PETSC_TRUE; 3982bf6240SBarry Smith 40f1af5d2fSBarry Smith ierr = SNESRegisterDynamic("ls", path,"SNESCreate_EQ_LS",SNESCreate_EQ_LS);CHKERRQ(ierr); 41f1af5d2fSBarry Smith ierr = SNESRegisterDynamic("tr", path,"SNESCreate_EQ_TR",SNESCreate_EQ_TR);CHKERRQ(ierr); 42f1af5d2fSBarry Smith ierr = SNESRegisterDynamic("test", path,"SNESCreate_Test", SNESCreate_Test);CHKERRQ(ierr); 43f1af5d2fSBarry Smith ierr = SNESRegisterDynamic("umtr", path,"SNESCreate_UM_TR",SNESCreate_UM_TR);CHKERRQ(ierr); 44f1af5d2fSBarry Smith ierr = SNESRegisterDynamic("umls", path,"SNESCreate_UM_LS",SNESCreate_UM_LS);CHKERRQ(ierr); 4582bf6240SBarry Smith 463a40ed3dSBarry Smith PetscFunctionReturn(0); 47eaa2832dSBarry Smith } 4882bf6240SBarry Smith 49