Date: 2021-02-01T14:42:11+00:00

Actual source code: dlregispep.c
slepc-3.14.2 2021-02-01
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-2020, 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/pepimpl.h>

     13: static PetscBool PEPPackageInitialized = PETSC_FALSE;

     15: const char *PEPBasisTypes[] = {"MONOMIAL","CHEBYSHEV1","CHEBYSHEV2","LEGENDRE","LAGUERRE","HERMITE","PEPBasis","PEP_BASIS_",0};
     16: const char *PEPScaleTypes[] = {"NONE","SCALAR","DIAGONAL","BOTH","PEPScale","PEP_SCALE_",0};
     17: const char *PEPRefineTypes[] = {"NONE","SIMPLE","MULTIPLE","PEPRefine","PEP_REFINE_",0};
     18: const char *PEPRefineSchemes[] = {"","SCHUR","MBE","EXPLICIT","PEPRefineScheme","PEP_REFINE_SCHEME_",0};
     19: const char *PEPExtractTypes[] = {"","NONE","NORM","RESIDUAL","STRUCTURED","PEPExtract","PEP_EXTRACT_",0};
     20: const char *PEPErrorTypes[] = {"ABSOLUTE","RELATIVE","BACKWARD","PEPErrorType","PEP_ERROR_",0};
     21: const char *const PEPConvergedReasons_Shifted[] = {"","DIVERGED_SYMMETRY_LOST","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","PEPConvergedReason","PEP_",0};
     22: const char *const*PEPConvergedReasons = PEPConvergedReasons_Shifted + 4;
     23: const char *PEPJDProjectionTypes[] = {"HARMONIC","ORTHOGONAL","PEPJDProjection","PEP_JD_PROJECTION_",0};

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

     29:    Level: developer

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

     38:   PetscFunctionListDestroy(&PEPList);
     39:   PEPPackageInitialized = PETSC_FALSE;
     40:   PEPRegisterAllCalled  = PETSC_FALSE;
     41:   return(0);
     42: }

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

     49:    Level: developer

     51: .seealso: SlepcInitialize()
     52: @*/
     53: PetscErrorCode PEPInitializePackage(void)
     54: {
     55:   char           logList[256];
     56:   PetscBool      opt,pkg;
     57:   PetscClassId   classids[1];

     61:   if (PEPPackageInitialized) return(0);
     62:   PEPPackageInitialized = PETSC_TRUE;
     63:   /* Register Classes */
     64:   PetscClassIdRegister("PEP Solver",&PEP_CLASSID);
     65:   /* Register Constructors */
     66:   PEPRegisterAll();
     67:   /* Register Events */
     68:   PetscLogEventRegister("PEPSetUp",PEP_CLASSID,&PEP_SetUp);
     69:   PetscLogEventRegister("PEPSolve",PEP_CLASSID,&PEP_Solve);
     70:   PetscLogEventRegister("PEPRefine",PEP_CLASSID,&PEP_Refine);
     71:   /* Process Info */
     72:   classids[0] = PEP_CLASSID;
     73:   PetscInfoProcessClass("pep",1,&classids[0]);
     74:   /* Process summary exclusions */
     75:   PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,sizeof(logList),&opt);
     76:   if (opt) {
     77:     PetscStrInList("pep",logList,',',&pkg);
     78:     if (pkg) { PetscLogEventDeactivateClass(PEP_CLASSID); }
     79:   }
     80:   /* Register package finalizer */
     81:   PetscRegisterFinalize(PEPFinalizePackage);
     82:   return(0);
     83: }

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

     90:   This one registers all the PEP methods that are in the basic SLEPc libslepcpep
     91:   library.
     92:  */
     93: SLEPC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcpep()
     94: {

     98:   PEPInitializePackage();
     99:   return(0);
    100: }
    101: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */