EVSL  1.1.0 EigenValues Slicing Library
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, b ) ((a) > (b) ? (a) : (b))

Definition at line 20 of file LanDos.c.

 #define min ( a, b ) ((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] 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
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.

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] 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().

Here is the caller graph for this function: