Line data Source code
1 : /* 2 : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 : SLEPc - Scalable Library for Eigenvalue Problem Computations 4 : Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain 5 : 6 : This file is part of SLEPc. 7 : SLEPc is distributed under a 2-clause BSD license (see LICENSE). 8 : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9 : */ 10 : 11 : #include <slepc/private/pepimpl.h> /*I "slepcpep.h" I*/ 12 : 13 : SLEPC_EXTERN PetscErrorCode PEPCreate_Linear(PEP); 14 : SLEPC_EXTERN PetscErrorCode PEPCreate_QArnoldi(PEP); 15 : SLEPC_EXTERN PetscErrorCode PEPCreate_TOAR(PEP); 16 : SLEPC_EXTERN PetscErrorCode PEPCreate_STOAR(PEP); 17 : SLEPC_EXTERN PetscErrorCode PEPCreate_JD(PEP); 18 : #if defined(PETSC_USE_COMPLEX) 19 : SLEPC_EXTERN PetscErrorCode PEPCreate_CISS(PEP); 20 : #endif 21 : 22 : /*@C 23 : PEPRegisterAll - Registers all the solvers in the PEP package. 24 : 25 : Not Collective 26 : 27 : Level: advanced 28 : 29 : .seealso: PEPRegister() 30 : @*/ 31 354 : PetscErrorCode PEPRegisterAll(void) 32 : { 33 354 : PetscFunctionBegin; 34 354 : if (PEPRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS); 35 179 : PEPRegisterAllCalled = PETSC_TRUE; 36 179 : PetscCall(PEPRegister(PEPLINEAR,PEPCreate_Linear)); 37 179 : PetscCall(PEPRegister(PEPQARNOLDI,PEPCreate_QArnoldi)); 38 179 : PetscCall(PEPRegister(PEPTOAR,PEPCreate_TOAR)); 39 179 : PetscCall(PEPRegister(PEPSTOAR,PEPCreate_STOAR)); 40 179 : PetscCall(PEPRegister(PEPJD,PEPCreate_JD)); 41 : #if defined(PETSC_USE_COMPLEX) 42 179 : PetscCall(PEPRegister(PEPCISS,PEPCreate_CISS)); 43 : #endif 44 179 : PetscFunctionReturn(PETSC_SUCCESS); 45 : } 46 : 47 : /*@C 48 : PEPMonitorRegisterAll - Registers all the monitors in the PEP package. 49 : 50 : Not Collective 51 : 52 : Level: advanced 53 : 54 : .seealso: PEPMonitorRegister() 55 : @*/ 56 179 : PetscErrorCode PEPMonitorRegisterAll(void) 57 : { 58 179 : PetscFunctionBegin; 59 179 : if (PEPMonitorRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS); 60 179 : PEPMonitorRegisterAllCalled = PETSC_TRUE; 61 : 62 179 : PetscCall(PEPMonitorRegister("first_approximation",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,PEPMonitorFirst,NULL,NULL)); 63 179 : PetscCall(PEPMonitorRegister("first_approximation",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,PEPMonitorFirstDrawLG,PEPMonitorFirstDrawLGCreate,NULL)); 64 179 : PetscCall(PEPMonitorRegister("all_approximations",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,PEPMonitorAll,NULL,NULL)); 65 179 : PetscCall(PEPMonitorRegister("all_approximations",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,PEPMonitorAllDrawLG,PEPMonitorAllDrawLGCreate,NULL)); 66 179 : PetscCall(PEPMonitorRegister("convergence_history",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,PEPMonitorConverged,PEPMonitorConvergedCreate,PEPMonitorConvergedDestroy)); 67 179 : PetscCall(PEPMonitorRegister("convergence_history",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,PEPMonitorConvergedDrawLG,PEPMonitorConvergedDrawLGCreate,PEPMonitorConvergedDestroy)); 68 179 : PetscFunctionReturn(PETSC_SUCCESS); 69 : }