Date: 2020-01-13T12:00:59+00:00

Actual source code: dlregissvd.c
slepc-3.12.2 2020-01-13
Report Typos and Errors

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

     13: static PetscBool SVDPackageInitialized = PETSC_FALSE;

     15: const char *SVDErrorTypes[] = {"ABSOLUTE","RELATIVE","SVDErrorType","SVD_ERROR_",0};
     16: const char *SVDPRIMMEMethods[] = {"","HYBRID","NORMALEQUATIONS","AUGMENTED","SVDPRIMMEMethod","SVD_PRIMME_",0};
     17: const char *const SVDConvergedReasons_Shifted[] = {"","","DIVERGED_BREAKDOWN","DIVERGED_ITS","CONVERGED_ITERATING","CONVERGED_TOL","CONVERGED_USER","SVDConvergedReason","SVD_",0};
     18: const char *const*SVDConvergedReasons = SVDConvergedReasons_Shifted + 4;

     20: /*@C
     21:    SVDFinalizePackage - This function destroys everything in the Slepc interface
     22:    to the SVD package. It is called from SlepcFinalize().

     24:    Level: developer

     26: .seealso: SlepcFinalize()
     27: @*/
     28: PetscErrorCode SVDFinalizePackage(void)
     29: {

     33:   PetscFunctionListDestroy(&SVDList);
     34:   SVDPackageInitialized = PETSC_FALSE;
     35:   SVDRegisterAllCalled  = PETSC_FALSE;
     36:   return(0);
     37: }

     39: /*@C
     40:    SVDInitializePackage - This function initializes everything in the SVD package.
     41:    It is called from PetscDLLibraryRegister() when using dynamic libraries, and
     42:    on the first call to SVDCreate() when using static libraries.

     44:    Level: developer

     46: .seealso: SlepcInitialize()
     47: @*/
     48: PetscErrorCode SVDInitializePackage(void)
     49: {
     50:   char           logList[256];
     51:   PetscBool      opt,pkg;

     55:   if (SVDPackageInitialized) return(0);
     56:   SVDPackageInitialized = PETSC_TRUE;
     57:   /* Register Classes */
     58:   PetscClassIdRegister("SVD Solver",&SVD_CLASSID);
     59:   /* Register Constructors */
     60:   SVDRegisterAll();
     61:   /* Register Events */
     62:   PetscLogEventRegister("SVDSetUp",SVD_CLASSID,&SVD_SetUp);
     63:   PetscLogEventRegister("SVDSolve",SVD_CLASSID,&SVD_Solve);
     64:   /* Process info exclusions */
     65:   PetscOptionsGetString(NULL,NULL,"-info_exclude",logList,sizeof(logList),&opt);
     66:   if (opt) {
     67:     PetscStrInList("svd",logList,',',&pkg);
     68:     if (pkg) { PetscInfoDeactivateClass(SVD_CLASSID); }
     69:   }
     70:   /* Process summary exclusions */
     71:   PetscOptionsGetString(NULL,NULL,"-log_exclude",logList,sizeof(logList),&opt);
     72:   if (opt) {
     73:     PetscStrInList("svd",logList,',',&pkg);
     74:     if (pkg) { PetscLogEventDeactivateClass(SVD_CLASSID); }
     75:   }
     76:   /* Register package finalizer */
     77:   PetscRegisterFinalize(SVDFinalizePackage);
     78:   return(0);
     79: }

     81: #if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
     82: /*
     83:   PetscDLLibraryRegister - This function is called when the dynamic library
     84:   it is in is opened.

     86:   This one registers all the SVD methods that are in the basic SLEPc libslepcsvd
     87:   library.
     88:  */
     89: SLEPC_EXTERN PetscErrorCode PetscDLLibraryRegister_slepcsvd()
     90: {

     94:   SVDInitializePackage();
     95:   return(0);
     96: }
     97: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */