Gauss-Seidel based solver implementation. More...
#include <gs_solver.hpp>
Public Member Functions | |
| GSSolver (double w=1.66, double eps=1.0e-6, uint32_t imax=10000, double newton_Reps=1.0e-5, double newton_dXeps=1.0e-6, uint32_t newton_imax=10) | |
| Constructor. More... | |
| ~GSSolver () | |
| Destructor. More... | |
| virtual void | solve (const Problem &p, Vector &X) |
| Solve problem p defined in geometry g. Initial guess and solution are in vector X. More... | |
| virtual void | reset (void) |
| Reset solver. More... | |
| void | set_newton_imax (uint32_t newton_imax) |
| Sets maximum iteration count for Newton-Raphson steps. More... | |
| void | set_newton_residual_eps (double newton_Reps) |
| Sets the accuracy request for Newton-Raphson residual. More... | |
| void | set_newton_step_eps (double newton_dXeps) |
| Sets the accuracy request for Newton-Raphson step size. More... | |
Public Member Functions inherited from Solver | |
| virtual | ~Solver () |
| Virtual destructor. More... | |
| virtual void | solve (const class Problem &p, Vector &X)=0 |
| Solve problem p. Initial guess and solution are in vector X. More... | |
Static Public Member Functions | |
| static bool | gauss_seidel (const CRowMatrix &mat, const Vector &rhs, Vector &sol, uint32_t &imax, double &eps, double w) |
| Direct interface to gauss_seidel matrix solver. More... | |
Gauss-Seidel based solver implementation.
An implementation of virtual class Solver using Gauss-Seidel/Successive over relaxation method for solving matrix equation. Linear and nonlinear solvers. Nonlinear solver not implemented.
The Gauss-Seidel solver has special limitations for the problem type because of convergence issues. The problem has to have first order neumann edges and the edge smoothing must be switched off.
| GSSolver::GSSolver | ( | double | w = 1.66, |
| double | eps = 1.0e-6, |
||
| uint32_t | imax = 10000, |
||
| double | newton_Reps = 1.0e-5, |
||
| double | newton_dXeps = 1.0e-6, |
||
| uint32_t | newton_imax = 10 |
||
| ) |
Constructor.
|
inline |
Destructor.
|
static |
Direct interface to gauss_seidel matrix solver.
Solves matrix problem mat * sol = rhs. The matrix is sorted to be on the ascending order as required by the GAUSS_SEIDEL library.
|
virtual |
Reset solver.
This is a signal from the problem that the problem has changed and internal caches (if they exist) in the solver should be resetted.
Implements Solver.
|
inline |
Sets maximum iteration count for Newton-Raphson steps.
|
inline |
Sets the accuracy request for Newton-Raphson residual.
|
inline |
Sets the accuracy request for Newton-Raphson step size.
Solve problem p defined in geometry g. Initial guess and solution are in vector X.