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

  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;

 18: #undef __FUNCT__  
 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_LS",SNESCreate_LS);
 39:   SNESRegisterDynamic("tr",   path,"SNESCreate_TR",SNESCreate_TR);
 40:   SNESRegisterDynamic("test", path,"SNESCreate_Test", SNESCreate_Test);

 42:   return(0);
 43: }