![]() |
EVSL
1.1.0
EigenValues Slicing Library
|
#include <errno.h>#include <fcntl.h>#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/stat.h>#include <sys/types.h>#include <sys/utsname.h>#include <time.h>#include <unistd.h>#include "evsl.h"#include "io.h"Go to the source code of this file.
Macros | |
| #define | max(a, b) ((a) > (b) ? (a) : (b)) |
| #define | min(a, b) ((a) < (b) ? (a) : (b)) |
Functions | |
| int | exDOS (double *vals, int n, int npts, double *x, double *y, double *intv) |
| int | read_coo_MM (const char *matfile, int idxin, int idxout, cooMat *Acoo) |
| int | get_matrix_info (FILE *fmat, io_t *pio) |
| int | findarg (const char *argname, ARG_TYPE type, void *val, int argc, char **argv) |
| int | readVec (const char *filename, int *npts, double **vec) |
| int | main (int argc, char *argv[]) |
| int exDOS | ( | double * | vals, |
| int | n, | ||
| int | npts, | ||
| double * | x, | ||
| double * | y, | ||
| double * | intv | ||
| ) |
Calculate the exact DOS given eigenvalues
| [in] | vals | eigenvalues |
| [in] | n | number of eigenvalues |
| [in] | npts | number of points for dos curve |
| [in] | intv | intervals of interests |
| [out] | x | coordinates for dos plot |
| [out] | y | y coordinates for dos plot |
Definition at line 22 of file exDOS.c.
References DSCAL(), linspace(), max, min, and PI.
Referenced by main().


| int findarg | ( | const char * | argname, |
| ARG_TYPE | type, | ||
| void * | val, | ||
| int | argc, | ||
| char ** | argv | ||
| ) |
| int get_matrix_info | ( | FILE * | fmat, |
| io_t * | pio | ||
| ) |
Definition at line 22 of file io.c.
References _io_t::a, _io_t::b, ERR_IO, _io_t::Fmt, _io_t::Fname, _io_t::Fname1, _io_t::Fname2, _io_t::MatNam, _io_t::MatNam1, _io_t::MatNam2, MAX_LINE, MaxNamLen, MM0, MM1, and _io_t::n_intv.
Referenced by main().

| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Tests landosG.c , the Lanczos DOS computed for the generalized eigenvalue problem. Includes graphical comparison of calculated vs exact DOS
use -graph_exact_dos 1 to enable graphing the exact DOS
Definition at line 53 of file LanDosG.c.
References BSolPol(), cooMat_to_csrMat(), _BSolDataPol::deg, diagScalCsr(), evsl_timer(), EVSLFinish(), EVSLStart(), exDOS(), extrDiagCsr(), findarg(), _io_t::Fmt, _io_t::Fname1, _io_t::Fname2, free_coo(), free_csr(), FreeBSolPolData(), get_matrix_info(), HB, INT, LanDosG(), LanTrbounds(), _io_t::MatNam1, _io_t::MatNam2, MAX_LINE, _cooMat::nrows, rand_double(), read_coo_MM(), readVec(), SetAMatrix(), SetBMatrix(), SetBSol(), SetGenEig(), SetLTSol(), SetStdEig(), SetupPolRec(), and SetupPolSqrt().

| int read_coo_MM | ( | const char * | matfile, |
| int | idxin, | ||
| int | idxout, | ||
| cooMat * | Acoo | ||
| ) |
Definition at line 66 of file io.c.
References _cooMat::ir, _cooMat::jc, MAX_LINE, mm_is_coordinate, mm_is_integer, mm_is_real, mm_is_sparse, mm_is_symmetric, mm_is_valid(), mm_read_banner(), mm_read_mtx_crd_size(), _cooMat::ncols, _cooMat::nnz, _cooMat::nrows, and _cooMat::vv.
Referenced by main().


| int readVec | ( | const char * | filename, |
| int * | npts, | ||
| double ** | vec | ||
| ) |
Reads in a vector as an nx1 matrix.
| [out] | npts | pointer to an int to store # of points |
| [out] | vec | UNallocated space to read vector to |
| [in] | filename | file to read from, where the first line contains number of elements/width/height of matrix, and the rest of the lines contain the values. |
Definition at line 32 of file LanDosG.c.
Referenced by main().

1.8.6