Actual source code: snesregi.c
petsc-3.6.1 2015-08-06
2: #include <petsc/private/snesimpl.h> /*I "petscsnes.h" I*/
4: PETSC_EXTERN PetscErrorCode SNESCreate_NEWTONLS(SNES);
5: PETSC_EXTERN PetscErrorCode SNESCreate_NEWTONTR(SNES);
6: PETSC_EXTERN PetscErrorCode SNESCreate_Test(SNES);
7: PETSC_EXTERN PetscErrorCode SNESCreate_NRichardson(SNES);
8: PETSC_EXTERN PetscErrorCode SNESCreate_KSPONLY(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);
23: const char *SNESConvergedReasons_Shifted[] = {" "," ","DIVERGED_LOCAL_MIN","DIVERGED_INNER","DIVERGED_LINE_SEARCH","DIVERGED_MAX_IT",
24: "DIVERGED_FNORM_NAN","DIVERGED_LINEAR_SOLVE","DIVERGED_FUNCTION_COUNT","DIVERGED_FUNCTION_DOMAIN",
25: "CONVERGED_ITERATING"," ","CONVERGED_FNORM_ABS","CONVERGED_FNORM_RELATIVE",
26: "CONVERGED_SNORM_RELATIVE","CONVERGED_ITS"," ","CONVERGED_TR_DELTA","SNESConvergedReason","",0};
27: const char *const *SNESConvergedReasons = SNESConvergedReasons_Shifted + 10;
29: const char *SNESNormSchedules_Shifted[] = {"DEFAULT","NONE","ALWAYS","INITIALONLY","FINALONLY","INITIALFINALONLY","SNESNormSchedule","SNES_NORM_",0};
30: const char *const *const SNESNormSchedules = SNESNormSchedules_Shifted + 1;
32: const char *SNESFunctionTypes_Shifted[] = {"DEFAULT","UNPRECONDITIONED","PRECONDITIONED","SNESFunctionType","SNES_FUNCTION_",0};
33: const char *const *const SNESFunctionTypes = SNESFunctionTypes_Shifted + 1;
35: /*
36: This is used by SNESSetType() to make sure that at least one
37: SNESRegisterAll() is called. In general, if there is more than one
38: DLL then SNESRegisterAll() may be called several times.
39: */
40: extern PetscBool SNESRegisterAllCalled;
44: /*@C
45: SNESRegisterAll - Registers all of the nonlinear solver methods in the SNES package.
47: Not Collective
49: Level: advanced
51: .keywords: SNES, register, all
53: .seealso: SNESRegisterDestroy()
54: @*/
55: PetscErrorCode SNESRegisterAll(void)
56: {
60: if (SNESRegisterAllCalled) return(0);
61: SNESRegisterAllCalled = PETSC_TRUE;
63: SNESRegister(SNESNEWTONLS, SNESCreate_NEWTONLS);
64: SNESRegister(SNESNEWTONTR, SNESCreate_NEWTONTR);
65: SNESRegister(SNESTEST, SNESCreate_Test);
66: SNESRegister(SNESNRICHARDSON, SNESCreate_NRichardson);
67: SNESRegister(SNESKSPONLY, SNESCreate_KSPONLY);
68: SNESRegister(SNESVINEWTONRSLS, SNESCreate_VINEWTONRSLS);
69: SNESRegister(SNESVINEWTONSSLS, SNESCreate_VINEWTONSSLS);
70: SNESRegister(SNESNGMRES, SNESCreate_NGMRES);
71: SNESRegister(SNESQN, SNESCreate_QN);
72: SNESRegister(SNESSHELL, SNESCreate_Shell);
73: SNESRegister(SNESNGS, SNESCreate_NGS);
74: SNESRegister(SNESNCG, SNESCreate_NCG);
75: SNESRegister(SNESFAS, SNESCreate_FAS);
76: SNESRegister(SNESMS, SNESCreate_MS);
77: SNESRegister(SNESNASM, SNESCreate_NASM);
78: SNESRegister(SNESANDERSON, SNESCreate_Anderson);
79: SNESRegister(SNESASPIN, SNESCreate_ASPIN);
80: SNESRegister(SNESCOMPOSITE, SNESCreate_Composite);
81: return(0);
82: }