Actual source code: slepcsys.h

slepc-3.16.1 2021-11-17
Report Typos and Errors
  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-2021, 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: */
 10: /*
 11:    This include file contains definitions of system functions. It is included
 12:    by all other SLEPc include files.
 13: */

 15: #if !defined(SLEPCSYS_H)
 16: #define SLEPCSYS_H

 18: #include <petscsys.h>

 20: #if defined(slepc_EXPORTS)
 21: #define SLEPC_VISIBILITY_PUBLIC 
 22: #else
 23: #define SLEPC_VISIBILITY_PUBLIC PETSC_DLLIMPORT
 24: #endif
 25: #define SLEPC_VISIBILITY_INTERNAL PETSC_VISIBILITY_INTERNAL

 27: /*
 28:     Functions tagged with SLEPC_EXTERN in the header files are
 29:   always defined as extern "C" when compiled with C++ so they may be
 30:   used from C and are always visible in the shared libraries
 31: */
 32: #if defined(__cplusplus)
 33: #define SLEPC_EXTERN extern "C" SLEPC_VISIBILITY_PUBLIC
 34: #define SLEPC_INTERN extern "C" SLEPC_VISIBILITY_INTERNAL
 35: #else
 36: #define SLEPC_EXTERN extern SLEPC_VISIBILITY_PUBLIC
 37: #define SLEPC_INTERN extern SLEPC_VISIBILITY_INTERNAL
 38: #endif

 40: /* ========================================================================== */
 41: /*
 42:    slepcconf.h is created by the configure script and placed in ${PETSC_ARCH}/include.
 43:    It contains macro definitions set at configure time.
 44: */
 45: #include <slepcconf.h>
 46: /*
 47:     slepcversion.h contains version info
 48: */
 49: #include <slepcversion.h>
 50: #define SLEPC_AUTHOR_INFO "       The SLEPc Team\n    slepc-maint@upv.es\n https://slepc.upv.es\n"

 52: /* ========================================================================== */
 53: /*
 54:    The PETSc include files.
 55: */
 56: #include <petscmat.h>
 57: /*
 58:     slepcmath.h contains definition of basic math functions
 59: */
 60: #include <slepcmath.h>
 61: /*
 62:     slepcsc.h contains definition of sorting criterion
 63: */
 64: #include <slepcsc.h>
 65: /*
 66:     slepcmat.h, slepcvec.h contain utilities related to Mat and Vec, extend functionality in PETSc
 67: */
 68: #include <slepcmat.h>
 69: #include <slepcvec.h>

 71: /*
 72:     Context for monitors of type XXXMonitorConverged
 73: */
 74: typedef struct _n_SlepcConvMon* SlepcConvMon;

 76: /*
 77:     Initialization of SLEPc and other system routines
 78: */
 79: SLEPC_EXTERN PetscErrorCode SlepcInitialize(int*,char***,const char[],const char[]);
 80: SLEPC_EXTERN PetscErrorCode SlepcInitializeNoPointers(int,char**,const char[],const char[]);
 81: SLEPC_EXTERN PetscErrorCode SlepcInitializeNoArguments(void);
 82: SLEPC_EXTERN PetscErrorCode SlepcFinalize(void);
 83: SLEPC_EXTERN PetscErrorCode SlepcInitializeFortran(void);
 84: SLEPC_EXTERN PetscErrorCode SlepcInitialized(PetscBool*);
 85: SLEPC_EXTERN PetscErrorCode SlepcFinalized(PetscBool*);
 86: SLEPC_EXTERN PetscErrorCode SlepcGetVersion(char[],size_t);
 87: SLEPC_EXTERN PetscErrorCode SlepcGetVersionNumber(PetscInt*,PetscInt*,PetscInt*,PetscInt*);
 88: SLEPC_EXTERN PetscErrorCode SlepcHasExternalPackage(const char[],PetscBool*);

 90: SLEPC_EXTERN PetscErrorCode SlepcSNPrintfScalar(char*,size_t,PetscScalar,PetscBool);

 92: SLEPC_EXTERN PetscBool SlepcInitializeCalled;
 93: SLEPC_EXTERN PetscBool SlepcFinalizeCalled;

 95: #if defined(PETSC_USE_COMPLEX)
 96: #define SlepcLogFlopsComplex(a) PetscLogFlops((a))
 97: #else
 98: #define SlepcLogFlopsComplex(a) PetscLogFlops((4.0*a))
 99: #endif

101: #if defined(PETSC_USE_COMPLEX)
102: #define SlepcLogGpuFlopsComplex(a) PetscLogGpuFlops((a))
103: #else
104: #define SlepcLogGpuFlopsComplex(a) PetscLogGpuFlops((4.0*a))
105: #endif

107: /*
108:     Developer routines to be used with a debugger
109: */
110: #if defined(PETSC_USE_DEBUG)
111: SLEPC_EXTERN PetscErrorCode SlepcDebugViewMatrix(PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscInt,const char*,const char*);
112: #endif
113: #endif