Date: 2016-09-29T11:11:18+00:00

Actual source code: dlregiseps.c
slepc-3.7.3 2016-09-29
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-2016, Universitat Politecnica de Valencia, Spain

      6:    This file is part of SLEPc.

      8:    SLEPc is free software: you can redistribute it and/or modify it under  the
      9:    terms of version 3 of the GNU Lesser General Public License as published by
     10:    the Free Software Foundation.

     12:    SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
     13:    WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
     14:    FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
     15:    more details.

     17:    You  should have received a copy of the GNU Lesser General  Public  License
     18:    along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
     19:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     20: */

     22: #include <slepc/private/epsimpl.h>

     24: static PetscBool EPSPackageInitialized = PETSC_FALSE;

     26: const char *EPSBalanceTypes[] = {"NONE","ONESIDE","TWOSIDE","USER","EPSBalance","EPS_BALANCE_",0};
     27: const char *EPSErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","EPSErrorType","EPS_ERROR_",0};
     28: const char *EPSPowerShiftTypes[] = {"CONSTANT","RAYLEIGH","WILKINSON","EPSPowerShiftType","EPS_POWER_SHIFT_",0};
     29: const char *EPSLanczosReorthogTypes[] = {"LOCAL","FULL","SELECTIVE","PERIODIC","PARTIAL","DELAYED","EPSLanczosReorthogType","EPS_LANCZOS_REORTHOG_",0};
     30: 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};
     31: const char *EPSCISSQuadRules[] = {"(not set yet)","TRAPEZOIDAL","CHEBYSHEV","EPSCISSQuadRule","EPS_CISS_QUADRULE_",0};
     32: const char *EPSCISSExtractions[] = {"RITZ","HANKEL","EPSCISSExtraction","EPS_CISS_EXTRACTION_",0};
     33: const char *const EPSConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","EPSConvergedReason","EPS_",0};
     34: const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 4;

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

     42:   Level: developer

     44: .seealso: SlepcFinalize()
     45: @*/
     46: PetscErrorCode EPSFinalizePackage(void)
     47: {

     51:   PetscFunctionListDestroy(&EPSList);
     52:   EPSPackageInitialized = PETSC_FALSE;
     53:   EPSRegisterAllCalled  = PETSC_FALSE;
     54:   return(0);
     55: }

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

     64:   Level: developer

     66: .seealso: SlepcInitialize()
     67: @*/
     68: PetscErrorCode EPSInitializePackage()
     69: {
     70:   char           logList[256];
     71:   char           *className;
     72:   PetscBool      opt;

     76:   if (EPSPackageInitialized) return(0);
     77:   EPSPackageInitialized = PETSC_TRUE;
     78:   /* Register Classes */
     79:   PetscClassIdRegister("EPS Solver",&EPS_CLASSID);
     80:   /* Register Constructors */
     81:   EPSRegisterAll();
     82:   /* Register Events */
     83:   PetscLogEventRegister("EPSSetUp",EPS_CLASSID,&EPS_SetUp);
     84:   PetscLogEventRegister("EPSSolve",EPS_CLASSID,&EPS_Solve);
     85:   /* Process info exclusions */
     86:   PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,256,&opt);
     87:   if (opt) {
     88:     PetscStrstr(logList,"eps",&className);
     89:     if (className) {
     90:       PetscInfoDeactivateClass(EPS_CLASSID);
     91:     }
     92:   }
     93:   /* Process summary exclusions */
     94:   PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,256,&opt);
     95:   if (opt) {
     96:     PetscStrstr(logList,"eps",&className);
     97:     if (className) {
     98:       PetscLogEventDeactivateClass(EPS_CLASSID);
     99:     }
    100:   }
    101:   PetscRegisterFinalize(EPSFinalizePackage);
    102:   return(0);
    103: }

    105: #if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)

    109: /*
    110:   PetscDLLibraryRegister - This function is called when the dynamic library
    111:   it is in is opened.

    113:   This one registers all the EPS methods that are in the basic SLEPc libslepceps
    114:   library.
    115:  */
    116: PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps()
    117: {

    121:   EPSInitializePackage();
    122:   return(0);
    123: }
    124: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */