Date: 2024-12-02T08:56:49+00:00

Actual source code: arpack.h
slepc-3.22.2 2024-12-02
Report Typos and Errors

      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:    Private data structure used by the ARPACK interface
     12: */

     14: #pragma once

     16: typedef struct {
     17:   PetscInt     *select;
     18:   PetscScalar  *workev;
     19:   PetscScalar  *workd;
     20:   PetscScalar  *workl;
     21:   PetscInt     lworkl;
     22:   PetscReal    *rwork;
     23: } EPS_ARPACK;

     25: /*
     26:    Definition of routines from the ARPACK package
     27: */

     29: #if defined(PETSC_HAVE_MPIUNI) || defined(PETSC_HAVE_MSMPI)

     31: #if defined(PETSC_USE_COMPLEX)

     33: #if defined(PETSC_USE_REAL_SINGLE)

     35: #if defined(SLEPC_ARPACK_HAVE_UNDERSCORE)
     36: #define SLEPC_ARPACK(lcase,ucase) c##lcase##_
     37: #elif defined(SLEPC_ARPACK_HAVE_CAPS)
     38: #define SLEPC_ARPACK(lcase,ucase) C##ucase
     39: #else
     40: #define SLEPC_ARPACK(lcase,ucase) c##lcase
     41: #endif

     43: #else

     45: #if defined(SLEPC_ARPACK_HAVE_UNDERSCORE)
     46: #define SLEPC_ARPACK(lcase,ucase) z##lcase##_
     47: #elif defined(SLEPC_ARPACK_HAVE_CAPS)
     48: #define SLEPC_ARPACK(lcase,ucase) Z##ucase
     49: #else
     50: #define SLEPC_ARPACK(lcase,ucase) z##lcase
     51: #endif

     53: #endif

     55: #else

     57: #if defined(PETSC_USE_REAL_SINGLE)

     59: #if defined(SLEPC_ARPACK_HAVE_UNDERSCORE)
     60: #define SLEPC_ARPACK(lcase,ucase) s##lcase##_
     61: #elif defined(SLEPC_ARPACK_HAVE_CAPS)
     62: #define SLEPC_ARPACK(lcase,ucase) S##ucase
     63: #else
     64: #define SLEPC_ARPACK(lcase,ucase) s##lcase
     65: #endif

     67: #else

     69: #if defined(SLEPC_ARPACK_HAVE_UNDERSCORE)
     70: #define SLEPC_ARPACK(lcase,ucase) d##lcase##_
     71: #elif defined(SLEPC_ARPACK_HAVE_CAPS)
     72: #define SLEPC_ARPACK(lcase,ucase) D##ucase
     73: #else
     74: #define SLEPC_ARPACK(lcase,ucase) d##lcase
     75: #endif

     77: #endif

     79: #endif

     81: #else  /* not MPIUNI */

     83: #if defined(PETSC_USE_COMPLEX)

     85: #if defined(PETSC_USE_REAL_SINGLE)

     87: #if defined(SLEPC_ARPACK_HAVE_UNDERSCORE)
     88: #define SLEPC_ARPACK(lcase,ucase) pc##lcase##_
     89: #elif defined(SLEPC_ARPACK_HAVE_CAPS)
     90: #define SLEPC_ARPACK(lcase,ucase) PC##ucase
     91: #else
     92: #define SLEPC_ARPACK(lcase,ucase) pc##lcase
     93: #endif

     95: #else

     97: #if defined(SLEPC_ARPACK_HAVE_UNDERSCORE)
     98: #define SLEPC_ARPACK(lcase,ucase) pz##lcase##_
     99: #elif defined(SLEPC_ARPACK_HAVE_CAPS)
    100: #define SLEPC_ARPACK(lcase,ucase) PZ##ucase
    101: #else
    102: #define SLEPC_ARPACK(lcase,ucase) pz##lcase
    103: #endif

    105: #endif

    107: #else

    109: #if defined(PETSC_USE_REAL_SINGLE)

    111: #if defined(SLEPC_ARPACK_HAVE_UNDERSCORE)
    112: #define SLEPC_ARPACK(lcase,ucase) ps##lcase##_
    113: #elif defined(SLEPC_ARPACK_HAVE_CAPS)
    114: #define SLEPC_ARPACK(lcase,ucase) PS##ucase
    115: #else
    116: #define SLEPC_ARPACK(lcase,ucase) ps##lcase
    117: #endif

    119: #else

    121: #if defined(SLEPC_ARPACK_HAVE_UNDERSCORE)
    122: #define SLEPC_ARPACK(lcase,ucase) pd##lcase##_
    123: #elif defined(SLEPC_ARPACK_HAVE_CAPS)
    124: #define SLEPC_ARPACK(lcase,ucase) PD##ucase
    125: #else
    126: #define SLEPC_ARPACK(lcase,ucase) pd##lcase
    127: #endif

    129: #endif

    131: #endif

    133: #endif

    135: #if defined(PETSC_HAVE_MPIUNI) || defined(PETSC_HAVE_MSMPI)

    137: #define COMM_ARG

    139: #if !defined(PETSC_USE_COMPLEX)

    141: #define ARPACKnaupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_ARPACK(naupd,NAUPD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),1,2)
    142: #define ARPACKneupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y) SLEPC_ARPACK(neupd,NEUPD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),(x),(y),1,1,2)
    143: #define ARPACKsaupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_ARPACK(saupd,SAUPD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),1,2)
    144: #define ARPACKseupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w) SLEPC_ARPACK(seupd,SEUPD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(o),(p),(q),(r),(s),(t),(u),(v),(w),1,1,2)

    146: #else

    148: #define ARPACKnaupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_ARPACK(naupd,NAUPD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),1,2)
    149: #define ARPACKneupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x) SLEPC_ARPACK(neupd,NEUPD) ((a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),(x),1,1,2)

    151: #endif

    153: #else /* not MPIUNI */

    155: #define COMM_ARG MPI_Fint*,

    157: #if !defined(PETSC_USE_COMPLEX)

    159: #define ARPACKnaupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_ARPACK(naupd,NAUPD) ((comm),(a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),1,2)
    160: #define ARPACKneupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y) SLEPC_ARPACK(neupd,NEUPD) ((comm),(a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),(x),(y),1,1,2)
    161: #define ARPACKsaupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) SLEPC_ARPACK(saupd,SAUPD) ((comm),(a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),1,2)
    162: #define ARPACKseupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w) SLEPC_ARPACK(seupd,SEUPD) ((comm),(a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(o),(p),(q),(r),(s),(t),(u),(v),(w),1,1,2)

    164: #else

    166: #define ARPACKnaupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) SLEPC_ARPACK(naupd,NAUPD) ((comm),(a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),1,2)
    167: #define ARPACKneupd_(comm,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x) SLEPC_ARPACK(neupd,NEUPD) ((comm),(a),(b),(c),(d),(e),(f),(g),(h),(i),(j),(k),(l),(m),(n),(o),(p),(q),(r),(s),(t),(u),(v),(w),(x),1,1,2)

    169: #endif

    171: #endif

    173: SLEPC_EXTERN void   SLEPC_ARPACK(saupd,SAUPD)(COMM_ARG PetscInt*,char*,PetscInt*,const char*,PetscInt*,PetscReal*,PetscScalar*,PetscInt*,PetscScalar*,PetscInt*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscInt*,PetscInt*,int,int);
    174: SLEPC_EXTERN void   SLEPC_ARPACK(seupd,SEUPD)(COMM_ARG PetscInt*,char*,PetscInt*,PetscReal*,PetscReal*,PetscInt*,PetscReal*,char*,PetscInt*,const char*,PetscInt*,PetscReal*,PetscScalar*,PetscInt*,PetscScalar*,PetscInt*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscInt*,PetscInt*,int,int,int);

    176: #if !defined(PETSC_USE_COMPLEX)
    177: SLEPC_EXTERN void   SLEPC_ARPACK(naupd,NAUPD)(COMM_ARG PetscInt*,char*,PetscInt*,const char*,PetscInt*,PetscReal*,PetscScalar*,PetscInt*,PetscScalar*,PetscInt*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscInt*,PetscInt*,int,int);
    178: SLEPC_EXTERN void   SLEPC_ARPACK(neupd,NEUPD)(COMM_ARG PetscInt*,char*,PetscInt*,PetscReal*,PetscReal*,PetscReal*,PetscInt*,PetscReal*,PetscReal*,PetscReal*,char*,PetscInt*,const char*,PetscInt*,PetscReal*,PetscScalar*,PetscInt*,PetscScalar*,PetscInt*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscInt*,PetscInt*,int,int,int);
    179: #else
    180: SLEPC_EXTERN void   SLEPC_ARPACK(naupd,NAUPD)(COMM_ARG PetscInt*,char*,PetscInt*,const char*,PetscInt*,PetscReal*,PetscScalar*,PetscInt*,PetscScalar*,PetscInt*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscInt*,PetscReal*,PetscInt*,int,int);
    181: SLEPC_EXTERN void   SLEPC_ARPACK(neupd,NEUPD)(COMM_ARG PetscInt*,char*,PetscInt*,PetscScalar*,PetscScalar*,PetscInt*,PetscScalar*,PetscScalar*,char*,PetscInt*,const char*,PetscInt*,PetscReal*,PetscScalar*,PetscInt*,PetscScalar*,PetscInt*,PetscInt*,PetscInt*,PetscScalar*,PetscScalar*,PetscInt*,PetscReal*,PetscInt*,int,int,int);
    182: #endif