1*4a2ae208SSatish Balay /*$Id: snesregi.c,v 1.37 2001/01/15 21:47:49 bsmith Exp balay $*/ 2eaa2832dSBarry Smith 3e090d566SSatish Balay #include "src/snes/snesimpl.h" /*I "petscsnes.h" I*/ 4fb2e594dSBarry Smith 5fb2e594dSBarry Smith EXTERN_C_BEGIN 6ca44d042SBarry Smith EXTERN int SNESCreate_EQ_LS(SNES); 7ca44d042SBarry Smith EXTERN int SNESCreate_EQ_TR(SNES); 8ca44d042SBarry Smith EXTERN int SNESCreate_UM_TR(SNES); 9ca44d042SBarry Smith EXTERN int SNESCreate_UM_LS(SNES); 10ca44d042SBarry 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 20*4a2ae208SSatish Balay #undef __FUNCT__ 21*4a2ae208SSatish Balay #define __FUNCT__ "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