Documentation 6b54b78464
Loading...
Searching...
No Matches
CBlasStructure Class Reference

Class, which serves as an interface to the BLAS functionalities needed. More...

#include <blas_structure.hpp>

Public Member Functions

 CBlasStructure (void)
 Constructor of the class. Initialize the constant member variables.
 
void gemm (const int M, const int N, const int K, const su2double *A, const su2double *B, su2double *C, const CConfig *config)
 Function, which carries out a dense matrix product. It is a limited version of the BLAS gemm functionality..
 
void gemv (const int M, const int N, const su2double *A, const su2double *x, su2double *y)
 Function, which carries out a dense matrix vector product y = A x. It is a limited version of the BLAS gemv functionality.
 
void axpy (const int n, const su2double a, const su2double *x, const int incx, su2double *y, const int incy)
 Function, to carry out the axpy operation, i.e y += a*x.
 

Static Public Member Functions

template<class Mat >
static void inverse (const int M, Mat &mat)
 Invert a square matrix.
 
template<class Mat , class Vec , class W >
static void tred2 (Mat &V, Vec &d, W &e, int n)
 tred2 Author:
 
template<class Mat , class Vec , class W >
static void tql2 (Mat &V, Vec &d, W &e, int n)
 tql2 Author:
 
template<class Mat , class Vec , class W >
static void EigenDecomposition (const Mat &A_ij, Mat &Eig_Vec, Vec &Eig_Val, int n, W &e)
 Decomposes the symmetric matrix A_ij, into eigenvectors and eigenvalues.
 
template<class Mat , class Vec >
static void EigenRecomposition (Mat &A_ij, const Mat &Eig_Vec, const Vec &Eig_Val, int n)
 Recomposes the eigenvectors and eigenvalues into a matrix.
 
template<class Vec , class Scalar = su2double>
static void tdma (const Vec &lower, const Vec &main, Vec &upper, Vec &rhs)
 Algorithm to solve a linear system with a tridiagonal matrix.
 

Detailed Description

Class, which serves as an interface to the BLAS functionalities needed.

Author
: E. van der Weide
Version
8.5.0 "Harrier"

Constructor & Destructor Documentation

◆ CBlasStructure()

CBlasStructure::CBlasStructure ( void  )

Constructor of the class. Initialize the constant member variables.

Member Function Documentation

◆ axpy()

void CBlasStructure::axpy ( const int  n,
const su2double  a,
const su2double *  x,
const int  incx,
su2double *  y,
const int  incy 
)

Function, to carry out the axpy operation, i.e y += a*x.

Parameters
[in]n- Number of elements in the vectors x and y.
[in]a- Specifies the scalar a.
[in]x- Array, which must be added, size of x must be at least 1 + (n-1)*abs(incx). param[in] incx - Specifies the increment of x. param[inout] y - Vector to be updated, size of y must be at least 1 + (n-1)*abs(incy). param[in] incy - Specifies the increment of y.

◆ EigenDecomposition()

template<class Mat , class Vec , class W >
static void CBlasStructure::EigenDecomposition ( const Mat &  A_ij,
Mat &  Eig_Vec,
Vec &  Eig_Val,
int  n,
W &  e 
)
inlinestatic

Decomposes the symmetric matrix A_ij, into eigenvectors and eigenvalues.

Parameters
[in]A_isymmetric matrix to be decomposed
[in,out]Eig_Vecstores the eigenvectors
[in,out]Eig_Valstores the eigenvalues
[in]norder of matrix A_ij
[in,out]ework vector

◆ EigenRecomposition()

template<class Mat , class Vec >
static void CBlasStructure::EigenRecomposition ( Mat &  A_ij,
const Mat &  Eig_Vec,
const Vec &  Eig_Val,
int  n 
)
inlinestatic

Recomposes the eigenvectors and eigenvalues into a matrix.

Parameters
[out]A_ijrecomposed matrix
[in]Eig_Veceigenvectors
[in]Eig_Valeigenvalues
[in]norder of matrix A_ij

◆ gemm()

void CBlasStructure::gemm ( const int  M,
const int  N,
const int  K,
const su2double *  A,
const su2double *  B,
su2double *  C,
const CConfig *  config 
)

Function, which carries out a dense matrix product. It is a limited version of the BLAS gemm functionality..

Parameters
[in]M- Number of rows of A and C.
[in]N- Number of columns of B and C.
[in]K- Number of columns of A and number of rows of B.
[in]A- Input matrix in the multiplication.
[in]B- Input matrix in the multiplication.
[out]C- Result of the matrix product A*B.

◆ gemv()

void CBlasStructure::gemv ( const int  M,
const int  N,
const su2double *  A,
const su2double *  x,
su2double *  y 
)

Function, which carries out a dense matrix vector product y = A x. It is a limited version of the BLAS gemv functionality.

Parameters
[in]M- Number of rows of A and size of y.
[in]N- Number of columns of A and size of x.
[in]A- Input matrix in the multiplication, row major order.
[in]x- Input vector in the multiplication.
[out]y- Result of the product A x.

◆ inverse()

template<class Mat >
static void CBlasStructure::inverse ( const int  M,
Mat &  mat 
)
inlinestatic

Invert a square matrix.

Parameters
[in]M- Size.
[in,out]mat- Matrix, and inverse on exit.

◆ tdma()

template<class Vec , class Scalar = su2double>
static void CBlasStructure::tdma ( const Vec &  lower,
const Vec &  main,
Vec &  upper,
Vec &  rhs 
)
inlinestatic

Algorithm to solve a linear system with a tridiagonal matrix.

Parameters
[in]lower- lower diagonal
[in]main- main diagonal
[in,out]upper- upper diagonal (modified on exit)
[in,out]rhs- right hand side on entry, solution on exit
Note
Same size for all vectors. Use row index for lower and upper vector (e.g. lower[0] does not matter).

◆ tql2()

template<class Mat , class Vec , class W >
static void CBlasStructure::tql2 ( Mat &  V,
Vec &  d,
W &  e,
int  n 
)
inlinestatic

tql2 Author:

Original FORTRAN77 version by Smith, Boyle, Dongarra, Garbow, Ikebe, Klema, Moler. C++ version by Aashwin Mishra and Jayant Mukhopadhaya.

Reference:

Bowdler, Martin, Reinsch, Wilkinson, TQL2, Numerische Mathematik, Volume 11, pages 293-306, 1968.

James Wilkinson, Christian Reinsch, Handbook for Automatic Computation, Volume II, Linear Algebra, Part 2, Springer, 1971, ISBN: 0387054146, LC: QA251.W67.

Brian Smith, James Boyle, Jack Dongarra, Burton Garbow, Yasuhiko Ikebe, Virginia Klema, Cleve Moler, Matrix Eigensystem Routines, EISPACK Guide, Lecture Notes in Computer Science, Volume 6, Springer Verlag, 1976, ISBN13: 978-3540075462, LC: QA193.M37

Parameters
[in,out]Vmatrix that will hold the eigenvectors
[in,out]darray that will hold the ordered eigenvalues
[in,out]ework vector
[in]norder of matrix V

◆ tred2()

template<class Mat , class Vec , class W >
static void CBlasStructure::tred2 ( Mat &  V,
Vec &  d,
W &  e,
int  n 
)
inlinestatic

tred2 Author:

Original FORTRAN77 version by Smith, Boyle, Dongarra, Garbow, Ikebe, Klema, Moler. C++ version by Aashwin Mishra and Jayant Mukhopadhaya.

Reference:

Martin, Reinsch, Wilkinson, TRED2, Numerische Mathematik, Volume 11, pages 181-195, 1968.

James Wilkinson, Christian Reinsch, Handbook for Automatic Computation, Volume II, Linear Algebra, Part 2, Springer, 1971, ISBN: 0387054146, LC: QA251.W67.

Brian Smith, James Boyle, Jack Dongarra, Burton Garbow, Yasuhiko Ikebe, Virginia Klema, Cleve Moler, Matrix Eigensystem Routines, EISPACK Guide, Lecture Notes in Computer Science, Volume 6, Springer Verlag, 1976, ISBN13: 978-3540075462, LC: QA193.M37

Parameters
[in,out]Vmatrix that needs to be decomposed
[in,out]dholds eigenvalues
[in,out]ework vector
[in]norder of matrix V

The documentation for this class was generated from the following files: