Actual source code: slepcsys.h
slepc-3.19.2 2023-09-05
1: /*
2: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3: SLEPc - Scalable Library for Eigenvalue Problem Computations
4: Copyright (c) 2002-, 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: /* SUBMANSEC = sys */
22: #if defined(slepc_EXPORTS)
23: #define SLEPC_VISIBILITY_PUBLIC
24: #else
25: #define SLEPC_VISIBILITY_PUBLIC PETSC_DLLIMPORT
26: #endif
27: #define SLEPC_VISIBILITY_INTERNAL PETSC_VISIBILITY_INTERNAL
29: /*
30: Functions tagged with SLEPC_EXTERN in the header files are
31: always defined as extern "C" when compiled with C++ so they may be
32: used from C and are always visible in the shared libraries
33: */
34: #if defined(__cplusplus)
35: #define SLEPC_EXTERN extern "C" SLEPC_VISIBILITY_PUBLIC
36: #define SLEPC_INTERN extern "C" SLEPC_VISIBILITY_INTERNAL
37: #else
38: #define SLEPC_EXTERN extern SLEPC_VISIBILITY_PUBLIC
39: #define SLEPC_INTERN extern SLEPC_VISIBILITY_INTERNAL
40: #endif
42: /* ========================================================================== */
43: /*
44: slepcconf.h is created by the configure script and placed in ${PETSC_ARCH}/include.
45: It contains macro definitions set at configure time.
46: */
47: #include <slepcconf.h>
48: /*
49: slepcversion.h contains version info
50: */
51: #include <slepcversion.h>
52: #define SLEPC_AUTHOR_INFO " The SLEPc Team\n slepc-maint@upv.es\n https://slepc.upv.es\n"
54: /* ========================================================================== */
55: /*
56: The PETSc include files.
57: */
58: #include <petscmat.h>
59: /*
60: slepcmath.h contains definition of basic math functions
61: */
62: #include <slepcmath.h>
63: /*
64: slepcsc.h contains definition of sorting criterion
65: */
66: #include <slepcsc.h>
67: /*
68: slepcmat.h, slepcvec.h contain utilities related to Mat and Vec, extend functionality in PETSc
69: */
70: #include <slepcmat.h>
71: #include <slepcvec.h>
73: /*
74: Context for monitors of type XXXMonitorConverged
75: */
76: typedef struct _n_SlepcConvMon* SlepcConvMon;
78: /*
79: Initialization of SLEPc and other system routines
80: */
81: SLEPC_EXTERN PetscErrorCode SlepcInitialize(int*,char***,const char[],const char[]);
82: SLEPC_EXTERN PetscErrorCode SlepcInitializeNoPointers(int,char**,const char[],const char[]);
83: SLEPC_EXTERN PetscErrorCode SlepcInitializeNoArguments(void);
84: SLEPC_EXTERN PetscErrorCode SlepcFinalize(void);
85: SLEPC_EXTERN PetscErrorCode SlepcInitializeFortran(void);
86: SLEPC_EXTERN PetscErrorCode SlepcInitialized(PetscBool*);
87: SLEPC_EXTERN PetscErrorCode SlepcFinalized(PetscBool*);
88: SLEPC_EXTERN PetscErrorCode SlepcGetVersion(char[],size_t);
89: SLEPC_EXTERN PetscErrorCode SlepcGetVersionNumber(PetscInt*,PetscInt*,PetscInt*,PetscInt*);
90: SLEPC_EXTERN PetscErrorCode SlepcHasExternalPackage(const char[],PetscBool*);
92: SLEPC_EXTERN PetscErrorCode SlepcSNPrintfScalar(char*,size_t,PetscScalar,PetscBool);
94: SLEPC_EXTERN PetscBool SlepcInitializeCalled;
95: SLEPC_EXTERN PetscBool SlepcFinalizeCalled;
97: #if defined(PETSC_USE_COMPLEX)
98: #define SlepcLogFlopsComplex(a) PetscLogFlops((a))
99: #else
100: #define SlepcLogFlopsComplex(a) PetscLogFlops((4.0*a))
101: #endif
103: #if defined(PETSC_USE_COMPLEX)
104: #define SlepcLogGpuFlopsComplex(a) PetscLogGpuFlops((a))
105: #else
106: #define SlepcLogGpuFlopsComplex(a) PetscLogGpuFlops((4.0*a))
107: #endif
109: /*
110: Developer routines to be used with a debugger
111: */
112: #if defined(PETSC_USE_DEBUG)
113: SLEPC_EXTERN PetscErrorCode SlepcDebugViewMatrix(PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscInt,const char*,const char*);
114: #endif
115: #endif