EVSL  1.1.0
EigenValues Slicing Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions | Variables
evsl.c File Reference

Set EVSL solver options and data. More...

#include <stdlib.h>
#include "def.h"
#include "struct.h"
#include "internal_proto.h"

Go to the source code of this file.

Functions

int EVSLStart ()
 Initialize evslData. More...
 
int EVSLFinish ()
 Finish EVSL. More...
 
int SetAMatrix (csrMat *A)
 Set the matrix A. More...
 
int SetBMatrix (csrMat *B)
 Set the B matrix. More...
 
int SetAMatvec (int n, MVFunc func, void *data)
 Set the user-input matvec routine and the associated data for A. Save them in evsldata. More...
 
int SetBMatvec (int n, MVFunc func, void *data)
 Set the user-input matvec routine and the associated data for B. Save them in evsldata. More...
 
int SetBSol (SolFuncR func, void *data)
 Set the solve routine and the associated data for B. More...
 
int SetStdEig ()
 Set the problem to standard eigenvalue problem. More...
 
int SetGenEig ()
 Set the problem to generalized eigenvalue problem. More...
 
int SetASigmaBSol (ratparams *rat, SolFuncC *func, SolFuncC allf, void **data)
 Set the solve routine and the associated data for A-SIGMA*B if func == NULL, set all functions to be allf. More...
 
int SetLTSol (SolFuncR func, void *data)
 Set the solve routine for LT. More...
 
void SetDiagScal (double *ds)
 Set diagonal scaling matrix D. More...
 

Variables

evslData evsldata
 global variable of EVSL More...
 
evslStat evslstat
 global statistics of EVSL More...
 

Detailed Description

Set EVSL solver options and data.

Used to track various statistics (time taken by various operations).

Definition in file evsl.c.

Function Documentation

int EVSLFinish ( )

Finish EVSL.

Definition at line 48 of file evsl.c.

References _evsldata::Amv, _evsldata::Bmv, _evsldata::Bsol, and _evsldata::LTsol.

Referenced by evsl_finish(), and main().

Here is the caller graph for this function:

int EVSLStart ( )

Initialize evslData.

Definition at line 27 of file evsl.c.

References _evsldata::Amv, _evsldata::Bmv, _evsldata::Bsol, _evsldata::ds, evsl_timer(), _evsldata::ifGenEv, _evsldata::LTsol, _evsldata::n, and StatsReset().

Referenced by evsl_start(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

int SetAMatrix ( csrMat A)

Set the matrix A.

Definition at line 68 of file evsl.c.

References _evsldata::Amv, Calloc, _EVSLMatvec::data, _EVSLMatvec::func, matvec_csr(), _evsldata::n, and _csrMat::ncols.

Referenced by evsl_seta_csr(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

int SetAMatvec ( int  n,
MVFunc  func,
void *  data 
)

Set the user-input matvec routine and the associated data for A. Save them in evsldata.

Warning
Once this matvec func is set, matrix A will be ignored even it is provided

Definition at line 100 of file evsl.c.

References _evsldata::Amv, Calloc, _EVSLMatvec::data, _EVSLMatvec::func, and _evsldata::n.

Referenced by evsl_setamv(), and main().

Here is the caller graph for this function:

int SetASigmaBSol ( ratparams rat,
SolFuncC func,
SolFuncC  allf,
void **  data 
)

Set the solve routine and the associated data for A-SIGMA*B if func == NULL, set all functions to be allf.

Definition at line 168 of file evsl.c.

References _ratparams::ASIGBsol, Calloc, _EVSLASIGMABSol::data, _EVSLASIGMABSol::func, and _ratparams::num.

Referenced by main(), and set_asigmabsol_direct().

Here is the caller graph for this function:

int SetBMatrix ( csrMat B)

Set the B matrix.

Definition at line 83 of file evsl.c.

References _evsldata::Bmv, Calloc, _EVSLMatvec::data, _EVSLMatvec::func, matvec_csr(), _evsldata::n, and _csrMat::ncols.

Referenced by evsl_setb_csr(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

int SetBMatvec ( int  n,
MVFunc  func,
void *  data 
)

Set the user-input matvec routine and the associated data for B. Save them in evsldata.

Warning
Once this matvec func is set, matrix B will be ignored even it is provided

Definition at line 117 of file evsl.c.

References _evsldata::Bmv, Calloc, _EVSLMatvec::data, _EVSLMatvec::func, and _evsldata::n.

Referenced by evsl_setbmv().

Here is the caller graph for this function:

int SetBSol ( SolFuncR  func,
void *  data 
)

Set the solve routine and the associated data for B.

Definition at line 132 of file evsl.c.

References _evsldata::Bsol, Calloc, _EVSLBSol::data, and _EVSLBSol::func.

Referenced by evsl_setbsol(), main(), and setup_bsol_direct().

Here is the caller graph for this function:

void SetDiagScal ( double *  ds)

Set diagonal scaling matrix D.

Definition at line 197 of file evsl.c.

References _evsldata::ds.

int SetGenEig ( )

Set the problem to generalized eigenvalue problem.

Definition at line 158 of file evsl.c.

References _evsldata::ifGenEv.

Referenced by evsl_set_geneig(), and main().

Here is the caller graph for this function:

int SetLTSol ( SolFuncR  func,
void *  data 
)

Set the solve routine for LT.

Definition at line 185 of file evsl.c.

References Calloc, _EVSLLTSol::data, _EVSLLTSol::func, and _evsldata::LTsol.

Referenced by evsl_setltsol(), main(), and setup_bsol_direct().

Here is the caller graph for this function:

int SetStdEig ( )

Set the problem to standard eigenvalue problem.

Definition at line 148 of file evsl.c.

References _evsldata::ifGenEv.

Referenced by main().

Here is the caller graph for this function:

Variable Documentation

evslData evsldata

global variable of EVSL

global variable is guaranteed to be initialized

Definition at line 15 of file evsl.c.

Referenced by ChebAv(), ChebLanNr(), ChebLanTr(), ChebSI(), evsl_cheblannr(), evsl_cheblantr(), evsl_lanbounds(), evsl_ratlannr(), evsl_ratlantr(), kpmdos(), LanBounds(), LanDos(), LanDosG(), LanTrbounds(), pnav(), RatFiltApply(), RatLanNr(), and RatLanTr().

evslStat evslstat

global statistics of EVSL

global variable is guaranteed to be initialized

Definition at line 21 of file evsl.c.

Referenced by CGS_DGKS(), CGS_DGKS2(), ChebAv(), ChebLanNr(), ChebLanTr(), RatFiltApply(), RatLanNr(), RatLanTr(), SetupASIGMABSolDirect(), SetupBSolDirect(), StatsPrint(), StatsReset(), SymEigenSolver(), SymmTridEig(), and SymmTridEigS().