EVSL  1.1.0
EigenValues Slicing Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
misc_la.c File Reference

Miscellaneous linear algebra functions. More...

#include <stdio.h>
#include <string.h>
#include "def.h"
#include "blaslapack.h"
#include "struct.h"
#include "internal_proto.h"

Go to the source code of this file.

Macros

#define USE_DGEMV   1
 
#define NGS_MAX   2
 

Functions

int SymmTridEig (double *eigVal, double *eigVec, int n, const double *diag, const double *sdiag)
 compute all eigenvalues and eigenvectors of a symmetric tridiagonal matrix More...
 
int SymmTridEigS (double *eigVal, double *eigVec, int n, double vl, double vu, int *nevO, const double *diag, const double *sdiag)
 compute eigenvalues and eigenvectors of a symmetric tridiagonal matrix in a slice More...
 
void SymEigenSolver (int n, double *A, int lda, double *Q, int ldq, double *lam)
 interface to LAPACK SYMMETRIC EIGEN-SOLVER More...
 
void CGS_DGKS (int n, int k, int i_max, double *Q, double *v, double *nrmv, double *w)
 Classical GS reortho with Daniel, Gragg, Kaufman, Stewart test. More...
 
void CGS_DGKS2 (int n, int k, int i_max, double *Z, double *Q, double *v, double *w)
 Classical GS reortho. No test. just do i_max times used in generalized ev problems. More...
 
void orth (double *V, int n, int k, double *Vo, double *work)
 Orthogonalize columns of n-by-k matrix V. More...
 

Detailed Description

Miscellaneous linear algebra functions.

Definition in file misc_la.c.

Macro Definition Documentation

#define NGS_MAX   2

Definition at line 260 of file misc_la.c.

Referenced by ChebLanNr(), ChebLanTr(), LanDosG(), LanTrbounds(), orth(), RatLanNr(), and RatLanTr().

#define USE_DGEMV   1

Definition at line 14 of file misc_la.c.

Function Documentation

void CGS_DGKS ( int  n,
int  k,
int  i_max,
double *  Q,
double *  v,
double *  nrmv,
double *  w 
)

Classical GS reortho with Daniel, Gragg, Kaufman, Stewart test.

Definition at line 195 of file misc_la.c.

References DAXPY(), DDOT(), DGEMV(), DNRM2(), evsl_timer(), evslstat, and _evslstat::t_reorth.

Referenced by ChebLanNr(), ChebLanTr(), LanDosG(), LanTrbounds(), orth(), RatLanNr(), and RatLanTr().

Here is the call graph for this function:

Here is the caller graph for this function:

void CGS_DGKS2 ( int  n,
int  k,
int  i_max,
double *  Z,
double *  Q,
double *  v,
double *  w 
)

Classical GS reortho. No test. just do i_max times used in generalized ev problems.

Definition at line 235 of file misc_la.c.

References DAXPY(), DDOT(), DGEMV(), evsl_timer(), evslstat, and _evslstat::t_reorth.

Referenced by ChebLanNr(), ChebLanTr(), LanDosG(), LanTrbounds(), RatLanNr(), and RatLanTr().

Here is the call graph for this function:

Here is the caller graph for this function:

void orth ( double *  V,
int  n,
int  k,
double *  Vo,
double *  work 
)

Orthogonalize columns of n-by-k matrix V.

Parameters
nnumber of rows in V
VMatrix which columns are to be orthogonalized
knumber of columns in V
[out]VoOutput matrix
workwork

Definition at line 269 of file misc_la.c.

References CGS_DGKS(), DCOPY(), DDOT(), DSCAL(), and NGS_MAX.

Referenced by ChebSI().

Here is the call graph for this function:

Here is the caller graph for this function:

void SymEigenSolver ( int  n,
double *  A,
int  lda,
double *  Q,
int  ldq,
double *  lam 
)

interface to LAPACK SYMMETRIC EIGEN-SOLVER



Definition at line 156 of file misc_la.c.

References DSYEV(), evsl_timer(), evslstat, Malloc, and _evslstat::t_eig.

Referenced by ChebLanTr(), ChebSI(), LanTrbounds(), and RatLanTr().

Here is the call graph for this function:

Here is the caller graph for this function:

int SymmTridEig ( double *  eigVal,
double *  eigVec,
int  n,
const double *  diag,
const double *  sdiag 
)

compute all eigenvalues and eigenvectors of a symmetric tridiagonal matrix


Parameters
nThe dimension of the symmetric tridiagonal matrix
diag[],sdiag[]Define the symmetric tridiagonal matrix: the diagonal elements are diag[0,...,n-1] in order and the subdiagonal elements are sdiag[0,...,n-2] in order
[out]eigValThe output vector of length n containing all eigenvalues in ascending order
[out]eigVecThe output n-by-n matrix with columns as eigenvectors, in the order as elements in eigVal. If NULL, then no eigenvector will be computed
Returns
The flag returned by the

LAPACK routine DSTEV() (if double) or stev_() (if float)

Definition at line 36 of file misc_la.c.

References DSTEV(), evsl_timer(), evslstat, Malloc, save_vec(), and _evslstat::t_eig.

Referenced by ChebLanNr(), LanBounds(), LanDos(), LanDosG(), and RatLanNr().

Here is the call graph for this function:

Here is the caller graph for this function:

int SymmTridEigS ( double *  eigVal,
double *  eigVec,
int  n,
double  vl,
double  vu,
int *  nevO,
const double *  diag,
const double *  sdiag 
)

compute eigenvalues and eigenvectors of a symmetric tridiagonal matrix in a slice


Parameters
nThe dimension of the symmetric tridiagonal matrix
diag[],sdiag[]define the symmetric tridiagonal matrix.
[out]eigValTotal number of eigenvalues found.
[out]eigVecThe first M elements contain teh selected eigenvalues in ascending oredr
[in]vlIf range='V', The lower bound of the interval to be searched for eigen values.
[in]vuIf range='V', the upper bound of the interval to be searched for eigenvalues.
[in]nevOIf range='I', the index of the smallest eigen value to be returned.

This routine computes selected eigenvalues/vectors as specified by a

range of values. This is a wrapper to the LAPACK routine DSTEMR().

Definition at line 93 of file misc_la.c.

References Calloc, DSTEMR(), evsl_timer(), evslstat, Malloc, and _evslstat::t_eig.

Referenced by ChebLanNr(), and RatLanNr().

Here is the call graph for this function:

Here is the caller graph for this function: