Date: 2023-01-26T12:18:31+00:00

Actual source code: dlregiseps.c
slepc-3.18.2 2023-01-26
Report Typos and Errors

      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/epsimpl.h>

     13: static PetscBool EPSPackageInitialized = PETSC_FALSE;

     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 *EPSLanczosReorthogTypes[] = {"LOCAL","FULL","SELECTIVE","PERIODIC","PARTIAL","DELAYED","EPSLanczosReorthogType","EPS_LANCZOS_REORTHOG_",NULL};
     19: 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};
     20: const char *EPSCISSQuadRules[] = {"(not set yet)","TRAPEZOIDAL","CHEBYSHEV","EPSCISSQuadRule","EPS_CISS_QUADRULE_",NULL};
     21: const char *EPSCISSExtractions[] = {"RITZ","HANKEL","EPSCISSExtraction","EPS_CISS_EXTRACTION_",NULL};
     22: const char *EPSEVSLDOSMethods[] = {"KPM","LANCZOS","EPSEVSLDOSMethod","EPS_EVSL_DOS_",NULL};
     23: const char *EPSEVSLDampings[] = {"NONE","JACKSON","SIGMA","EPSEVSLDamping","EPS_EVSL_DAMPING_",NULL};
     24: const char *const EPSConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","EPSConvergedReason","EPS_",NULL};
     25: const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 4;

     27: /*@C
     28:   EPSFinalizePackage - This function destroys everything in the SLEPc interface
     29:   to the EPS package. It is called from SlepcFinalize().

     31:   Level: developer

     33: .seealso: SlepcFinalize()
     34: @*/
     35: PetscErrorCode EPSFinalizePackage(void)
     36: {
     37:   PetscFunctionListDestroy(&EPSList);
     38:   PetscFunctionListDestroy(&EPSMonitorList);
     39:   PetscFunctionListDestroy(&EPSMonitorCreateList);
     40:   PetscFunctionListDestroy(&EPSMonitorDestroyList);
     41:   EPSPackageInitialized       = PETSC_FALSE;
     42:   EPSRegisterAllCalled        = PETSC_FALSE;
     43:   EPSMonitorRegisterAllCalled = PETSC_FALSE;
     44:   return 0;
     45: }

     47: /*@C
     48:   EPSInitializePackage - This function initializes everything in the EPS package.
     49:   It is called from PetscDLLibraryRegister() when using dynamic libraries, and
     50:   on the first call to EPSCreate() when using static libraries.

     52:   Level: developer

     54: .seealso: SlepcInitialize()
     55: @*/
     56: PetscErrorCode EPSInitializePackage(void)
     57: {
     58:   char           logList[256];
     59:   PetscBool      opt,pkg;
     60:   PetscClassId   classids[1];

     62:   if (EPSPackageInitialized) return 0;
     63:   EPSPackageInitialized = PETSC_TRUE;
     64:   /* Register Classes */
     65:   PetscClassIdRegister("EPS Solver",&EPS_CLASSID);
     66:   /* Register Constructors */
     67:   EPSRegisterAll();
     68:   /* Register Monitors */
     69:   EPSMonitorRegisterAll();
     70:   /* Register Events */
     71:   PetscLogEventRegister("EPSSetUp",EPS_CLASSID,&EPS_SetUp);
     72:   PetscLogEventRegister("EPSSolve",EPS_CLASSID,&EPS_Solve);
     73:   PetscLogEventRegister("EPSCISS_SVD",EPS_CLASSID,&EPS_CISS_SVD);
     74:   /* Process Info */
     75:   classids[0] = EPS_CLASSID;
     76:   PetscInfoProcessClass("eps",1,&classids[0]);
     77:   /* Process summary exclusions */
     78:   PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,sizeof(logList),&opt);
     79:   if (opt) {
     80:     PetscStrInList("eps",logList,',',&pkg);
     81:     if (pkg) PetscLogEventDeactivateClass(EPS_CLASSID);
     82:   }
     83:   /* Register package finalizer */
     84:   PetscRegisterFinalize(EPSFinalizePackage);
     85:   return 0;
     86: }

     88: #if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
     89: /*
     90:   PetscDLLibraryRegister - This function is called when the dynamic library
     91:   it is in is opened.

     93:   This one registers all the EPS methods that are in the basic SLEPc libslepceps
     94:   library.
     95:  */
     96: SLEPC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps(void)
     97: {
     98:   EPSInitializePackage();
     99:   return 0;
    100: }
    101: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */