4 #ifndef _SF_ABSTRACT_LIN_SOLVER_H
5 #define _SF_ABSTRACT_LIN_SOLVER_H
24 template<
class T,
class S>
67 short norm, std::string
name,
bool has_nullspace,
69 const char* solver_opts_file,
70 const char* default_opts) = 0;
83 bool verbose,
void* logger) = 0;
96 switch (param_norm_type) {
opencarp::real_t SF_real
Global scalar type.
opencarp::global_index_t SF_int
Global algebraic index type.
SF_int max_it
max number of iterations
norm_t convert_param_norm_type(short param_norm_type) const
SF_int niter
number of iterations
SF_real final_residual
Holds the residual after convergence.
virtual void set_stopping_criterion(norm_t normtype, double tol, int max_it, bool verbose, void *logger)=0
const char * options_file
the file containing the solver options
virtual ~abstract_linear_solver()=default
SF_real time
solver runtime
SF_int reason
convergence reason, > 0 converged, < 0 failed to converge, 0 not yet solved; codes are backend specif...
virtual const char * reason_str() const =0
std::string name
the solver name
virtual void setup_solver(abstract_matrix< T, S > &mat, double tol, int max_it, short norm, std::string name, bool has_nullspace, void *logger, const char *solver_opts_file, const char *default_opts)=0
virtual void operator()(abstract_vector< T, S > &x, const abstract_vector< T, S > &b)=0