Actual source code: snesregi.c

  1: #define PETSCSNES_DLL

 3:  #include include/private/snesimpl.h

  6: EXTERN PetscErrorCode  SNESCreate_LS(SNES);
  7: EXTERN PetscErrorCode  SNESCreate_TR(SNES);
  8: EXTERN PetscErrorCode  SNESCreate_Test(SNES);

 11: const char *SNESConvergedReasons_Shifted[]  = {" "," ","DIVERGED_LOCAL_MIN"," ","DIVERGED_LS_FAILURE","DIVERGED_MAX_IT",
 12:                                                "DIVERGED_FNORM_NAN","DIVERGED_LINEAR_SOLVE","DIVERGED_FUNCTION_COUNT","DIVERGED_FUNCTION_DOMAIN",
 13:                                                "CONVERGED_ITERATING"," ","CONVERGED_FNORM_ABS","CONVERGED_FNORM_RELATIVE",
 14:                                                "CONVERGED_PNORM_RELATIVE"," "," ","CONVERGED_TR_DELTA","SNESConvergedReason","",0};
 15: const char **SNESConvergedReasons = SNESConvergedReasons_Shifted + 10;

 17: /*
 18:       This is used by SNESSetType() to make sure that at least one 
 19:     SNESRegisterAll() is called. In general, if there is more than one
 20:     DLL then SNESRegisterAll() may be called several times.
 21: */

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

 29:    Not Collective

 31:    Level: advanced

 33: .keywords: SNES, register, all

 35: .seealso:  SNESRegisterDestroy()
 36: @*/
 37: PetscErrorCode  SNESRegisterAll(const char path[])
 38: {

 42:   SNESRegisterAllCalled = PETSC_TRUE;

 44:   SNESRegisterDynamic("ls",   path,"SNESCreate_LS",SNESCreate_LS);
 45:   SNESRegisterDynamic("tr",   path,"SNESCreate_TR",SNESCreate_TR);
 46:   SNESRegisterDynamic("test", path,"SNESCreate_Test", SNESCreate_Test);

 48:   return(0);
 49: }