|
openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
|
#include <SF_abstract_lin_solver.h>
Public Types | |
| enum | norm_t { absPreResidual , absUnpreResidual , relResidual , absPreRelResidual , norm_unset } |
Public Member Functions | |
| virtual void | operator() (abstract_vector< T, S > &x, const abstract_vector< T, S > &b)=0 |
| virtual | ~abstract_linear_solver ()=default |
| 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 |
Public Attributes | |
| std::string | name |
| the solver name More... | |
| const char * | options_file |
| the file containing the solver options More... | |
| norm_t | norm = norm_unset |
| SF_real | final_residual = -1.0 |
| Holds the residual after convergence. More... | |
| SF_real | time = 0.0 |
| solver runtime More... | |
| SF_int | niter = -1 |
| number of iterations More... | |
| SF_int | max_it = 0 |
| max number of iterations More... | |
| SF_int | reason = 0 |
| number of iterations More... | |
Protected Member Functions | |
| virtual void | set_stopping_criterion (norm_t normtype, double tol, int max_it, bool verbose, void *logger)=0 |
| norm_t | convert_param_norm_type (short param_norm_type) const |
Simple struct holding informations and operations related to linear solvers.
| T | Integer type (indices). |
| S | Floating point type (values). |
Definition at line 40 of file SF_abstract_lin_solver.h.
| enum SF::abstract_linear_solver::norm_t |
Enum representing the residual norm stopping criterion type.
| Enumerator | |
|---|---|
| absPreResidual | |
| absUnpreResidual | |
| relResidual | |
| absPreRelResidual | |
| norm_unset | |
Definition at line 46 of file SF_abstract_lin_solver.h.
|
virtualdefault |
Default destructor.
|
inlineprotected |
Simple helper function converting a short (number) to norm_t
| param_norm_type | a short number representing the norm type |
Definition at line 104 of file SF_abstract_lin_solver.h.
|
pure virtual |
Solve the system Ax=b.
| x | The solution vector |
| b | The right hand side |
|
protectedpure virtual |
Set the stopping criterion parameters for the solver.
| normtype | The type of residual norm. |
| tol | The tolerance to which the solver should converge. |
| mat_it | The maximum number of iterations for the solver. |
| verbose | Whether to print detailed informations. |
| logger | A generic pointer to the logger object. |
|
pure virtual |
Setup the solver characteristics.
| mat | The system matrix. |
| tol | The tolerance to which the solver should converge. |
| mat_it | The maximum number of iterations for the solver. |
| name | The solver name. |
| has_nullspace | Whether there is a constant nullspace or not. |
| logger | A generic pointer to the logger object. |
| default_opts | A string representing default PETSc options. Used by petsc only. |
| SF_real SF::abstract_linear_solver< T, S >::final_residual = -1.0 |
Holds the residual after convergence.
Definition at line 50 of file SF_abstract_lin_solver.h.
| SF_int SF::abstract_linear_solver< T, S >::max_it = 0 |
max number of iterations
Definition at line 53 of file SF_abstract_lin_solver.h.
| std::string SF::abstract_linear_solver< T, S >::name |
the solver name
Definition at line 42 of file SF_abstract_lin_solver.h.
| SF_int SF::abstract_linear_solver< T, S >::niter = -1 |
number of iterations
Definition at line 52 of file SF_abstract_lin_solver.h.
| norm_t SF::abstract_linear_solver< T, S >::norm = norm_unset |
Definition at line 47 of file SF_abstract_lin_solver.h.
| const char* SF::abstract_linear_solver< T, S >::options_file |
the file containing the solver options
Definition at line 43 of file SF_abstract_lin_solver.h.
| SF_int SF::abstract_linear_solver< T, S >::reason = 0 |
number of iterations
Definition at line 54 of file SF_abstract_lin_solver.h.
| SF_real SF::abstract_linear_solver< T, S >::time = 0.0 |
solver runtime
Definition at line 51 of file SF_abstract_lin_solver.h.