19 #ifndef _SF_ABSTRACT_LIN_SOLVER_H
20 #define _SF_ABSTRACT_LIN_SOLVER_H
26 #include "petscsnes.h"
42 template<
class T,
class S>
82 short norm, std::string
name,
bool has_nullspace,
84 const char* solver_opts_file,
85 const char* default_opts) = 0;
98 bool verbose,
void* logger) = 0;
111 switch (param_norm_type) {
135 template<
class T,
class S>
185 virtual void setup_solver(
abstract_vector<T, S> &residuum,
abstract_matrix<T, S>& mat,
double tol,
int max_it,
short norm,
const char*
name,
bool has_nullspace,
void* logger,
const char *solver_opts_file,
const char* default_opts, PetscErrorCode
function(SNES, Vec, Vec,
void*), PetscErrorCode jacobian(SNES, Vec, Mat, Mat,
void*),
void * solver_pointer = NULL) = 0;
198 bool verbose,
void* logger) = 0;
211 switch (param_norm_type) {
int reason
number of iterations
double final_residual
Holds the residual after convergence.
norm_t convert_param_norm_type(short param_norm_type) const
double time
solver runtime
int niter
number of iterations
int max_it
max number of iterations
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
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
NOTE: A LOT OF THESE THINGS NEED TO BE CHANGED AT A LATER STAGE. THEY ARE CURRENTLY COPIED FROM THE A...
virtual void operator()(abstract_vector< T, S > &x, const abstract_vector< T, S > &b)=0
virtual ~abstract_nonlinear_solver()=default
virtual void set_stopping_criterion(norm_t normtype, double tol, int max_it, bool verbose, void *logger)=0
double time
solver runtime
norm_t convert_param_norm_type(short param_norm_type) const
double final_residual
Holds the residual after convergence.
virtual void setup_solver(abstract_vector< T, S > &residuum, abstract_matrix< T, S > &mat, double tol, int max_it, short norm, const char *name, bool has_nullspace, void *logger, const char *solver_opts_file, const char *default_opts, PetscErrorCode function(SNES, Vec, Vec, void *), PetscErrorCode jacobian(SNES, Vec, Mat, Mat, void *), void *solver_pointer=NULL)=0
int max_it
max number of iterations
const char * options_file
the file containing the solver options
const char * name
the solver name
int reason
number of iterations
int niter
number of iterations