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 | 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.
Referenced by main().
int findarg | ( | const char * | argname, |
ARG_TYPE | type, | ||
void * | val, | ||
int | argc, | ||
char ** | argv | ||
) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Tests landos.c – Includes graphical comparison of exact DOS and calculated.
Definition at line 52 of file LanDos.c.
References cooMat_to_csrMat(), EVSLFinish(), EVSLStart(), exDOS(), findarg(), _io_t::Fmt, _io_t::Fname, free_coo(), free_csr(), get_matrix_info(), HB, INT, LanDos(), LanTrbounds(), _io_t::MatNam, MAX_LINE, _cooMat::ncols, _cooMat::nrows, rand_double(), read_coo_MM(), readVec(), SetAMatrix(), SetStdEig(), and _cooMat::vv.
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 31 of file LanDos.c.
Referenced by main().