Actual source code: snesregi.c

  1: /*$Id: snesregi.c,v 1.38 2001/03/23 23:24:07 balay Exp $*/

  3: #include "src/snes/snesimpl.h"     /*I  "petscsnes.h"  I*/

  5: EXTERN_C_BEGIN
  6: EXTERN int SNESCreate_EQ_LS(SNES);
  7: EXTERN int SNESCreate_EQ_TR(SNES);
  8: EXTERN int SNESCreate_UM_TR(SNES);
  9: EXTERN int SNESCreate_UM_LS(SNES);
 10: EXTERN int SNESCreate_Test(SNES);
 11: EXTERN_C_END
 12: 
 13: /*
 14:       This is used by SNESSetType() to make sure that at least one 
 15:     SNESRegisterAll() is called. In general, if there is more than one
 16:     DLL then SNESRegisterAll() may be called several times.
 17: */
 18: extern PetscTruth SNESRegisterAllCalled;

 20: /*@C
 21:    SNESRegisterAll - Registers all of the nonlinear solver methods in the SNES package.

 23:    Not Collective

 25:    Level: advanced

 27: .keywords: SNES, register, all

 29: .seealso:  SNESRegisterDestroy()
 30: @*/
 31: int SNESRegisterAll(char *path)
 32: {

 36:   SNESRegisterAllCalled = PETSC_TRUE;

 38:   SNESRegisterDynamic("ls",   path,"SNESCreate_EQ_LS",SNESCreate_EQ_LS);
 39:   SNESRegisterDynamic("tr",   path,"SNESCreate_EQ_TR",SNESCreate_EQ_TR);
 40:   SNESRegisterDynamic("test", path,"SNESCreate_Test", SNESCreate_Test);
 41:   SNESRegisterDynamic("umtr", path,"SNESCreate_UM_TR",SNESCreate_UM_TR);
 42:   SNESRegisterDynamic("umls", path,"SNESCreate_UM_LS",SNESCreate_UM_LS);

 44:   return(0);
 45: }