173f4d377SMatthew Knepley /*$Id: snesregi.c,v 1.38 2001/03/23 23:24:07 balay Exp $*/ 2eaa2832dSBarry Smith 3e090d566SSatish Balay #include "src/snes/snesimpl.h" /*I "petscsnes.h" I*/ 4fb2e594dSBarry Smith 5fb2e594dSBarry Smith EXTERN_C_BEGIN 6*4b27c08aSLois Curfman McInnes EXTERN int SNESCreate_LS(SNES); 7*4b27c08aSLois Curfman McInnes EXTERN int SNESCreate_TR(SNES); 8ca44d042SBarry Smith EXTERN int SNESCreate_Test(SNES); 9fb2e594dSBarry Smith EXTERN_C_END 10eaa2832dSBarry Smith 1182bf6240SBarry Smith /* 1282bf6240SBarry Smith This is used by SNESSetType() to make sure that at least one 1382bf6240SBarry Smith SNESRegisterAll() is called. In general, if there is more than one 1482bf6240SBarry Smith DLL then SNESRegisterAll() may be called several times. 1582bf6240SBarry Smith */ 164c49b128SBarry Smith extern PetscTruth SNESRegisterAllCalled; 1782bf6240SBarry Smith 184a2ae208SSatish Balay #undef __FUNCT__ 194a2ae208SSatish Balay #define __FUNCT__ "SNESRegisterAll" 2083f0b094SBarry Smith /*@C 2182bf6240SBarry Smith SNESRegisterAll - Registers all of the nonlinear solver methods in the SNES package. 22eaa2832dSBarry Smith 23fee21e36SBarry Smith Not Collective 24fee21e36SBarry Smith 2536851e7fSLois Curfman McInnes Level: advanced 2636851e7fSLois Curfman McInnes 2782bf6240SBarry Smith .keywords: SNES, register, all 28eaa2832dSBarry Smith 2982bf6240SBarry Smith .seealso: SNESRegisterDestroy() 30eaa2832dSBarry Smith @*/ 3182bf6240SBarry Smith int SNESRegisterAll(char *path) 32eaa2832dSBarry Smith { 3382bf6240SBarry Smith int ierr; 3482bf6240SBarry Smith 353a40ed3dSBarry Smith PetscFunctionBegin; 364c49b128SBarry Smith SNESRegisterAllCalled = PETSC_TRUE; 3782bf6240SBarry Smith 38*4b27c08aSLois Curfman McInnes ierr = SNESRegisterDynamic("ls", path,"SNESCreate_LS",SNESCreate_LS);CHKERRQ(ierr); 39*4b27c08aSLois Curfman McInnes ierr = SNESRegisterDynamic("tr", path,"SNESCreate_TR",SNESCreate_TR);CHKERRQ(ierr); 40f1af5d2fSBarry Smith ierr = SNESRegisterDynamic("test", path,"SNESCreate_Test", SNESCreate_Test);CHKERRQ(ierr); 4182bf6240SBarry Smith 423a40ed3dSBarry Smith PetscFunctionReturn(0); 43eaa2832dSBarry Smith } 4482bf6240SBarry Smith 45