monolish  0.17.1
MONOlithic LInear equation Solvers for Highly-parallel architecture
Public Member Functions | Private Member Functions | Private Attributes | List of all members
monolish::equation::IC< MATRIX, Float > Class Template Reference

Incomplete Cholesky solver class. More...

#include <monolish_equation.hpp>

Inheritance diagram for monolish::equation::IC< MATRIX, Float >:
Inheritance graph
Collaboration diagram for monolish::equation::IC< MATRIX, Float >:
Collaboration graph

Public Member Functions

void apply_precond (const vector< Float > &r, vector< Float > &z)
 
void create_precond (MATRIX &A)
 
std::string name () const
 get solver name "monolish::equation::IC" More...
 
int solve (MATRIX &A, vector< Float > &x, vector< Float > &b)
 solve with incomplete Cholesky factorization More...
 
std::string solver_name () const
 get solver name "IC" More...
 
 ~IC ()
 
- Public Member Functions inherited from monolish::solver::solver< MATRIX, Float >
size_t get_final_iter ()
 
double get_final_residual ()
 
initvec_scheme get_initvec_scheme () const
 get handling scheme of initial vector handling More...
 
int get_lib () const
 get library option More...
 
size_t get_maxiter () const
 get maxiter More...
 
size_t get_miniter () const
 get miniter More...
 
Float get_omega ()
 get the relaxation coefficient omega for SOR method (Default: 1.9) More...
 
bool get_print_rhistory () const
 get print rhistory status More...
 
int get_reorder ()
 0: no ordering 1: symrcm, 2: symamd, 3: csrmetisnd is used to reduce zero fill-in. More...
 
size_t get_residual_method () const
 get residual method(default=0) More...
 
int get_singularity ()
 -1 if A is symmetric positive definite. default reorder algorithm is csrmetisnd More...
 
double get_tol () const
 get tolerance More...
 
template<class PRECOND >
void set_apply_precond (PRECOND &p)
 set precondition apply function More...
 
template<class PRECOND >
void set_create_precond (PRECOND &p)
 set precondition create function More...
 
void set_initvec_scheme (initvec_scheme scheme)
 set how to handle initial vector More...
 
void set_lib (int l)
 set library option (to change library, monolish, cusolver, etc.) More...
 
void set_maxiter (size_t max)
 set max iter. (default = SIZE_MAX) More...
 
void set_miniter (size_t min)
 set min iter. (default = 0) More...
 
void set_omega (Float w)
 set the relaxation coefficient omega for SOR method (0 < w < 2, Default: 1.9) More...
 
void set_print_rhistory (bool flag)
 print rhistory to standart out true/false. (default = false) More...
 
void set_reorder (int r)
 0: no ordering 1: symrcm, 2: symamd, 3: csrmetisnd is used to reduce zero fill-in. More...
 
void set_residual_method (size_t r)
 set residual method (default=0) More...
 
void set_rhistory_filename (std::string file)
 rhistory filename More...
 
void set_tol (double t)
 set tolerance (default:1.0e-8) More...
 
 solver ()
 create solver class More...
 
 ~solver ()
 delete solver class More...
 

Private Member Functions

int cusparse_IC (MATRIX &A, vector< Float > &x, vector< Float > &b)
 

Private Attributes

monolish::vector< double > buf
 
int bufsize
 
void * cusparse_handle = nullptr
 
void * infoL = 0
 
void * infoLt = 0
 
void * infoM = 0
 
void * matL = 0
 
void * matM = 0
 
monolish::vector< Float > zbuf
 

Additional Inherited Members

- Protected Member Functions inherited from monolish::solver::solver< MATRIX, Float >
Float get_residual (vector< Float > &x)
 
- Protected Attributes inherited from monolish::solver::solver< MATRIX, Float >
size_t final_iter = 0
 
double final_resid = 0
 
initvec_scheme initvecscheme = initvec_scheme::RANDOM
 
int lib = 0
 
size_t maxiter = SIZE_MAX
 
size_t miniter = 0
 
Float omega = 1.9
 
precondition< MATRIX, Float > precond
 
bool print_rhistory = false
 
int reorder = 3
 
size_t resid_method = 0
 
std::string rhistory_file
 
std::ostream * rhistory_stream
 
int singularity
 
double tol = 1.0e-8
 

Detailed Description

template<typename MATRIX, typename Float>
class monolish::equation::IC< MATRIX, Float >

Incomplete Cholesky solver class.

Note
attribute:
  • solver : true
  • preconditioner : false
input / architecture
  • Dense / Intel : false
  • Dense / NVIDIA : false
  • Dense / OSS : false
  • Sparse / Intel : false
  • Sparse / NVIDIA : true
  • Sparse / OSS : false

Definition at line 349 of file monolish_equation.hpp.

Constructor & Destructor Documentation

◆ ~IC()

template<typename MATRIX , typename Float >
monolish::equation::IC< MATRIX, Float >::~IC ( )

Member Function Documentation

◆ apply_precond()

template<typename MATRIX , typename Float >
void monolish::equation::IC< MATRIX, Float >::apply_precond ( const vector< Float > &  r,
vector< Float > &  z 
)

◆ create_precond()

template<typename MATRIX , typename Float >
void monolish::equation::IC< MATRIX, Float >::create_precond ( MATRIX &  A)

◆ cusparse_IC()

template<typename MATRIX , typename Float >
int monolish::equation::IC< MATRIX, Float >::cusparse_IC ( MATRIX &  A,
vector< Float > &  x,
vector< Float > &  b 
)
private

◆ name()

template<typename MATRIX , typename Float >
std::string monolish::equation::IC< MATRIX, Float >::name ( ) const
inline

get solver name "monolish::equation::IC"

Note
  • # of computation: 1
  • Multi-threading: false
  • GPU acceleration: false

Definition at line 377 of file monolish_equation.hpp.

◆ solve()

template<typename MATRIX , typename Float >
int monolish::equation::IC< MATRIX, Float >::solve ( MATRIX &  A,
vector< Float > &  x,
vector< Float > &  b 
)

solve with incomplete Cholesky factorization

Warning
This solves Ax = b incompletely. In many cases the answer is wrong.

◆ solver_name()

template<typename MATRIX , typename Float >
std::string monolish::equation::IC< MATRIX, Float >::solver_name ( ) const
inline

get solver name "IC"

Note
  • # of computation: 1
  • Multi-threading: false
  • GPU acceleration: false

Definition at line 386 of file monolish_equation.hpp.

Member Data Documentation

◆ buf

template<typename MATRIX , typename Float >
monolish::vector<double> monolish::equation::IC< MATRIX, Float >::buf
private

Definition at line 356 of file monolish_equation.hpp.

◆ bufsize

template<typename MATRIX , typename Float >
int monolish::equation::IC< MATRIX, Float >::bufsize
private

Definition at line 355 of file monolish_equation.hpp.

◆ cusparse_handle

template<typename MATRIX , typename Float >
void* monolish::equation::IC< MATRIX, Float >::cusparse_handle = nullptr
private

Definition at line 354 of file monolish_equation.hpp.

◆ infoL

template<typename MATRIX , typename Float >
void * monolish::equation::IC< MATRIX, Float >::infoL = 0
private

Definition at line 353 of file monolish_equation.hpp.

◆ infoLt

template<typename MATRIX , typename Float >
void * monolish::equation::IC< MATRIX, Float >::infoLt = 0
private

Definition at line 353 of file monolish_equation.hpp.

◆ infoM

template<typename MATRIX , typename Float >
void* monolish::equation::IC< MATRIX, Float >::infoM = 0
private

Definition at line 353 of file monolish_equation.hpp.

◆ matL

template<typename MATRIX , typename Float >
void * monolish::equation::IC< MATRIX, Float >::matL = 0
private

Definition at line 352 of file monolish_equation.hpp.

◆ matM

template<typename MATRIX , typename Float >
void* monolish::equation::IC< MATRIX, Float >::matM = 0
private

Definition at line 352 of file monolish_equation.hpp.

◆ zbuf

template<typename MATRIX , typename Float >
monolish::vector<Float> monolish::equation::IC< MATRIX, Float >::zbuf
private

Definition at line 357 of file monolish_equation.hpp.


The documentation for this class was generated from the following file: