Actual source code: svdregis.c
slepc-3.18.1 2022-11-02
1: /*
2: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3: SLEPc - Scalable Library for Eigenvalue Problem Computations
4: Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain
6: This file is part of SLEPc.
7: SLEPc is distributed under a 2-clause BSD license (see LICENSE).
8: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9: */
11: #include <slepc/private/svdimpl.h>
13: SLEPC_EXTERN PetscErrorCode SVDCreate_Cross(SVD);
14: SLEPC_EXTERN PetscErrorCode SVDCreate_Cyclic(SVD);
15: SLEPC_EXTERN PetscErrorCode SVDCreate_LAPACK(SVD);
16: SLEPC_EXTERN PetscErrorCode SVDCreate_Lanczos(SVD);
17: SLEPC_EXTERN PetscErrorCode SVDCreate_TRLanczos(SVD);
18: SLEPC_EXTERN PetscErrorCode SVDCreate_Randomized(SVD);
19: #if defined(SLEPC_HAVE_SCALAPACK)
20: SLEPC_EXTERN PetscErrorCode SVDCreate_ScaLAPACK(SVD);
21: #endif
22: #if defined(SLEPC_HAVE_ELEMENTAL)
23: SLEPC_EXTERN PetscErrorCode SVDCreate_Elemental(SVD);
24: #endif
25: #if defined(SLEPC_HAVE_PRIMME)
26: SLEPC_EXTERN PetscErrorCode SVDCreate_PRIMME(SVD);
27: #endif
29: /*@C
30: SVDRegisterAll - Registers all the singular value solvers in the SVD package.
32: Not Collective
34: Level: advanced
36: .seealso: SVDRegister()
37: @*/
38: PetscErrorCode SVDRegisterAll(void)
39: {
40: if (SVDRegisterAllCalled) return 0;
41: SVDRegisterAllCalled = PETSC_TRUE;
42: SVDRegister(SVDCROSS,SVDCreate_Cross);
43: SVDRegister(SVDCYCLIC,SVDCreate_Cyclic);
44: SVDRegister(SVDLAPACK,SVDCreate_LAPACK);
45: SVDRegister(SVDLANCZOS,SVDCreate_Lanczos);
46: SVDRegister(SVDTRLANCZOS,SVDCreate_TRLanczos);
47: SVDRegister(SVDRANDOMIZED,SVDCreate_Randomized);
48: #if defined(SLEPC_HAVE_SCALAPACK)
49: SVDRegister(SVDSCALAPACK,SVDCreate_ScaLAPACK);
50: #endif
51: #if defined(SLEPC_HAVE_ELEMENTAL)
52: SVDRegister(SVDELEMENTAL,SVDCreate_Elemental);
53: #endif
54: #if defined(SLEPC_HAVE_PRIMME)
55: SVDRegister(SVDPRIMME,SVDCreate_PRIMME);
56: #endif
57: return 0;
58: }
60: /*@C
61: SVDMonitorRegisterAll - Registers all the monitors in the SVD package.
63: Not Collective
65: Level: advanced
67: .seealso: SVDMonitorRegister()
68: @*/
69: PetscErrorCode SVDMonitorRegisterAll(void)
70: {
71: if (SVDMonitorRegisterAllCalled) return 0;
72: SVDMonitorRegisterAllCalled = PETSC_TRUE;
74: SVDMonitorRegister("first_approximation",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,SVDMonitorFirst,NULL,NULL);
75: SVDMonitorRegister("first_approximation",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,SVDMonitorFirstDrawLG,SVDMonitorFirstDrawLGCreate,NULL);
76: SVDMonitorRegister("all_approximations",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,SVDMonitorAll,NULL,NULL);
77: SVDMonitorRegister("all_approximations",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,SVDMonitorAllDrawLG,SVDMonitorAllDrawLGCreate,NULL);
78: SVDMonitorRegister("convergence_history",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,SVDMonitorConverged,SVDMonitorConvergedCreate,SVDMonitorConvergedDestroy);
79: SVDMonitorRegister("convergence_history",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,SVDMonitorConvergedDrawLG,SVDMonitorConvergedDrawLGCreate,SVDMonitorConvergedDestroy);
80: SVDMonitorRegister("conditioning",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,SVDMonitorConditioning,NULL,NULL);
81: return 0;
82: }