Actual source code: dlregiseps.c

slepc-3.6.1 2015-09-03
Report Typos and Errors
  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-2015, 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 *const EPSConvergedReasons_Shifted[] = {"DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","","","CONVERGED_ITERATING","","CONVERGED_TOL","EPSConvergedReason","EPS_",0};
 32: const char *const*EPSConvergedReasons = EPSConvergedReasons_Shifted + 5;

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

 40:   Level: developer

 42: .seealso: SlepcFinalize()
 43: @*/
 44: PetscErrorCode EPSFinalizePackage(void)
 45: {

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

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

 62:   Level: developer

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

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

103: #if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)

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

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

119:   EPSInitializePackage();
120:   return(0);
121: }
122: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */