|
TBCI Numerical high perf. C++ Library
2.8.0
|
The iterative Vector equation solver TBCI::CG. More...
#include "tbci/basics.h"#include "tbci/solver/precond.h"
Go to the source code of this file.
Functions | |
| NAMESPACE_TBCI | INST3 (template< typename T, Matrix< T >, Vector< T > > class NN friend int CG(const Matrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Matrix< T > > &, unsigned int &, double &);) INST3(template< typename T |
| NAMESPACE_TBCI Vector< T > class NN friend int | CG (const BdMatrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, BdMatrix< T > > &, unsigned int &, double &) |
| template<typename T , typename SysMatrix , typename SysVector > | |
| int | CG (const SysMatrix &A, SysVector &x, const SysVector &b, const Preconditioner_Sig< T, SysMatrix > &M, unsigned int &max_iter, double &tol) |
| Iterative template solver routine – CG. More... | |
| INST3 (template< typename T, Matrix< T >, Vector< T > > class NN friend int CG2(const Matrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Matrix< T > > &, unsigned int &, double &);) INST3(template< typename T | |
| Vector< T > class NN friend int | CG2 (const BdMatrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, BdMatrix< T > > &, unsigned int &, double &) |
| template<typename T , typename SysMatrix , typename SysVector > | |
| int | CG2 (const SysMatrix &A, SysVector &x, const SysVector &b, const Preconditioner_Sig< T, SysMatrix > &M, unsigned int &max_iter, double &tol) |
| CG2 solves the symmetric complex (positive definite?) linear system Ax=b using the Conjugate Gradient method. More... | |
Variables | |
| NAMESPACE_TBCI | BdMatrix< T > |
| NAMESPACE_TBCI Vector<T> class NN friend int CG | ( | const BdMatrix< T > & | , |
| Vector< T > & | , | ||
| const Vector< T > & | , | ||
| const Preconditioner_Sig< T, BdMatrix< T > > & | , | ||
| unsigned int & | , | ||
| double & | |||
| ) |
| int CG | ( | const SysMatrix & | A, |
| SysVector & | x, | ||
| const SysVector & | b, | ||
| const Preconditioner_Sig< T, SysMatrix > & | M, | ||
| unsigned int & | max_iter, | ||
| double & | tol | ||
| ) |
Iterative template solver routine – CG.
CG solves the symmetric positive definite linear system Ax=b using the Conjugate Gradient method.
CG follows the algorithm described on p. 15 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 |
Definition at line 45 of file cg.h.
References BVector< T >::dim, TBCI::dot(), i, p, Preconditioner_Sig< T, MatrixType >::solve(), and z.
| Vector<T> class NN friend int CG2 | ( | const BdMatrix< T > & | , |
| Vector< T > & | , | ||
| const Vector< T > & | , | ||
| const Preconditioner_Sig< T, BdMatrix< T > > & | , | ||
| unsigned int & | , | ||
| double & | |||
| ) |
| int CG2 | ( | const SysMatrix & | A, |
| SysVector & | x, | ||
| const SysVector & | b, | ||
| const Preconditioner_Sig< T, SysMatrix > & | M, | ||
| unsigned int & | max_iter, | ||
| double & | tol | ||
| ) |
CG2 solves the symmetric complex (positive definite?) linear system Ax=b using the Conjugate Gradient method.
Definition at line 112 of file cg.h.
References BVector< T >::dim, i, p, Preconditioner_Sig< T, MatrixType >::solve(), and z.
| NAMESPACE_TBCI INST3 | ( | template< typename T, Matrix< T >, Vector< T > > class NN friend int CG(const Matrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Matrix< T > > &, unsigned int &, double &); | ) |
| INST3 | ( | template< typename T, Matrix< T >, Vector< T > > class NN friend int CG2(const Matrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Matrix< T > > &, unsigned int &, double &); | ) |
1.8.5