EVSL  1.1.0
EigenValues Slicing Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
LanDos.c File Reference
#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[])
 

Macro Definition Documentation

#define max (   a,
 
)    ((a) > (b) ? (a) : (b))

Definition at line 20 of file LanDos.c.

#define min (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 21 of file LanDos.c.

Function Documentation

int exDOS ( double *  vals,
int  n,
int  npts,
double *  x,
double *  y,
double *  intv 
)

Calculate the exact DOS given eigenvalues

Parameters
[in]valseigenvalues
[in]nnumber of eigenvalues
[in]nptsnumber of points for dos curve
[in]intvintervals of interests
[out]xcoordinates for dos plot
[out]yy coordinates for dos plot
Note
Both x and y are expected to be preallocated.

Definition at line 22 of file exDOS.c.

Referenced by main().

Here is the caller graph for this function:

int findarg ( const char *  argname,
ARG_TYPE  type,
void *  val,
int  argc,
char **  argv 
)

Definition at line 171 of file io.c.

Referenced by main().

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Tests landos.c – Includes graphical comparison of exact DOS and calculated.

use -graph_exact_dos 1 to enable graphing the exact DOS

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.

Here is the call graph for this function:

int readVec ( const char *  filename,
int *  npts,
double **  vec 
)

Reads in a vector as an nx1 matrix.

Parameters
[out]nptspointer to an int to store # of points
[out]vecUNallocated space to read vector to
[in]filenamefile 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().

Here is the caller graph for this function: