|
TBCI Numerical high perf. C++ Library
2.8.0
|
#include "tbci/basics.h"
Go to the source code of this file.
Macros | |
| #define | QMR_OUT(r) do { err = r; goto qmr_out; } while(0) |
Functions | |
| NAMESPACE_TBCI | INST3 (template< typename T, Matrix< T >, Vector< T > > class NN friend int QMR(const Matrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Matrix< T > > &, const Preconditioner_Sig< T, Matrix< T > > &, unsigned int &, double &);) INST3(template< typename T |
| NAMESPACE_TBCI Vector< T > class NN friend int | QMR (const BdMatrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, BdMatrix< T > > &, const Preconditioner_Sig< T, BdMatrix< T > > &, unsigned int &, double &) |
| template<typename T , typename SysMatrix , typename SysVector > | |
| int | QMR (const SysMatrix &A, SysVector &x, const SysVector &b, const Preconditioner_Sig< T, SysMatrix > &M1, const Preconditioner_Sig< T, SysMatrix > &M2, unsigned int &max_iter, double &tol) |
Variables | |
| NAMESPACE_TBCI | BdMatrix< T > |
TBCI::QMR solver
Definition in file qmr.h.
| NAMESPACE_TBCI INST3 | ( | template< typename T, Matrix< T >, Vector< T > > class NN friend int QMR(const Matrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Matrix< T > > &, const Preconditioner_Sig< T, Matrix< T > > &, unsigned int &, double &); | ) |
| NAMESPACE_TBCI Vector<T> class NN friend int QMR | ( | const BdMatrix< T > & | , |
| Vector< T > & | , | ||
| const Vector< T > & | , | ||
| const Preconditioner_Sig< T, BdMatrix< T > > & | , | ||
| const Preconditioner_Sig< T, BdMatrix< T > > & | , | ||
| unsigned int & | , | ||
| double & | |||
| ) |
| int QMR | ( | const SysMatrix & | A, |
| SysVector & | x, | ||
| const SysVector & | b, | ||
| const Preconditioner_Sig< T, SysMatrix > & | M1, | ||
| const Preconditioner_Sig< T, SysMatrix > & | M2, | ||
| unsigned int & | max_iter, | ||
| double & | tol | ||
| ) |
Iterative template routine – QMR
QMR solves the unsymmetric linear system Ax = b using the Quasi-Minimal Residual method following the algorithm as described on p. 24 in the SIAM Templates book.
Upon successful return, output arguments have the following values:
| x | – approximate solution to Ax=b |
| max_iter | – the number of iterations performed before the tolerance was reached |
| tol | – the residual after the final iteration |
If you use a preconditioner, don't forget to initialize it with the sys matrix (via constructor or update() member fct.)
Definition at line 59 of file qmr.h.
References c, err, TBCI::fabssqr(), gamma(), i, MATH__, p, QMR_OUT, Preconditioner_Sig< T, MatrixType >::solve(), sqr(), std::sqrt(), STD__, Preconditioner_Sig< T, MatrixType >::transSolve(), v, x, y, and z.
1.8.5