cgv
|
interface for implementations of solvers for sparse linear systems of the form A * x = b with a square matrix A. More...
#include <sparse_les.h>
Public Member Functions | |
virtual | ~sparse_les () |
virtual destructor since class is abstract | |
problem setup | |
virtual void | set_mat_entry (int r, int c, double val)=0 |
set entry in row r and column c in the sparse matrix A | |
virtual void | set_b_entry (int i, double val) |
set i-th entry in a single right hand side b | |
virtual void | set_b_entry (int i, int j, double val)=0 |
set i-th entry in the j-th right hand side | |
virtual double & | ref_b_entry (int i) |
return reference to i-th entry in a single right hand side b | |
virtual double & | ref_b_entry (int i, int j)=0 |
set i-th entry in j-th right hand side | |
virtual bool | solve (bool analyze_residual=false)=0 |
try to solve system - in case of success analyze residuals if demanded by the optional parameter | |
access to solution | |
virtual double | get_x_entry (int i) const |
return the i-th component of a single solution vector | |
virtual double | get_x_entry (int i, int j) const =0 |
return the i-th component of the j-th solution vector | |
![]() | |
int | get_ref_count () const |
read access to current count | |
Static Public Member Functions | |
static interface | |
static void | register_solver_factory (sparse_les_factory_ptr sls_fac) |
register a factory for a new type of linear equation solver | |
static const std::vector< sparse_les_factory_ptr > & | get_solver_factories () |
return the list of registered solvers | |
static sparse_les_ptr | create_by_name (const std::string &solver_name, int n, int nr_rhs, int nr_nze=-1) |
check the registered solver types for one with the given name | |
static sparse_les_ptr | create_by_cap (SparseLesCaps caps, int n, int nr_rhs, int nr_nze=-1) |
check the registered solver types for one with the given capabilities and create an instance of it | |
Additional Inherited Members | |
![]() | |
ref_counted () | |
constructor initializes the count to 0 | |
void | set_ref_count (int c) const |
write access is also const to allow ref counted pointers to const instances | |
interface for implementations of solvers for sparse linear systems of the form A * x = b with a square matrix A.
Definition at line 51 of file sparse_les.h.
|
inlinevirtual |
virtual destructor since class is abstract
Definition at line 55 of file sparse_les.h.
|
static |
check the registered solver types for one with the given capabilities and create an instance of it
Definition at line 41 of file sparse_les.cxx.
|
static |
check the registered solver types for one with the given name
Definition at line 30 of file sparse_les.cxx.
|
static |
return the list of registered solvers
Definition at line 24 of file sparse_les.cxx.
|
virtual |
return the i-th component of a single solution vector
Definition at line 62 of file sparse_les.cxx.
References get_x_entry().
Referenced by get_x_entry().
|
virtual |
return reference to i-th entry in a single right hand side b
Definition at line 57 of file sparse_les.cxx.
References ref_b_entry().
Referenced by ref_b_entry().
|
static |
register a factory for a new type of linear equation solver
Definition at line 19 of file sparse_les.cxx.
|
virtual |
set i-th entry in a single right hand side b
Definition at line 52 of file sparse_les.cxx.
References set_b_entry().
Referenced by set_b_entry().