TBCI Numerical high perf. C++ Library  2.8.0
Macros | Functions | Variables
own_lapack_routines.cpp File Reference

Own LAPACK routines for the calculation of selected Eigenvalues by Andreas Ahland, translated by f2c. More...

#include "tbci/lapack/f2c.h"
#include <stdio.h>
Include dependency graph for own_lapack_routines.cpp:

Go to the source code of this file.

Macros

#define integer   long int
 
#define doublereal   double
 
#define doublecomplex   __complex__ double
 
#define real   float
 
#define complex   __complex__ float
 

Functions

long int own_ew_ (long int *job, long int *up, long int *n, long int *m, __complex__ double *ab, long int *ldab, __complex__ double *bb, long int *ldbb, double *vl, double *vu, double *w, __complex__ double *q, long int *ldq, __complex__ double *work, double *rwork, long int *iwork)
 – AHLAND driver routine (version 2.0) – Modified LAPACK-ROUTINE for the calculation of selected Eigenvalues, More...
 
long int own_ev_ (long int *n, long int *m, double *w, __complex__ double *z, long int *ldz, __complex__ double *q, long int *ldq, __complex__ double *work, double *rwork, long int *iwork, long int *ifail)
 – AHLAND driver routine (version 2.0) – More...
 

Variables

static long int c__9 = 9
 
static long int c__1 = 1
 
static double c_b14 = 1.
 
static __complex__ double c_b26 = {0.,0.}
 
static __complex__ double c_b27 = {1.,0.}
 

Detailed Description

Own LAPACK routines for the calculation of selected Eigenvalues by Andreas Ahland, translated by f2c.

Definition in file own_lapack_routines.cpp.

Macro Definition Documentation

#define complex   __complex__ float

Definition at line 21 of file own_lapack_routines.cpp.

#define doublecomplex   __complex__ double

Definition at line 19 of file own_lapack_routines.cpp.

#define doublereal   double

Definition at line 18 of file own_lapack_routines.cpp.

#define integer   long int

Definition at line 17 of file own_lapack_routines.cpp.

#define real   float

Function Documentation

long int own_ev_ ( long int *  n,
long int *  m,
double *  w,
__complex__ double *  z,
long int *  ldz,
__complex__ double *  q,
long int *  ldq,
__complex__ double *  work,
double *  rwork,
long int *  iwork,
long int *  ifail 
)

– AHLAND driver routine (version 2.0) –

Modified LAPACK-ROUTINE for the calculation of selected Eigenvalues

Version 2.0, Andreas Ahland 14.8.96

.. Scalar Arguments .. .. .. Array Arguments .. ..

Purpose:


Calculates the Eigenvectors. ew has to be called before.

 The variables are described in own_ew_() .
Parameters
IFAIL(output) INTEGER array, dimension (M) If JOBZ == 'V', then if INFO == 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge. If JOBZ == 'N', then IFAIL is not referenced.
Z(output) COMPLEX*16 array, dimension (LDZ, max(1,M)) If JOBZ == 'V', then if INFO == 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i -th column of Z holding the eigenvector associated with W(i). If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL. If JOBZ == 'N', then Z is not referenced. Note: the user must ensure that at least max(1,M) columns are supplied in the array Z; if RANGE == 'V', the exact value of M is not known in advance and an upper bound must be used.
LDZ(input) INTEGER The leading dimension of the array Z. LDZ >= 1, and if JOBZ == 'V', LDZ >= N.

Definition at line 452 of file own_lapack_routines.cpp.

References i.

Referenced by eig().

long int own_ew_ ( long int *  job,
long int *  up,
long int *  n,
long int *  m,
__complex__ double *  ab,
long int *  ldab,
__complex__ double *  bb,
long int *  ldbb,
double *  vl,
double *  vu,
double *  w,
__complex__ double *  q,
long int *  ldq,
__complex__ double *  work,
double *  rwork,
long int *  iwork 
)

– AHLAND driver routine (version 2.0) – Modified LAPACK-ROUTINE for the calculation of selected Eigenvalues,

Eigenvalues are calculated using the ev routine
Version 2.0, Andreas Ahland 14.8.96

.. Scalar Arguments ..
..
.. Array Arguments ..
..
Purpose
ZHBGVX computes some of the eigenvalues, and optionally, the eigenvectors of a complex generalized Hermitian-definite banded eigenproblem, of the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian and banded, and B is also positive definite.
Parameters
JOB(input) INTEGER = '0': Compute eigenvalues only; = '1': Compute eigenvalues and eigenvectors.
UP(input) INTEGER = '1': Upper triangles of A and B are stored; = '0': Lower triangles of A and B are stored.
N(input) INTEGER The order of the matrices A and B. N >= 0.
M(output) INTEGER The total number of eigenvalues found. 0 <= M <= N. If RANGE == 'A', M = N, and if RANGE == 'I', M = IU-IL+1.
AB(input/output) COMPLEX*16 array, dimension (LDAB, N) On entry, the upper or lower triangle of the Hermitian band matrix A, stored in the first ka+1 rows of the array. The j -th column of A is stored in the j -th column of the array AB as follows:
if UPLO == 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
if UPLO == 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
On exit, the contents of AB are destroyed.
LDAB(input) INTEGER The leading dimension of the array AB. LDAB >= KA+1.
BB(input/output) COMPLEX*16 array, dimension (LDBB, N) On entry, the upper or lower triangle of the Hermitian band matrix B, stored in the first kb+1 rows of the array. The j -th column of B is stored in the j -th column of the array BB as follows:
if UPLO == 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
if UPLO == 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
On exit, the factor S from the split Cholesky factorization B = S**H*S, as returned by ZPBSTF.
LDBB(input) INTEGER The leading dimension of the array BB. LDBB >= KB+1.
Q(output) COMPLEX*16 array, dimension (LDQ, N) If JOBZ == 'V', the N -by-N unitary matrix used in the reduction to tridiagonal form. If JOBZ == 'N', the array Q is not referenced.
VL(input) DOUBLE PRECISION
VU(input) DOUBLE PRECISION If RANGE == 'V', the lower and upper bounds of the interval to be searched for eigenvalues. VL < VU . Not referenced if RANGE == 'A' or 'I'.
IL(input) INTEGER
IU(input) INTEGER If RANGE == 'I', the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N == 0. Not referenced if RANGE == 'A' or 'V'.
W(output) DOUBLE PRECISION array, dimension (N) The first M elements contain the selected eigenvalues in ascending order.
Qcomplex*16 array, dimension (ldq,N), stores the transformation
LDQ(input) INTEGER The leading dimension of the array Q. If JOBZ == 'V', then LDQ >= max(1,N).
WORK(workspace) COMPLEX*16 array, dimension (N)
RWORK(workspace) DOUBLE PRECISION array, dimension (7*N)
IWORK(workspace) INTEGER array, dimension (3*N)
Returns
INFO (output) INTEGER = 0: successful exit < 0: if INFO == -i, the i -th argument had an illegal value > 0: if INFO == i, then i eigenvectors failed to converge. Their indices are stored in array IFAIL.

.. Local Scalars ..

Parameters
ABSTOL(input) DOUBLE PRECISION
     The absolute error tolerance for the eigenvalues.
     An approximate eigenvalue is accepted as converged
     when it is determined to lie in an interval \a [a,b]
     of width less than or equal to

             \a ABSTOL + \a EPS *   \a max( |a|,|b| ) ,

     where \a EPS is the machine precision.  If \a ABSTOL is less than
     or equal to zero, then \a EPS*|T|  will be used in its place,
     where \a |T| is the 1-norm of the tridiagonal matrix obtained
     by reducing \a AB to tridiagonal form.

     Eigenvalues will be computed most accurately when \a ABSTOL is
     set to twice the underflow threshold \a 2*DLAMCH('S'), not zero.

     If this routine returns with \a INFO>0, indicating that some
     eigenvectors did not converge, try setting \a ABSTOL to
     \a 2*DLAMCH('S').

     See "Computing Small Singular Values of Bidiagonal Matrices
     with Guaranteed High Relative Accuracy," by Demmel and
     Kahan, LAPACK Working Note #3.

Definition at line 170 of file own_lapack_routines.cpp.

References dlamch_(), do_lio(), e_wsle(), min, s_wsle(), sigma, std::sqrt(), TRUE_, and xerbla_().

Referenced by eig().

Variable Documentation

long int c__1 = 1
static

Definition at line 27 of file own_lapack_routines.cpp.

long int c__9 = 9
static

Definition at line 26 of file own_lapack_routines.cpp.

double c_b14 = 1.
static

Definition at line 28 of file own_lapack_routines.cpp.

__complex__ double c_b26 = {0.,0.}
static

Definition at line 29 of file own_lapack_routines.cpp.

__complex__ double c_b27 = {1.,0.}
static

Definition at line 30 of file own_lapack_routines.cpp.