monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
|
Go to the documentation of this file.
33 template <
typename MATRIX,
typename Float>
class solver {
128 throw std::runtime_error(
"error bad filename");
185 template <
typename MATRIX,
typename Float>
class precondition {
200 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
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
Float get_residual(vector< Float > &x)
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...
~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
initvec_scheme initvecscheme
std::function< void(const vector< Float > &r, vector< Float > &z)> apply_precond
size_t get_miniter() const
get miniter
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
void set_create_precond(PRECOND &p)
set precondition create fucntion
initvec_scheme get_initvec_scheme() const
get handling scheme of initial vector handling