Actual source code: snesregi.c
petsc-3.4.5 2014-06-29
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_GS(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);
22: const char *SNESConvergedReasons_Shifted[] = {" "," ","DIVERGED_LOCAL_MIN","DIVERGED_INNER","DIVERGED_LINE_SEARCH","DIVERGED_MAX_IT",
23: "DIVERGED_FNORM_NAN","DIVERGED_LINEAR_SOLVE","DIVERGED_FUNCTION_COUNT","DIVERGED_FUNCTION_DOMAIN",
24: "CONVERGED_ITERATING"," ","CONVERGED_FNORM_ABS","CONVERGED_FNORM_RELATIVE",
25: "CONVERGED_SNORM_RELATIVE","CONVERGED_ITS"," ","CONVERGED_TR_DELTA","SNESConvergedReason","",0};
26: const char *const *SNESConvergedReasons = SNESConvergedReasons_Shifted + 10;
28: const char *SNESNormTypes_Shifted[] = {"DEFAULT","NONE","FUNCTION","INITIALONLY","FINALONLY","INITIALFINALONLY","SNESNormType","SNES_NORM_",0};
29: const char *const *const SNESNormTypes = SNESNormTypes_Shifted + 1;
31: /*
32: This is used by SNESSetType() to make sure that at least one
33: SNESRegisterAll() is called. In general, if there is more than one
34: DLL then SNESRegisterAll() may be called several times.
35: */
36: extern PetscBool SNESRegisterAllCalled;
40: /*@C
41: SNESRegisterAll - Registers all of the nonlinear solver methods in the SNES package.
43: Not Collective
45: Level: advanced
47: .keywords: SNES, register, all
49: .seealso: SNESRegisterDestroy()
50: @*/
51: PetscErrorCode SNESRegisterAll(void)
52: {
56: SNESRegisterAllCalled = PETSC_TRUE;
58: SNESRegister(SNESNEWTONLS, SNESCreate_NEWTONLS);
59: SNESRegister(SNESNEWTONTR, SNESCreate_NEWTONTR);
60: SNESRegister(SNESTEST, SNESCreate_Test);
61: SNESRegister(SNESNRICHARDSON, SNESCreate_NRichardson);
62: SNESRegister(SNESKSPONLY, SNESCreate_KSPONLY);
63: SNESRegister(SNESVINEWTONRSLS, SNESCreate_VINEWTONRSLS);
64: SNESRegister(SNESVINEWTONSSLS, SNESCreate_VINEWTONSSLS);
65: SNESRegister(SNESNGMRES, SNESCreate_NGMRES);
66: SNESRegister(SNESQN, SNESCreate_QN);
67: SNESRegister(SNESSHELL, SNESCreate_Shell);
68: SNESRegister(SNESGS, SNESCreate_GS);
69: SNESRegister(SNESNCG, SNESCreate_NCG);
70: SNESRegister(SNESFAS, SNESCreate_FAS);
71: SNESRegister(SNESMS, SNESCreate_MS);
72: SNESRegister(SNESNASM, SNESCreate_NASM);
73: SNESRegister(SNESANDERSON, SNESCreate_Anderson);
74: SNESRegister(SNESASPIN, SNESCreate_ASPIN);
75: return(0);
76: }