TR-mbed 1.0
Loading...
Searching...
No Matches
Macros | Functions | Variables
spbenchsolver.h File Reference
#include <iostream>
#include <fstream>
#include <Eigen/SparseCore>
#include <bench/BenchTimer.h>
#include <cstdlib>
#include <string>
#include <Eigen/Cholesky>
#include <Eigen/Jacobi>
#include <Eigen/Householder>
#include <Eigen/IterativeLinearSolvers>
#include <unsupported/Eigen/IterativeSolvers>
#include <Eigen/LU>
#include <unsupported/Eigen/SparseExtra>
#include <Eigen/SparseLU>
#include "spbenchstyle.h"

Go to the source code of this file.

Macros

#define EIGEN_UMFPACK   10
 
#define EIGEN_KLU   11
 
#define EIGEN_SUPERLU   20
 
#define EIGEN_PASTIX   30
 
#define EIGEN_PARDISO   40
 
#define EIGEN_SPARSELU_COLAMD   50
 
#define EIGEN_SPARSELU_METIS   51
 
#define EIGEN_BICGSTAB   60
 
#define EIGEN_BICGSTAB_ILUT   61
 
#define EIGEN_GMRES   70
 
#define EIGEN_GMRES_ILUT   71
 
#define EIGEN_SIMPLICIAL_LDLT   80
 
#define EIGEN_CHOLMOD_LDLT   90
 
#define EIGEN_PASTIX_LDLT   100
 
#define EIGEN_PARDISO_LDLT   110
 
#define EIGEN_SIMPLICIAL_LLT   120
 
#define EIGEN_CHOLMOD_SUPERNODAL_LLT   130
 
#define EIGEN_CHOLMOD_SIMPLICIAL_LLT   140
 
#define EIGEN_PASTIX_LLT   150
 
#define EIGEN_PARDISO_LLT   160
 
#define EIGEN_CG   170
 
#define EIGEN_CG_PRECOND   180
 

Functions

template<typename T >
NumTraits< T >::Real test_precision ()
 
template<>
float test_precision< float > ()
 
template<>
double test_precision< double > ()
 
template<>
float test_precision< std::complex< float > > ()
 
template<>
double test_precision< std::complex< double > > ()
 
void printStatheader (std::ofstream &out)
 
template<typename Solver , typename Scalar >
void call_solver (Solver &solver, const int solver_id, const typename Solver::MatrixType &A, const Matrix< Scalar, Dynamic, 1 > &b, const Matrix< Scalar, Dynamic, 1 > &refX, std::ofstream &statbuf)
 
template<typename Solver , typename Scalar >
void call_directsolver (Solver &solver, const int solver_id, const typename Solver::MatrixType &A, const Matrix< Scalar, Dynamic, 1 > &b, const Matrix< Scalar, Dynamic, 1 > &refX, std::string &statFile)
 
template<typename Solver , typename Scalar >
void call_itersolver (Solver &solver, const int solver_id, const typename Solver::MatrixType &A, const Matrix< Scalar, Dynamic, 1 > &b, const Matrix< Scalar, Dynamic, 1 > &refX, std::string &statFile)
 
template<typename Scalar >
void SelectSolvers (const SparseMatrix< Scalar > &A, unsigned int sym, Matrix< Scalar, Dynamic, 1 > &b, const Matrix< Scalar, Dynamic, 1 > &refX, std::string &statFile)
 
template<typename Scalar >
void Browse_Matrices (const string folder, bool statFileExists, std::string &statFile, int maxiters, double tol)
 
bool get_options (int argc, char **args, string option, string *value=0)
 

Variables

int MaximumIters
 
double RelErr
 
double best_time_val
 
int best_time_id
 

Macro Definition Documentation

◆ EIGEN_BICGSTAB

#define EIGEN_BICGSTAB   60

◆ EIGEN_BICGSTAB_ILUT

#define EIGEN_BICGSTAB_ILUT   61

◆ EIGEN_CG

#define EIGEN_CG   170

◆ EIGEN_CG_PRECOND

#define EIGEN_CG_PRECOND   180

◆ EIGEN_CHOLMOD_LDLT

#define EIGEN_CHOLMOD_LDLT   90

◆ EIGEN_CHOLMOD_SIMPLICIAL_LLT

#define EIGEN_CHOLMOD_SIMPLICIAL_LLT   140

◆ EIGEN_CHOLMOD_SUPERNODAL_LLT

#define EIGEN_CHOLMOD_SUPERNODAL_LLT   130

◆ EIGEN_GMRES

#define EIGEN_GMRES   70

◆ EIGEN_GMRES_ILUT

#define EIGEN_GMRES_ILUT   71

◆ EIGEN_KLU

#define EIGEN_KLU   11

◆ EIGEN_PARDISO

#define EIGEN_PARDISO   40

◆ EIGEN_PARDISO_LDLT

#define EIGEN_PARDISO_LDLT   110

◆ EIGEN_PARDISO_LLT

#define EIGEN_PARDISO_LLT   160

◆ EIGEN_PASTIX

#define EIGEN_PASTIX   30

◆ EIGEN_PASTIX_LDLT

#define EIGEN_PASTIX_LDLT   100

◆ EIGEN_PASTIX_LLT

#define EIGEN_PASTIX_LLT   150

◆ EIGEN_SIMPLICIAL_LDLT

#define EIGEN_SIMPLICIAL_LDLT   80

◆ EIGEN_SIMPLICIAL_LLT

#define EIGEN_SIMPLICIAL_LLT   120

◆ EIGEN_SPARSELU_COLAMD

#define EIGEN_SPARSELU_COLAMD   50

◆ EIGEN_SPARSELU_METIS

#define EIGEN_SPARSELU_METIS   51

◆ EIGEN_SUPERLU

#define EIGEN_SUPERLU   20

◆ EIGEN_UMFPACK

#define EIGEN_UMFPACK   10

Function Documentation

◆ Browse_Matrices()

template<typename Scalar >
void Browse_Matrices ( const string  folder,
bool  statFileExists,
std::string &  statFile,
int  maxiters,
double  tol 
)

◆ call_directsolver()

template<typename Solver , typename Scalar >
void call_directsolver ( Solver &  solver,
const int  solver_id,
const typename Solver::MatrixType A,
const Matrix< Scalar, Dynamic, 1 > &  b,
const Matrix< Scalar, Dynamic, 1 > &  refX,
std::string &  statFile 
)

◆ call_itersolver()

template<typename Solver , typename Scalar >
void call_itersolver ( Solver &  solver,
const int  solver_id,
const typename Solver::MatrixType A,
const Matrix< Scalar, Dynamic, 1 > &  b,
const Matrix< Scalar, Dynamic, 1 > &  refX,
std::string &  statFile 
)

◆ call_solver()

template<typename Solver , typename Scalar >
void call_solver ( Solver &  solver,
const int  solver_id,
const typename Solver::MatrixType A,
const Matrix< Scalar, Dynamic, 1 > &  b,
const Matrix< Scalar, Dynamic, 1 > &  refX,
std::ofstream &  statbuf 
)

◆ get_options()

bool get_options ( int  argc,
char **  args,
string  option,
string *  value = 0 
)

◆ printStatheader()

void printStatheader ( std::ofstream &  out)

◆ SelectSolvers()

template<typename Scalar >
void SelectSolvers ( const SparseMatrix< Scalar > &  A,
unsigned int  sym,
Matrix< Scalar, Dynamic, 1 > &  b,
const Matrix< Scalar, Dynamic, 1 > &  refX,
std::string &  statFile 
)

◆ test_precision()

template<typename T >
NumTraits< T >::Real test_precision ( )
inline

◆ test_precision< double >()

template<>
double test_precision< double > ( )
inline

◆ test_precision< float >()

template<>
float test_precision< float > ( )
inline

◆ test_precision< std::complex< double > >()

template<>
double test_precision< std::complex< double > > ( )
inline

◆ test_precision< std::complex< float > >()

template<>
float test_precision< std::complex< float > > ( )
inline

Variable Documentation

◆ best_time_id

int best_time_id

◆ best_time_val

double best_time_val

◆ MaximumIters

int MaximumIters

◆ RelErr

double RelErr