Actual source code: dlregiseps.c
slepc-3.10.1 2018-10-23
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-2018, 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 *const EPSConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","EPSConvergedReason","EPS_",0};
     23: const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 4;

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

     29:   Level: developer

     31: .seealso: SlepcFinalize()
     32: @*/
     33: PetscErrorCode EPSFinalizePackage(void)
     34: {

     38:   PetscFunctionListDestroy(&EPSList);
     39:   EPSPackageInitialized = PETSC_FALSE;
     40:   EPSRegisterAllCalled  = PETSC_FALSE;
     41:   return(0);
     42: }

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

     49:   Level: developer

     51: .seealso: SlepcInitialize()
     52: @*/
     53: PetscErrorCode EPSInitializePackage()
     54: {
     55:   char           logList[256];
     56:   PetscBool      opt,pkg;

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

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

     91:   This one registers all the EPS methods that are in the basic SLEPc libslepceps
     92:   library.
     93:  */
     94: PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps()
     95: {

     99:   EPSInitializePackage();
    100:   return(0);
    101: }
    102: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */