ezarpack/arpack.hpp - low level C++ interface to FORTRAN routines of ARPACK

namespace f77

External ARPACK-NG subroutines *aupd()

These subroutines implement the Reverse Communication Interface for the Implicitly Restarted Arnoldi Iteration.

void dsaupd_(int&, const char*, const int&, const char*, const int&, const double&, double[], const int&, double[], const int&, int[], int[], double[], double[], const int&, int&)

External ARPACK-NG FORTRAN 77 subroutine dsaupd().

void dnaupd_(int&, const char*, const int&, const char*, const int&, const double&, double[], const int&, double[], const int&, int[], int[], double[], double[], const int&, int&)

External ARPACK-NG FORTRAN 77 subroutine dnaupd().

void znaupd_(int&, const char*, const int&, const char*, const int&, const double&, dcomplex*, const int&, dcomplex*, const int&, int[], int[], dcomplex*, dcomplex*, const int&, double[], int&)

External ARPACK-NG FORTRAN 77 subroutine znaupd().

External ARPACK-NG subroutines *eupd()

These subroutines return the converged approximations to eigenvalues of \( \hat O \mathbf{z} = \lambda \hat B\mathbf{z} \) and (optionally):

  • the corresponding approximate eigenvectors;

  • an orthonormal basis for the associated approximate invariant subspace;

  • both.

void dseupd_(const int&, const char*, const int[], double[], double[], const int&, const double&, const char*, const int&, const char*, const int&, const double&, double[], const int&, double[], const int&, int[], int[], double[], double[], const int&, int&)

External ARPACK-NG FORTRAN 77 subroutine dseupd().

void dneupd_(const int&, const char*, const int[], double[], double[], double[], const int&, const double&, const double&, double[], const char*, const int&, const char*, const int&, const double&, double[], const int&, double[], const int&, int[], int[], double[], double[], const int&, int&)

External ARPACK-NG FORTRAN 77 subroutine dneupd().

void zneupd_(const int&, const char*, const int[], dcomplex*, dcomplex*, const int&, const dcomplex&, dcomplex*, const char*, const int&, const char*, const int&, const double&, dcomplex*, const int&, dcomplex*, const int&, int[], int[], dcomplex*, dcomplex*, const int&, double[], int&)

External ARPACK-NG FORTRAN 77 subroutine zneupd().

Functions

template<bool Symmetric = false>
inline void aupd(rci_flag &ido, const char *bmat, int n, const char *which, int nev, double tol, double *resid, int ncv, double *v, int ldv, int *iparam, int *ipntr, double *workd, double *workl, int lworkl, int &info)

C++ wrapper for the Reverse Communication Interface ARPACK-NG subroutines dsaupd_() and dnaupd_().

Template Parameters:

Symmetric – If true, calls dsaupd_(), otherwise calls dnaupd_().

Parameters:
  • ido – Reverse communication flag.

  • bmat – Specifies the type of the semi-inner product matrix B.

  • n – Dimension of the eigenproblem.

  • which – Specifies which of the Ritz values of OP to compute.

  • nev – Number of eigenvalues of OP to be computed.

  • tol – Stopping criterion: relative tolerance of the Ritz value.

  • resid – Initial residual vector.

  • ncv – How many Lanczos/Arnoldi vectors to generate at each iteration.

  • v – Contains the final set of Lanczos/Arnoldi basis vectors.

  • ldv – Leading dimension of v as declared in the calling program.

  • iparam – Array of input/output parameter flags.

  • ipntr – Pointer to mark the starting locations in the workd and workl arrays for matrices/vectors used by the Lanczos/Arnoldi iteration.

  • workd – Array to be used in the basic Lanczos/Arnoldi iteration for reverse communication.

  • workl – Work array.

  • lworkl – Dimension of workl.

  • info – Initial residual vector type (input) and error codes (output).

inline void aupd(rci_flag &ido, const char *bmat, int n, const char *which, int nev, double tol, dcomplex *resid, int ncv, dcomplex *v, int ldv, int *iparam, int *ipntr, dcomplex *workd, dcomplex *workl, int lworkl, double *rwork, int &info)

C++ wrapper for the Reverse Communication Interface ARPACK-NG subroutine znaupd_().

Parameters:
  • ido – Reverse communication flag.

  • bmat – Specifies the type of the semi-inner product matrix B.

  • n – Dimension of the eigenproblem.

  • which – Specifies which of the Ritz values of OP to compute.

  • nev – Number of eigenvalues of OP to be computed.

  • tol – Stopping criterion: relative tolerance of the Ritz value.

  • resid – Initial residual vector.

  • ncv – How many Arnoldi vectors to generate at each iteration.

  • v – Contains the final set of Arnoldi basis vectors.

  • ldv – Leading dimension of v as declared in the calling program.

  • iparam – Array of input/output parameter flags.

  • ipntr – Pointer to mark the starting locations in the workd and workl arrays for matrices/vectors used by the Arnoldi iteration.

  • workd – Array to be used in the basic Arnoldi iteration for reverse communication.

  • workl – Work array.

  • lworkl – Dimension of workl.

  • rwork – Work array of dimension ncv.

  • info – Initial residual vector type (input) and error codes (output).

inline void eupd(int rvec, const char *howmny, const int *select, double *d, double *z, int ldz, double sigma, const char *bmat, int n, const char *which, int nev, double tol, double *resid, int ncv, double *v, int ldv, int *iparam, int *ipntr, double *workd, double *workl, int lworkl, int &info)

C++ wrapper for the post-processing ARPACK-NG subroutine dseupd_().

Parameters:
  • rvec – Specifies whether to compute Ritz vectors.

  • howmny – Specifies how many Ritz vectors are wanted.

  • select – Selection of Ritz vectors to be computed.

  • d – Approximate Ritz values (output).

  • z – Approximate B-orthonormal Ritz vectors (output).

  • ldz – The leading dimension of the array Z.

  • sigma – Shift for spectral transformations.

  • bmat – Specifies the type of the semi-inner product matrix B.

  • n – Dimension of the eigenproblem.

  • which – Specifies which of the Ritz values of OP to compute.

  • nev – Number of eigenvalues of OP to be computed.

  • tol – Stopping criterion: relative tolerance of the Ritz value.

  • resid – Initial residual vector.

  • ncv – How many Lanczos vectors to generate at each iteration.

  • v – Contains the final set of Lanczos basis vectors.

  • ldv – Leading dimension of v as declared in the calling program.

  • iparam – Array of input/output parameter flags.

  • ipntr – Pointer to mark the starting locations in the workd and workl arrays for matrices/vectors used by the Lanczos iteration.

  • workd – Array to be used in the basic Lanczos iteration for reverse communication.

  • workl – Work array.

  • lworkl – Dimension of workl.

  • info – Initial residual vector type (input) and error codes (output).

inline void eupd(int rvec, const char *howmny, const int *select, double *dr, double *di, double *z, int ldz, double sigmar, double sigmai, double *workev, const char *bmat, int n, const char *which, int nev, double tol, double *resid, int ncv, double *v, int ldv, int *iparam, int *ipntr, double *workd, double *workl, int lworkl, int &info)

C++ wrapper for the post-processing ARPACK-NG subroutine dneupd_().

Parameters:
  • rvec – Specifies whether to compute Ritz/Schur vectors.

  • howmny – Specifies the form of the basis for the invariant subspace.

  • select – Selection of Ritz vectors to be computed.

  • dr – Real parts of approximate Ritz values (output).

  • di – Imaginary parts of approximate Ritz values (output).

  • z – Approximate B-orthonormal Ritz vectors (output).

  • ldz – The leading dimension of the array Z.

  • sigmar – Real part of the shift for spectral transformations.

  • sigmai – Imaginary part of the shift for spectral transformations.

  • workev – Work array.

  • bmat – Specifies the type of the semi-inner product matrix B.

  • n – Dimension of the eigenproblem.

  • which – Specifies which of the Ritz values of OP to compute.

  • nev – Number of eigenvalues of OP to be computed.

  • tol – Stopping criterion: relative tolerance of the Ritz value.

  • resid – Initial residual vector.

  • ncv – How many Arnoldi vectors to generate at each iteration.

  • v – Contains the final set of Arnoldi basis vectors.

  • ldv – Leading dimension of v as declared in the calling program.

  • iparam – Array of input/output parameter flags.

  • ipntr – Pointer to mark the starting locations in the workd and workl arrays for matrices/vectors used by the Arnoldi iteration.

  • workd – Array to be used in the basic Arnoldi iteration for reverse communication.

  • workl – Work array.

  • lworkl – Dimension of workl.

  • info – Initial residual vector type (input) and error codes (output).

inline void eupd(int rvec, const char *howmny, const int *select, dcomplex *d, dcomplex *z, int ldz, dcomplex sigma, dcomplex *workev, const char *bmat, int n, const char *which, int nev, double tol, dcomplex *resid, int ncv, dcomplex *v, int ldv, int *iparam, int *ipntr, dcomplex *workd, dcomplex *workl, int lworkl, double *rwork, int &info)

C++ wrapper for the post-processing ARPACK-NG subroutine zneupd_().

Parameters:
  • rvec – Specifies whether to compute Ritz/Schur vectors.

  • howmny – Specifies the form of the basis for the invariant subspace.

  • select – Selection of Ritz vectors to be computed.

  • d – Approximate Ritz values (output).

  • z – Approximate B-orthonormal Ritz vectors (output).

  • ldz – The leading dimension of the array Z.

  • sigma – Shift for spectral transformations.

  • workev – Work array.

  • bmat – Specifies the type of the semi-inner product matrix B.

  • n – Dimension of the eigenproblem.

  • which – Specifies which of the Ritz values of OP to compute.

  • nev – Number of eigenvalues of OP to be computed.

  • tol – Stopping criterion: relative tolerance of the Ritz value.

  • resid – Initial residual vector.

  • ncv – How many Arnoldi vectors to generate at each iteration.

  • v – Contains the final set of Arnoldi basis vectors.

  • ldv – Leading dimension of v as declared in the calling program.

  • iparam – Array of input/output parameter flags.

  • ipntr – Pointer to mark the starting locations in the workd and workl arrays for matrices/vectors used by the Arnoldi iteration.

  • workd – Array to be used in the basic Arnoldi iteration for reverse communication.

  • workl – Work array.

  • lworkl – Dimension of workl.

  • rwork – Work array of dimension ncv.

  • info – Initial residual vector type (input) and error codes (output).