Date: 2021-09-20T09:43:50+00:00

Actual source code: dlregiseps.c
slepc-3.15.2 2021-09-20
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-2021, 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_",0};
     16: const char *EPSErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","EPSErrorType","EPS_ERROR_",0};
     17: const char *EPSPowerShiftTypes[] = {"CONSTANT","RAYLEIGH","WILKINSON","EPSPowerShiftType","EPS_POWER_SHIFT_",0};
     18: const char *EPSLanczosReorthogTypes[] = {"LOCAL","FULL","SELECTIVE","PERIODIC","PARTIAL","DELAYED","EPSLanczosReorthogType","EPS_LANCZOS_REORTHOG_",0};
     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_",0};
     20: const char *EPSCISSQuadRules[] = {"(not set yet)","TRAPEZOIDAL","CHEBYSHEV","EPSCISSQuadRule","EPS_CISS_QUADRULE_",0};
     21: const char *EPSCISSExtractions[] = {"RITZ","HANKEL","EPSCISSExtraction","EPS_CISS_EXTRACTION_",0};
     22: const char *EPSEVSLDOSMethods[] = {"KPM","LANCZOS","EPSEVSLDOSMethod","EPS_EVSL_DOS_",0};
     23: const char *EPSEVSLDampings[] = {"NONE","JACKSON","SIGMA","EPSEVSLDamping","EPS_EVSL_DAMPING_",0};
     24: const char *const EPSConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","EPSConvergedReason","EPS_",0};
     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: {

     40:   PetscFunctionListDestroy(&EPSList);
     41:   PetscFunctionListDestroy(&EPSMonitorList);
     42:   PetscFunctionListDestroy(&EPSMonitorCreateList);
     43:   PetscFunctionListDestroy(&EPSMonitorDestroyList);
     44:   EPSPackageInitialized       = PETSC_FALSE;
     45:   EPSRegisterAllCalled        = PETSC_FALSE;
     46:   EPSMonitorRegisterAllCalled = PETSC_FALSE;
     47:   return(0);
     48: }

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

     55:   Level: developer

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

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

     92: #if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
     93: /*
     94:   PetscDLLibraryRegister - This function is called when the dynamic library
     95:   it is in is opened.

     97:   This one registers all the EPS methods that are in the basic SLEPc libslepceps
     98:   library.
     99:  */
    100: SLEPC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps()
    101: {

    105:   EPSInitializePackage();
    106:   return(0);
    107: }
    108: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */