monolish  0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
monolish::solver::solver< MATRIX, Float > Class Template Reference

solver base class More...

#include <monolish_solver.hpp>

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

Public Member Functions

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...
 
bool get_print_rhistory () const
 get print rhistory status More...
 
size_t get_residual_method () const
 get residual method(default=0) More...
 
double get_tol () const
 get tolerance More...
 
template<class PRECOND >
void set_apply_precond (PRECOND &p)
 set precondition apply fucntion More...
 
template<class PRECOND >
void set_create_precond (PRECOND &p)
 set precondition create fucntion 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_print_rhistory (bool flag)
 print rhistory to standart out true/false. (default = false) 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...
 

Protected Member Functions

Float get_residual (vector< Float > &x)
 

Protected Attributes

initvec_scheme initvecscheme = initvec_scheme::RANDOM
 
int lib = 0
 
size_t maxiter = SIZE_MAX
 
size_t miniter = 0
 
precondition< MATRIX, Float > precond
 
bool print_rhistory = false
 
size_t resid_method = 0
 
std::string rhistory_file
 
std::ostream * rhistory_stream
 
double tol = 1.0e-8
 

Detailed Description

template<typename MATRIX, typename Float>
class monolish::solver::solver< MATRIX, Float >

solver base class

Definition at line 33 of file monolish_solver.hpp.

Constructor & Destructor Documentation

◆ solver()

template<typename MATRIX , typename Float >
monolish::solver::solver< MATRIX, Float >::solver ( )
inline

create solver class

Parameters
[in]

Definition at line 55 of file monolish_solver.hpp.

◆ ~solver()

template<typename MATRIX , typename Float >
monolish::solver::solver< MATRIX, Float >::~solver ( )
inline

delete solver class

Parameters
[in]

Definition at line 61 of file monolish_solver.hpp.

Member Function Documentation

◆ get_initvec_scheme()

template<typename MATRIX , typename Float >
initvec_scheme monolish::solver::solver< MATRIX, Float >::get_initvec_scheme ( ) const
inline

get handling scheme of initial vector handling

Returns
current handling scheme of initial vector

Definition at line 179 of file monolish_solver.hpp.

◆ get_lib()

template<typename MATRIX , typename Float >
int monolish::solver::solver< MATRIX, Float >::get_lib ( ) const
inline

get library option

Returns
library number

Definition at line 143 of file monolish_solver.hpp.

◆ get_maxiter()

template<typename MATRIX , typename Float >
size_t monolish::solver::solver< MATRIX, Float >::get_maxiter ( ) const
inline

get maxiter

Returns
maxiter

Definition at line 155 of file monolish_solver.hpp.

◆ get_miniter()

template<typename MATRIX , typename Float >
size_t monolish::solver::solver< MATRIX, Float >::get_miniter ( ) const
inline

get miniter

Returns
miniter

Definition at line 161 of file monolish_solver.hpp.

◆ get_print_rhistory()

template<typename MATRIX , typename Float >
bool monolish::solver::solver< MATRIX, Float >::get_print_rhistory ( ) const
inline

get print rhistory status

Returns
print rhistory true/false

Definition at line 173 of file monolish_solver.hpp.

◆ get_residual()

template<typename MATRIX , typename Float >
template float monolish::solver::solver< MATRIX, Float >::get_residual ( vector< Float > &  x)
protected

Definition at line 8 of file equation.cpp.

Here is the call graph for this function:

◆ get_residual_method()

template<typename MATRIX , typename Float >
size_t monolish::solver::solver< MATRIX, Float >::get_residual_method ( ) const
inline

get residual method(default=0)

Returns
residual method number

Definition at line 167 of file monolish_solver.hpp.

◆ get_tol()

template<typename MATRIX , typename Float >
double monolish::solver::solver< MATRIX, Float >::get_tol ( ) const
inline

get tolerance

Returns
tolerance

Definition at line 149 of file monolish_solver.hpp.

◆ set_apply_precond()

template<typename MATRIX , typename T >
template<class PRECOND >
template void monolish::solver::solver< MATRIX, Float >::set_apply_precond ( PRECOND &  p)

set precondition apply fucntion

Parameters
[in]ffunction

Definition at line 51 of file precond.cpp.

Here is the call graph for this function:

◆ set_create_precond()

template<typename MATRIX , typename T >
template<class PRECOND >
template void monolish::solver::solver< MATRIX, Float >::set_create_precond ( PRECOND &  p)

set precondition create fucntion

Parameters
[in]ffunction

Definition at line 11 of file precond.cpp.

Here is the call graph for this function:

◆ set_initvec_scheme()

template<typename MATRIX , typename Float >
void monolish::solver::solver< MATRIX, Float >::set_initvec_scheme ( initvec_scheme  scheme)
inline

set how to handle initial vector

Parameters
[in]schemeRANDOM or USER

Definition at line 136 of file monolish_solver.hpp.

◆ set_lib()

template<typename MATRIX , typename Float >
void monolish::solver::solver< MATRIX, Float >::set_lib ( int  l)
inline

set library option (to change library, monolish, cusolver, etc.)

Parameters
[in]librarynumber

Definition at line 83 of file monolish_solver.hpp.

◆ set_maxiter()

template<typename MATRIX , typename Float >
void monolish::solver::solver< MATRIX, Float >::set_maxiter ( size_t  max)
inline

set max iter. (default = SIZE_MAX)

Parameters
[in]maxmaxiter

Definition at line 95 of file monolish_solver.hpp.

Here is the call graph for this function:

◆ set_miniter()

template<typename MATRIX , typename Float >
void monolish::solver::solver< MATRIX, Float >::set_miniter ( size_t  min)
inline

set min iter. (default = 0)

Parameters
[in]minminiter

Definition at line 101 of file monolish_solver.hpp.

Here is the call graph for this function:

◆ set_print_rhistory()

template<typename MATRIX , typename Float >
void monolish::solver::solver< MATRIX, Float >::set_print_rhistory ( bool  flag)
inline

print rhistory to standart out true/false. (default = false)

Parameters
[in]flag

Definition at line 113 of file monolish_solver.hpp.

◆ set_residual_method()

template<typename MATRIX , typename Float >
void monolish::solver::solver< MATRIX, Float >::set_residual_method ( size_t  r)
inline

set residual method (default=0)

Parameters
[in]rresidualt method number (0:nrm2)

Definition at line 107 of file monolish_solver.hpp.

◆ set_rhistory_filename()

template<typename MATRIX , typename Float >
void monolish::solver::solver< MATRIX, Float >::set_rhistory_filename ( std::string  file)
inline

rhistory filename

Parameters
[in]fileoutput file name

Definition at line 122 of file monolish_solver.hpp.

◆ set_tol()

template<typename MATRIX , typename Float >
void monolish::solver::solver< MATRIX, Float >::set_tol ( double  t)
inline

set tolerance (default:1.0e-8)

Parameters
[in]toltolerance

Definition at line 89 of file monolish_solver.hpp.

Member Data Documentation

◆ initvecscheme

template<typename MATRIX , typename Float >
initvec_scheme monolish::solver::solver< MATRIX, Float >::initvecscheme = initvec_scheme::RANDOM
protected

Definition at line 44 of file monolish_solver.hpp.

◆ lib

template<typename MATRIX , typename Float >
int monolish::solver::solver< MATRIX, Float >::lib = 0
protected

Definition at line 36 of file monolish_solver.hpp.

◆ maxiter

template<typename MATRIX , typename Float >
size_t monolish::solver::solver< MATRIX, Float >::maxiter = SIZE_MAX
protected

Definition at line 39 of file monolish_solver.hpp.

◆ miniter

template<typename MATRIX , typename Float >
size_t monolish::solver::solver< MATRIX, Float >::miniter = 0
protected

Definition at line 38 of file monolish_solver.hpp.

◆ precond

template<typename MATRIX , typename Float >
precondition<MATRIX, Float> monolish::solver::solver< MATRIX, Float >::precond
protected

Definition at line 48 of file monolish_solver.hpp.

◆ print_rhistory

template<typename MATRIX , typename Float >
bool monolish::solver::solver< MATRIX, Float >::print_rhistory = false
protected

Definition at line 41 of file monolish_solver.hpp.

◆ resid_method

template<typename MATRIX , typename Float >
size_t monolish::solver::solver< MATRIX, Float >::resid_method = 0
protected

Definition at line 40 of file monolish_solver.hpp.

◆ rhistory_file

template<typename MATRIX , typename Float >
std::string monolish::solver::solver< MATRIX, Float >::rhistory_file
protected

Definition at line 42 of file monolish_solver.hpp.

◆ rhistory_stream

template<typename MATRIX , typename Float >
std::ostream* monolish::solver::solver< MATRIX, Float >::rhistory_stream
protected

Definition at line 43 of file monolish_solver.hpp.

◆ tol

template<typename MATRIX , typename Float >
double monolish::solver::solver< MATRIX, Float >::tol = 1.0e-8
protected

Definition at line 37 of file monolish_solver.hpp.


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