|
openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
|
NOTE: A LOT OF THESE THINGS NEED TO BE CHANGED AT A LATER STAGE. THEY ARE CURRENTLY COPIED FROM THE ABSTRACT_LINEAR_SOLVER. More...
#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_nonlinear_solver ()=default |
| 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 |
Public Attributes | |
| const char * | name |
| the solver name More... | |
| const char * | options_file |
| the file containing the solver options More... | |
| norm_t | norm = norm_unset |
| double | final_residual = -1.0 |
| Holds the residual after convergence. More... | |
| int | niter = -1 |
| number of iterations More... | |
| int | max_it = 0 |
| max number of iterations More... | |
| int | reason = 0 |
| number of iterations More... | |
| double | time = 0.0 |
| solver runtime 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 |
NOTE: A LOT OF THESE THINGS NEED TO BE CHANGED AT A LATER STAGE. THEY ARE CURRENTLY COPIED FROM THE ABSTRACT_LINEAR_SOLVER.
Simple struct holding informations and operations related to nonlinear solvers.
| T | Integer type (indices). |
| S | Floating point type (values). |
Definition at line 138 of file SF_abstract_lin_solver.h.
| enum SF::abstract_nonlinear_solver::norm_t |
Enum representing the residual norm stopping criterion type.
| Enumerator | |
|---|---|
| absPreResidual | |
| absUnpreResidual | |
| relResidual | |
| absPreRelResidual | |
| norm_unset | |
Definition at line 144 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 207 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.
| residuum | The residual vector on the rhs of the nonlinear equation |
| mat | The system matrix. |
| tol | The tolerance to which the solver should converge. |
| mat_it | The maximum number of iterations for the solver. |
| norm | |
| name | The solver name. |
| has_nullspace | Whether there is a constant nullspace or not. |
| logger | A generic pointer to the logger object. |
| solver_opts_file | File where the solver options are stored (not implemented yet) |
| default_opts | A string representing default PETSc options. Used by petsc only. |
| function | Function to be evaluated in the SNES solver scheme. Needs to be a PetscErrorCode with input parameters of type (SNES, Vec, Vec, void *) |
| double SF::abstract_nonlinear_solver< T, S >::final_residual = -1.0 |
Holds the residual after convergence.
Definition at line 148 of file SF_abstract_lin_solver.h.
| int SF::abstract_nonlinear_solver< T, S >::max_it = 0 |
max number of iterations
Definition at line 150 of file SF_abstract_lin_solver.h.
| const char* SF::abstract_nonlinear_solver< T, S >::name |
the solver name
Definition at line 140 of file SF_abstract_lin_solver.h.
| int SF::abstract_nonlinear_solver< T, S >::niter = -1 |
number of iterations
Definition at line 149 of file SF_abstract_lin_solver.h.
| norm_t SF::abstract_nonlinear_solver< T, S >::norm = norm_unset |
Definition at line 145 of file SF_abstract_lin_solver.h.
| const char* SF::abstract_nonlinear_solver< T, S >::options_file |
the file containing the solver options
Definition at line 141 of file SF_abstract_lin_solver.h.
| int SF::abstract_nonlinear_solver< T, S >::reason = 0 |
number of iterations
Definition at line 151 of file SF_abstract_lin_solver.h.
| double SF::abstract_nonlinear_solver< T, S >::time = 0.0 |
solver runtime
Definition at line 152 of file SF_abstract_lin_solver.h.