Actual source code: snesregi.c

petsc-3.11.2 2019-05-18
Report Typos and Errors

  2:  #include <petsc/private/snesimpl.h>

  4: PETSC_EXTERN PetscErrorCode SNESCreate_NEWTONLS(SNES);
  5: PETSC_EXTERN PetscErrorCode SNESCreate_NEWTONTR(SNES);
  6: PETSC_EXTERN PetscErrorCode SNESCreate_NRichardson(SNES);
  7: PETSC_EXTERN PetscErrorCode SNESCreate_KSPONLY(SNES);
  8: PETSC_EXTERN PetscErrorCode SNESCreate_KSPTRANSPOSEONLY(SNES);
  9: PETSC_EXTERN PetscErrorCode SNESCreate_VINEWTONRSLS(SNES);
 10: PETSC_EXTERN PetscErrorCode SNESCreate_VINEWTONSSLS(SNES);
 11: PETSC_EXTERN PetscErrorCode SNESCreate_NGMRES(SNES);
 12: PETSC_EXTERN PetscErrorCode SNESCreate_QN(SNES);
 13: PETSC_EXTERN PetscErrorCode SNESCreate_Shell(SNES);
 14: PETSC_EXTERN PetscErrorCode SNESCreate_NGS(SNES);
 15: PETSC_EXTERN PetscErrorCode SNESCreate_NCG(SNES);
 16: PETSC_EXTERN PetscErrorCode SNESCreate_FAS(SNES);
 17: PETSC_EXTERN PetscErrorCode SNESCreate_MS(SNES);
 18: PETSC_EXTERN PetscErrorCode SNESCreate_NASM(SNES);
 19: PETSC_EXTERN PetscErrorCode SNESCreate_Anderson(SNES);
 20: PETSC_EXTERN PetscErrorCode SNESCreate_ASPIN(SNES);
 21: PETSC_EXTERN PetscErrorCode SNESCreate_Composite(SNES);
 22: PETSC_EXTERN PetscErrorCode SNESCreate_Patch(SNES);

 24: const char *SNESConvergedReasons_Shifted[] = {" ","DIVERGED_JACOBIAN_DOMAIN","DIVERGED_DTOL","DIVERGED_LOCAL_MIN","DIVERGED_INNER","DIVERGED_LINE_SEARCH","DIVERGED_MAX_IT",
 25:                                               "DIVERGED_FNORM_NAN","DIVERGED_LINEAR_SOLVE","DIVERGED_FUNCTION_COUNT","DIVERGED_FUNCTION_DOMAIN",
 26:                                               "CONVERGED_ITERATING"," ","CONVERGED_FNORM_ABS","CONVERGED_FNORM_RELATIVE",
 27:                                               "CONVERGED_SNORM_RELATIVE","CONVERGED_ITS"," ","CONVERGED_TR_DELTA","SNESConvergedReason","",0};
 28: const char *const *SNESConvergedReasons = SNESConvergedReasons_Shifted + 11;

 30: const char *SNESNormSchedules_Shifted[]    = {"DEFAULT","NONE","ALWAYS","INITIALONLY","FINALONLY","INITIALFINALONLY","SNESNormSchedule","SNES_NORM_",0};
 31: const char *const *const SNESNormSchedules = SNESNormSchedules_Shifted + 1;

 33: const char *SNESFunctionTypes_Shifted[]    = {"DEFAULT","UNPRECONDITIONED","PRECONDITIONED","SNESFunctionType","SNES_FUNCTION_",0};
 34: const char *const *const SNESFunctionTypes = SNESFunctionTypes_Shifted + 1;

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

 39:    Not Collective

 41:    Level: advanced

 43: .keywords: SNES, register, all

 45: .seealso:  SNESRegisterDestroy()
 46: @*/
 47: PetscErrorCode  SNESRegisterAll(void)
 48: {

 52:   if (SNESRegisterAllCalled) return(0);
 53:   SNESRegisterAllCalled = PETSC_TRUE;

 55:   SNESRegister(SNESNEWTONLS,         SNESCreate_NEWTONLS);
 56:   SNESRegister(SNESNEWTONTR,         SNESCreate_NEWTONTR);
 57:   SNESRegister(SNESNRICHARDSON,      SNESCreate_NRichardson);
 58:   SNESRegister(SNESKSPONLY,          SNESCreate_KSPONLY);
 59:   SNESRegister(SNESKSPTRANSPOSEONLY, SNESCreate_KSPTRANSPOSEONLY);
 60:   SNESRegister(SNESVINEWTONRSLS,     SNESCreate_VINEWTONRSLS);
 61:   SNESRegister(SNESVINEWTONSSLS,     SNESCreate_VINEWTONSSLS);
 62:   SNESRegister(SNESNGMRES,           SNESCreate_NGMRES);
 63:   SNESRegister(SNESQN,               SNESCreate_QN);
 64:   SNESRegister(SNESSHELL,            SNESCreate_Shell);
 65:   SNESRegister(SNESNGS,              SNESCreate_NGS);
 66:   SNESRegister(SNESNCG,              SNESCreate_NCG);
 67:   SNESRegister(SNESFAS,              SNESCreate_FAS);
 68:   SNESRegister(SNESMS,               SNESCreate_MS);
 69:   SNESRegister(SNESNASM,             SNESCreate_NASM);
 70:   SNESRegister(SNESANDERSON,         SNESCreate_Anderson);
 71:   SNESRegister(SNESASPIN,            SNESCreate_ASPIN);
 72:   SNESRegister(SNESCOMPOSITE,        SNESCreate_Composite);
 73:   SNESRegister(SNESPATCH,            SNESCreate_Patch);
 74:   return(0);
 75: }