|
TBCI Numerical high perf. C++ Library
2.8.0
|
Implements the TBCI::BiCGSTAB solver. More...
#include "tbci/vector.h"#include "tbci/solver/precond.h"
Go to the source code of this file.
Macros | |
| #define | BICGSTAB_RESTART |
Functions | |
| NAMESPACE_TBCI | INST3 (template< typename T, Matrix< T >, double > class NN friend int BiCGSTAB(const Matrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Matrix< T > > &, unsigned int &, double &, const unsigned);) INST3(template< typename T |
| NAMESPACE_TBCI double class NN friend int | BiCGSTAB (const BdMatrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, BdMatrix< T > > &, unsigned int &, double &, const unsigned) |
| INST3 (template< typename T, Symm_BdMatrix< T >, double > class NN friend int BiCGSTAB(const Symm_BdMatrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Symm_BdMatrix< T > > &, unsigned int &, double &, const unsigned);) template< typename T | |
| BiCGSTAB solves the unsymmetric linear system Ax = b using the Preconditioned BiConjugate Gradient Stabilized method. More... | |
| T_tol int | BiCGSTAB (const SysMatrix &A, Vector< T > &x, const Vector< T > &b, const Preconditioner_Sig< T, SysMatrix > &M, unsigned int &max_iter, T_tol &tol, const unsigned off=0) |
Variables | |
| NAMESPACE_TBCI | BdMatrix< T > |
| SysMatrix | |
Implements the TBCI::BiCGSTAB solver.
Definition in file bicgstab.h.
| #define BICGSTAB_RESTART |
Definition at line 18 of file bicgstab.h.
| NAMESPACE_TBCI double class NN friend int BiCGSTAB | ( | const BdMatrix< T > & | , |
| Vector< T > & | , | ||
| const Vector< T > & | , | ||
| const Preconditioner_Sig< T, BdMatrix< T > > & | , | ||
| unsigned int & | , | ||
| double & | , | ||
| const unsigned | |||
| ) |
| T_tol int BiCGSTAB | ( | const SysMatrix & | A, |
| Vector< T > & | x, | ||
| const Vector< T > & | b, | ||
| const Preconditioner_Sig< T, SysMatrix > & | M, | ||
| unsigned int & | max_iter, | ||
| T_tol & | tol, | ||
| const unsigned | off = 0 |
||
| ) |
Definition at line 91 of file bicgstab.h.
References TBCI::dot(), std::fabs(), TBCI::fabssqr(), Vector< T >::fabssqr(), i, LIKELY, MATH__, p, Preconditioner_Sig< T, MatrixType >::solve(), sqr(), std::sqrt(), STD__, TBCI__, UNLIKELY, v, and x.
| NAMESPACE_TBCI INST3 | ( | template< typename T, Matrix< T >, double > class NN friend int BiCGSTAB(const Matrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Matrix< T > > &, unsigned int &, double &, const unsigned); | ) |
| INST3 | ( | template< typename T, Symm_BdMatrix< T >, double > class NN friend int BiCGSTAB(const Symm_BdMatrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Symm_BdMatrix< T > > &, unsigned int &, double &, const unsigned); | ) |
BiCGSTAB solves the unsymmetric linear system Ax = b using the Preconditioned BiConjugate Gradient Stabilized method.
BiCGSTAB follows the algorithm described on p. 27 of the SIAM Templates book.
| A | – System Matrix with coeffs of linear system to be solved |
| x | – input: initial guess value; output: approximate solution to Ax = b |
| b | – Vector (inhomogeneity) |
| M | – Preconditioner |
| max_iter | – input: max number of iterations allowed; output: the number of iterations performed before the tolerance was reached |
| tol | – input: desired accuracy (residual is a measure for the relative error); output: residual after the final iteration |
| off | – only used when debug output is generated: offset |
If you use a preconditioner, don't forget to initialize it with the sys matrix (via constructor or update() member fct.)
BiCGstab is a good general purpose iterative solver; it's convergence is not as fast as CGS, when CGS finally gets on the right path, but it works a bit more reliably and makes progress right from the start.
Definition at line 49 of file bicgstab.h.
| SysMatrix |
Definition at line 90 of file bicgstab.h.
1.8.5