eigen.c File Reference

Eigenvalue related functions: interval extraction, convergence checking and sorting. More...

#include "toeplitz.h"

Go to the source code of this file.

Classes

struct  interval_node_struct
struct  sort_aux_struct_

Typedefs

typedef struct interval_node_struct interval_node
typedef struct sort_aux_struct_ sort_aux_struct

Functions

void calc_intervals (interval_node *ilist, integer *n, double *t, double *lbg, double *ubg, integer *maxEig_interval)
static int sort_eigenvalues_aux (const void *p1, const void *p2)
void sort_eigenvalues (unsigned int extracted, unsigned int n, T *el, T *ev)
interval_cpu_infocalc_eigen_intervals (T *t, unsigned int n, T lbg, T ubg, unsigned int max_eig_interval, unsigned int *num_intervals)
unsigned int extract_eigenvalues (unsigned int n, unsigned int k, unsigned int max_k, unsigned int p_lda, unsigned int *converged, unsigned int *extracted, unsigned int required, T a, T b, const T *t, const T *p, const T *alpha, const T *beta, T tolerance, T *l, T *v)


Detailed Description

Eigenvalue related functions: interval extraction, convergence checking and sorting.

Author:
Leandro GraciĆ” Gil, leagragi@inf.upv.es
Date:
18/11/08

Definition in file eigen.c.


Typedef Documentation


Function Documentation

interval_cpu_info* calc_eigen_intervals ( T *  t,
unsigned int  n,
lbg,
ubg,
unsigned int  max_eig_interval,
unsigned int *  num_intervals 
)

Calculates intervals containing approximately the same number of eigenvalues along a given interval. Only interval-specific information is written in the array. All other data is initialized to 0.

Parameters:
t Vector defining a symmetric Toeplitz matrix whose eigenvalue intervals will be calculated.
n Size of vector t.
lbg Lower bound of the initial interval to be subdivided (usually Gershgorin disc).
ubg Upper bound of the initial interval to be subdivided (usually Gershgorin disc).
max_eig_interval Maximum number of eigenvalues per interval.
num_intervals Number of extracted intervals.
Returns:
Pointer to an array of size num_intervals containing interval info. NULL in case of error.

Definition at line 105 of file eigen.c.

void calc_intervals ( interval_node ilist,
integer *  n,
double *  t,
double *  lbg,
double *  ubg,
integer *  maxEig_interval 
)

unsigned int extract_eigenvalues ( unsigned int  n,
unsigned int  k,
unsigned int  max_k,
unsigned int  p_lda,
unsigned int *  converged,
unsigned int *  extracted,
unsigned int  required,
a,
b,
const T *  t,
const T *  p,
const T *  alpha,
const T *  beta,
tolerance,
T *  l,
T *  v 
)

Check convergence and extract eigenvalues of a symmetric Toeplitz matrix given a tridiagonal shift-and-invert Lanczos approximation.

Note:
sigma shift value is assumed to be the halfway between a and b.
Parameters:
n Size of the Toeplitz matrix defined by t and number of rows of p.
k Current size of Krylov subspace and number of columns of p.
max_k Maximum allowed size of the Krylov subspace.
p_lda Leading dimension of Krylov subspace vectors stored in p.
converged Pointer to number of converged eigenvalues. Just initialize to 0 on start and let the function use it.
extracted Pointer to number of currently extracted eigenvalues.
required Number of eigenvalues that should be extracted.
a Start of the interval whose eigenvalues are being extracted.
b End of the interval whose eigenvalues are being extracted.
t Vector of size n defining the symmetric Toeplitz matrix.
p Matrix of size n x k containing Lanczos vectors.
alpha Vector of size k containing the main diagonal of the symmetric tridiagonal matrix.
beta Vector of size k-1 containing the second diagonal of the symmetric tridiagonal matrix.
tolerance Tolerance threshold used to check eigenvalue convergence.
l Output vector where up to required eigenvalues will be stored.
v Output matrix where up to required eigenvectors will be stored (column order).
Returns:
Number of eigenvalues extracted during this call.

Definition at line 174 of file eigen.c.

void sort_eigenvalues ( unsigned int  extracted,
unsigned int  n,
T *  el,
T *  ev 
)

Sort eigenvalues and eigenvectors using quicksort algorithm.

Parameters:
extracted Number of extracted eigenvalues.
n Size of eigenvectors.
el Pointer to vector containing eigenvalues.
ev Pointer to matrix containing eigenvectors.

Definition at line 68 of file eigen.c.

static int sort_eigenvalues_aux ( const void *  p1,
const void *  p2 
) [static]

Auxiliar quicksort comparison method for the sort_eigenvalues fuction. Check stdlib qsort documentation for details.

Definition at line 51 of file eigen.c.


Generated on Sun Dec 14 14:21:11 2008 for Multi-GPU symmetric Toeplitz Eigenvalue Extractor by  doxygen 1.5.6