Actual source code: dlregiseps.c

slepc-3.5.2 2014-10-10
Report Typos and Errors
  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-2014, 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 *EPSPowerShiftTypes[] = {"CONSTANT","RAYLEIGH","WILKINSON","EPSPowerShiftType","EPS_POWER_SHIFT_",0};
 28: const char *EPSLanczosReorthogTypes[] = {"LOCAL","FULL","SELECTIVE","PERIODIC","PARTIAL","DELAYED","EPSLanczosReorthogType","EPS_LANCZOS_REORTHOG_",0};
 29: 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};

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

 37:   Level: developer

 39: .seealso: SlepcFinalize()
 40: @*/
 41: PetscErrorCode EPSFinalizePackage(void)
 42: {

 46:   PetscFunctionListDestroy(&EPSList);
 47:   EPSPackageInitialized = PETSC_FALSE;
 48:   EPSRegisterAllCalled  = PETSC_FALSE;
 49:   return(0);
 50: }

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

 59:   Level: developer

 61: .seealso: SlepcInitialize()
 62: @*/
 63: PetscErrorCode EPSInitializePackage()
 64: {
 65:   char           logList[256];
 66:   char           *className;
 67:   PetscBool      opt;

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

100: #if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)

104: /*
105:   PetscDLLibraryRegister - This function is called when the dynamic library
106:   it is in is opened.

108:   This one registers all the EPS methods that are in the basic SLEPc libslepceps
109:   library.
110:  */
111: PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepceps()
112: {

116:   EPSInitializePackage();
117:   return(0);
118: }
119: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */