LCOV - code coverage report
Current view: top level - eps/interface - dlregiseps.c (source / functions) Hit Total Coverage
Test: SLEPc Lines: 35 35 100.0 %
Date: 2024-11-21 00:40:22 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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/epsimpl.h>
      12             : 
      13             : static PetscBool EPSPackageInitialized = PETSC_FALSE;
      14             : 
      15             : const char *EPSBalanceTypes[] = {"NONE","ONESIDE","TWOSIDE","USER","EPSBalance","EPS_BALANCE_",NULL};
      16             : const char *EPSErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","EPSErrorType","EPS_ERROR_",NULL};
      17             : const char *EPSPowerShiftTypes[] = {"CONSTANT","RAYLEIGH","WILKINSON","EPSPowerShiftType","EPS_POWER_SHIFT_",NULL};
      18             : const char *EPSKrylovSchurBSETypes[] = {"SHAO","GRUNING","PROJECTEDBSE","EPSKrylovSchurBSEType","EPS_KRYLOVSCHUR_BSE_",NULL};
      19             : const char *EPSLanczosReorthogTypes[] = {"LOCAL","FULL","SELECTIVE","PERIODIC","PARTIAL","DELAYED","EPSLanczosReorthogType","EPS_LANCZOS_REORTHOG_",NULL};
      20             : const char *EPSPRIMMEMethods[] = {"","DYNAMIC","DEFAULT_MIN_TIME","DEFAULT_MIN_MATVECS","ARNOLDI","GD","GD_PLUSK","GD_OLSEN_PLUSK","JD_OLSEN_PLUSK","RQI","JDQR","JDQMR","JDQMR_ETOL","SUBSPACE_ITERATION","LOBPCG_ORTHOBASIS","LOBPCG_ORTHOBASISW","EPSPRIMMEMethod","EPS_PRIMME_",NULL};
      21             : const char *EPSCISSQuadRules[] = {"(not set yet)","TRAPEZOIDAL","CHEBYSHEV","EPSCISSQuadRule","EPS_CISS_QUADRULE_",NULL};
      22             : const char *EPSCISSExtractions[] = {"RITZ","HANKEL","EPSCISSExtraction","EPS_CISS_EXTRACTION_",NULL};
      23             : const char *EPSEVSLDOSMethods[] = {"KPM","LANCZOS","EPSEVSLDOSMethod","EPS_EVSL_DOS_",NULL};
      24             : const char *EPSEVSLDampings[] = {"NONE","JACKSON","SIGMA","EPSEVSLDamping","EPS_EVSL_DAMPING_",NULL};
      25             : const char *const EPSConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","EPSConvergedReason","EPS_",NULL};
      26             : const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 4;
      27             : 
      28             : /*@C
      29             :   EPSFinalizePackage - This function destroys everything in the SLEPc interface
      30             :   to the EPS package. It is called from SlepcFinalize().
      31             : 
      32             :   Level: developer
      33             : 
      34             : .seealso: SlepcFinalize()
      35             : @*/
      36         558 : PetscErrorCode EPSFinalizePackage(void)
      37             : {
      38         558 :   PetscFunctionBegin;
      39         558 :   PetscCall(PetscFunctionListDestroy(&EPSList));
      40         558 :   PetscCall(PetscFunctionListDestroy(&EPSMonitorList));
      41         558 :   PetscCall(PetscFunctionListDestroy(&EPSMonitorCreateList));
      42         558 :   PetscCall(PetscFunctionListDestroy(&EPSMonitorDestroyList));
      43         558 :   EPSPackageInitialized       = PETSC_FALSE;
      44         558 :   EPSRegisterAllCalled        = PETSC_FALSE;
      45         558 :   EPSMonitorRegisterAllCalled = PETSC_FALSE;
      46         558 :   PetscFunctionReturn(PETSC_SUCCESS);
      47             : }
      48             : 
      49             : /*@C
      50             :   EPSInitializePackage - This function initializes everything in the EPS package.
      51             :   It is called from PetscDLLibraryRegister() when using dynamic libraries, and
      52             :   on the first call to EPSCreate() when using static libraries.
      53             : 
      54             :   Level: developer
      55             : 
      56             : .seealso: SlepcInitialize()
      57             : @*/
      58       12318 : PetscErrorCode EPSInitializePackage(void)
      59             : {
      60       12318 :   char           logList[256];
      61       12318 :   PetscBool      opt,pkg;
      62       12318 :   PetscClassId   classids[1];
      63             : 
      64       12318 :   PetscFunctionBegin;
      65       12318 :   if (EPSPackageInitialized) PetscFunctionReturn(PETSC_SUCCESS);
      66         558 :   EPSPackageInitialized = PETSC_TRUE;
      67             :   /* Register Classes */
      68         558 :   PetscCall(PetscClassIdRegister("EPS Solver",&EPS_CLASSID));
      69             :   /* Register Constructors */
      70         558 :   PetscCall(EPSRegisterAll());
      71             :   /* Register Monitors */
      72         558 :   PetscCall(EPSMonitorRegisterAll());
      73             :   /* Register Events */
      74         558 :   PetscCall(PetscLogEventRegister("EPSSetUp",EPS_CLASSID,&EPS_SetUp));
      75         558 :   PetscCall(PetscLogEventRegister("EPSSolve",EPS_CLASSID,&EPS_Solve));
      76         558 :   PetscCall(PetscLogEventRegister("EPSCISS_SVD",EPS_CLASSID,&EPS_CISS_SVD));
      77             :   /* Process Info */
      78         558 :   classids[0] = EPS_CLASSID;
      79         558 :   PetscCall(PetscInfoProcessClass("eps",1,&classids[0]));
      80             :   /* Process summary exclusions */
      81         558 :   PetscCall(PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,sizeof(logList),&opt));
      82         558 :   if (opt) {
      83           4 :     PetscCall(PetscStrInList("eps",logList,',',&pkg));
      84           4 :     if (pkg) PetscCall(PetscLogEventDeactivateClass(EPS_CLASSID));
      85             :   }
      86             :   /* Register package finalizer */
      87         558 :   PetscCall(PetscRegisterFinalize(EPSFinalizePackage));
      88         558 :   PetscFunctionReturn(PETSC_SUCCESS);
      89             : }
      90             : 
      91             : #if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
      92             : /*
      93             :   PetscDLLibraryRegister - This function is called when the dynamic library
      94             :   it is in is opened.
      95             : 
      96             :   This one registers all the EPS methods that are in the basic SLEPc libslepceps
      97             :   library.
      98             :  */
      99           1 : SLEPC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps(void)
     100             : {
     101           1 :   PetscFunctionBegin;
     102           1 :   PetscCall(EPSInitializePackage());
     103           1 :   PetscFunctionReturn(PETSC_SUCCESS);
     104             : }
     105             : #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */

Generated by: LCOV version 1.14