1 2 #include "src/snes/snesimpl.h" /*I "petscsnes.h" I*/ 3 4 EXTERN_C_BEGIN 5 EXTERN int SNESCreate_LS(SNES); 6 EXTERN int SNESCreate_TR(SNES); 7 EXTERN int SNESCreate_Test(SNES); 8 EXTERN_C_END 9 10 /* 11 This is used by SNESSetType() to make sure that at least one 12 SNESRegisterAll() is called. In general, if there is more than one 13 DLL then SNESRegisterAll() may be called several times. 14 */ 15 extern PetscTruth SNESRegisterAllCalled; 16 17 #undef __FUNCT__ 18 #define __FUNCT__ "SNESRegisterAll" 19 /*@C 20 SNESRegisterAll - Registers all of the nonlinear solver methods in the SNES package. 21 22 Not Collective 23 24 Level: advanced 25 26 .keywords: SNES, register, all 27 28 .seealso: SNESRegisterDestroy() 29 @*/ 30 int SNESRegisterAll(const char path[]) 31 { 32 int ierr; 33 34 PetscFunctionBegin; 35 SNESRegisterAllCalled = PETSC_TRUE; 36 37 ierr = SNESRegisterDynamic("ls", path,"SNESCreate_LS",SNESCreate_LS);CHKERRQ(ierr); 38 ierr = SNESRegisterDynamic("tr", path,"SNESCreate_TR",SNESCreate_TR);CHKERRQ(ierr); 39 ierr = SNESRegisterDynamic("test", path,"SNESCreate_Test", SNESCreate_Test);CHKERRQ(ierr); 40 41 PetscFunctionReturn(0); 42 } 43 44