EVSL
1.1.0
EigenValues Slicing Library
|
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... | |
Miscellaneous linear algebra functions.
Definition in file misc_la.c.
#define NGS_MAX 2 |
Definition at line 260 of file misc_la.c.
Referenced by ChebLanNr(), ChebLanTr(), LanDosG(), LanTrbounds(), orth(), RatLanNr(), and RatLanTr().
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().
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().
void orth | ( | double * | V, |
int | n, | ||
int | k, | ||
double * | Vo, | ||
double * | work | ||
) |
Orthogonalize columns of n-by-k matrix V.
n | number of rows in V | |
V | Matrix which columns are to be orthogonalized | |
k | number of columns in V | |
[out] | Vo | Output matrix |
work | work |
Definition at line 269 of file misc_la.c.
References CGS_DGKS(), DCOPY(), DDOT(), DSCAL(), and NGS_MAX.
Referenced by ChebSI().
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().
int SymmTridEig | ( | double * | eigVal, |
double * | eigVec, | ||
int | n, | ||
const double * | diag, | ||
const double * | sdiag | ||
) |
compute all eigenvalues and eigenvectors of a symmetric tridiagonal matrix
n | The 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] | eigVal | The output vector of length n containing all eigenvalues in ascending order |
[out] | eigVec | The output n-by-n matrix with columns as eigenvectors, in the order as elements in eigVal. If NULL, then no eigenvector will be computed |
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().
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
n | The dimension of the symmetric tridiagonal matrix | |
diag[],sdiag[] | define the symmetric tridiagonal matrix. | |
[out] | eigVal | Total number of eigenvalues found. |
[out] | eigVec | The first M elements contain teh selected eigenvalues in ascending oredr |
[in] | vl | If range='V', The lower bound of the interval to be searched for eigen values. |
[in] | vu | If range='V', the upper bound of the interval to be searched for eigenvalues. |
[in] | nevO | If range='I', the index of the smallest eigen value to be returned. |
This routine computes selected eigenvalues/vectors as specified by a
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().