TBCI Numerical high perf. C++ Library 2.8.0
bicg.h File Reference

Iterative Vector equation solver TBCI::BiCG. More...

#include "tbci/basics.h"
Include dependency graph for bicg.h:

Go to the source code of this file.

Functions

NAMESPACE_TBCI INST3 (template< typename T, Matrix< T >, Vector< T > > class NN friend int BiCG(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 BiCG (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 BiCG (const SysMatrix &A, SysVector &x, const SysVector &b, const Preconditioner_Sig< T, SysMatrix > &M, unsigned int &max_iter, double &tol)
 Iterative template solver – BiCG.

Variables

NAMESPACE_TBCI BdMatrix< T >

Detailed Description

Iterative Vector equation solver TBCI::BiCG.

Definition in file bicg.h.

Function Documentation

◆ BiCG() [1/2]

NAMESPACE_TBCI Vector< T > class NN friend int BiCG ( const BdMatrix< T > & ,
Vector< T > & ,
const Vector< T > & ,
const Preconditioner_Sig< T, BdMatrix< T > > & ,
unsigned int & ,
double &  )

References T.

◆ BiCG() [2/2]

template<typename T, typename SysMatrix, typename SysVector>
int BiCG ( const SysMatrix & A,
SysVector & x,
const SysVector & b,
const Preconditioner_Sig< T, SysMatrix > & M,
unsigned int & max_iter,
double & tol )

Iterative template solver – BiCG.

BiCG solves the unsymmetric linear system Ax = b using the Preconditioned BiConjugate Gradient method

BiCG follows the algorithm described on p. 22 of the SIAM Templates book.

Returns
0 on success (=convergence within max_iter iterations), 1 if no convergence could be found. If the solver breaks down prematurely, it will return a value > 1.

Upon successful return, output arguments have the following values:

Parameters
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 47 of file bicg.h.

References b, conj(), i, MATH__, p, Preconditioner_Sig< T, MatrixType >::solve(), sqr(), sqrt(), SysMatrix, Preconditioner_Sig< T, MatrixType >::transSolve(), UNLIKELY, and x.

◆ INST3()

NAMESPACE_TBCI INST3 ( template< typename T, Matrix< T >, Vector< T > > class NN friend int BiCG(const Matrix< T > &, Vector< T > &, const Vector< T > &, const Preconditioner_Sig< T, Matrix< T > > &, unsigned int &, double &); )

Variable Documentation

◆ BdMatrix< T >

Definition at line 17 of file bicg.h.