monolish
MONOlithic LInear equation Solvers for Highly-parallel architecture
|
Go to the documentation of this file.
27 template <
typename MATRIX,
typename Float>
class solver {
123 throw std::runtime_error(
"error bad filename");
221 template <
typename MATRIX,
typename Float>
class precondition {
236 auto create = [](MATRIX &) {};
void min(const matrix::CRS< double > &A, const matrix::CRS< double > &B, matrix::CRS< double > &C)
Create a new CRS matrix with smallest elements of two matrices (C[0:nnz] = min(A[0:nnz],...
void set_apply_precond(PRECOND &p)
set precondition apply fucntion
Float get_omega()
get the relaxation coefficient omega for SOR method (Default: 1.9)
precondition< MATRIX, Float > precond
std::string rhistory_file
void set_lib(int l)
set library option (to change library, monolish, cusolver, etc.)
void max(const matrix::CRS< double > &A, const matrix::CRS< double > &B, matrix::CRS< double > &C)
Create a new CRS matrix with greatest elements of two matrices (C[0:nnz] = max(A[0:nnz],...
size_t get_residual_method() const
get residual method(default=0)
void set_precond_data(vector< Float > &m)
double get_tol() const
get tolerance
void set_residual_method(size_t r)
set residual method (default=0)
void set_miniter(size_t min)
set min iter. (default = 0)
initvec_scheme
Enum class defining how to handle initial vectors RANDOM use randomly initialized vectors USER use in...
int get_sigularity()
-1 if A is symmetric postive definite. default reorder algorithm is csrmetisnd
~solver()
delete solver class
void set_maxiter(size_t max)
set max iter. (default = SIZE_MAX)
size_t get_maxiter() const
get maxiter
std::function< void(MATRIX &)> create_precond
solver()
create solver class
Float get_residual(vector< Float > &x)
initvec_scheme initvecscheme
std::function< void(const vector< Float > &r, vector< Float > &z)> apply_precond
void set_omega(Float w)
set the relaxation coefficient omega for SOR method (0 < w < 2, Default: 1.9)
size_t get_miniter() const
get miniter
int get_reorder()
0: no ordering 1: symrcm, 2: symamd, 3: csrmetisnd is used to reduce zero fill-in.
std::ostream * rhistory_stream
void set_rhistory_filename(std::string file)
rhistory filename
void set_initvec_scheme(initvec_scheme scheme)
set how to handle initial vector
std::function< void(void)> get_precond()
void set_tol(double t)
set tolerance (default:1.0e-8)
vector< Float > get_precond_data()
void set_print_rhistory(bool flag)
print rhistory to standart out true/false. (default = false)
bool get_print_rhistory() const
get print rhistory status
int get_lib() const
get library option
Linear solver base class.
void set_create_precond(PRECOND &p)
set precondition create fucntion
initvec_scheme get_initvec_scheme() const
get handling scheme of initial vector handling
void set_reorder(int r)
0: no ordering 1: symrcm, 2: symamd, 3: csrmetisnd is used to reduce zero fill-in.