TBCI Numerical high perf. C++ Library 2.8.0
qmr.h File Reference
#include "tbci/basics.h"
Include dependency graph for qmr.h:

Go to the source code of this file.

Macros

#define QMR_OUT(r)

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 >

Detailed Description

TBCI::QMR solver

Version
Id
qmr.h,v 1.8.2.27 2019/05/28 11:13:02 garloff Exp

Definition in file qmr.h.

Macro Definition Documentation

◆ QMR_OUT

#define QMR_OUT ( r)
Value:
do { err = r; goto qmr_out; } while(0)
const Vector< T > const Vector< T > const Vector< T > int T T & err
Definition LM_fit.h:102

Referenced by QMR().

Function Documentation

◆ INST3()

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 &); )

◆ QMR() [1/2]

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 &  )

References QMR(), and T.

Referenced by QMR().

◆ QMR() [2/2]

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 )

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.

Returns
-------------------------------------------------------—
return value indicates
---------— ------------------—
0 convergence within max_iter iterations
1 no convergence after max_iter iterations
breakdown in:
2 rho
3 beta
4 gamma
5 delta
6 ep

7 xi


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

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 b, c, err, fabssqr(), gamma(), i, MATH__, p, QMR_OUT, Preconditioner_Sig< T, MatrixType >::solve(), sqr(), sqrt(), std::sqrt(), STD__, SysMatrix, Preconditioner_Sig< T, MatrixType >::transSolve(), x, and y.

Variable Documentation

◆ BdMatrix< T >

Definition at line 15 of file qmr.h.