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