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

Actual source code: dlregissvd.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/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;
     52:   PetscClassId   classids[1];

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

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

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

     92:   SVDInitializePackage();
     93:   return(0);
     94: }
     95: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */