![]() |
Documentation 6b54b78464
|
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. | |
Class, which serves as an interface to the BLAS functionalities needed.
| CBlasStructure::CBlasStructure | ( | void | ) |
Constructor of the class. Initialize the constant member variables.
| 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.
| [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. |
|
inlinestatic |
Decomposes the symmetric matrix A_ij, into eigenvectors and eigenvalues.
| [in] | A_i | symmetric matrix to be decomposed |
| [in,out] | Eig_Vec | stores the eigenvectors |
| [in,out] | Eig_Val | stores the eigenvalues |
| [in] | n | order of matrix A_ij |
| [in,out] | e | work vector |
|
inlinestatic |
Recomposes the eigenvectors and eigenvalues into a matrix.
| [out] | A_ij | recomposed matrix |
| [in] | Eig_Vec | eigenvectors |
| [in] | Eig_Val | eigenvalues |
| [in] | n | order of matrix A_ij |
| 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..
| [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. |
| 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.
| [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. |
|
inlinestatic |
Invert a square matrix.
| [in] | M | - Size. |
| [in,out] | mat | - Matrix, and inverse on exit. |
|
inlinestatic |
Algorithm to solve a linear system with a tridiagonal matrix.
| [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 |
|
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
| [in,out] | V | matrix that will hold the eigenvectors |
| [in,out] | d | array that will hold the ordered eigenvalues |
| [in,out] | e | work vector |
| [in] | n | order of matrix V |
|
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
| [in,out] | V | matrix that needs to be decomposed |
| [in,out] | d | holds eigenvalues |
| [in,out] | e | work vector |
| [in] | n | order of matrix V |