|
TBCI Numerical high perf. C++ Library
2.8.0
|
LU solver for TBCI::BdMatrix class (TBCI::lu_decomp) More...
#include "tbci/vector.h"#include "tbci/band_matrix.h"#include "tbci/matrix.h"
Go to the source code of this file.
Macros | |
| #define | BDMLU_MINVAL 1e-16 |
| #define | BDMLU_RES_WARN 1e-11 |
Functions | |
| template<typename T > | |
| NAMESPACE_TBCI int | lu_decomp (BdMatrix< T > &mat) |
| LU decompose a TBCI::BdMatrix. More... | |
| template<typename T > | |
| TVector< T > | LU_fwd_subst (const BdMatrix< T > &lu, const Vector< T > &y) |
| template<typename T > | |
| TVector< T > | LU_bkw_subst (const BdMatrix< T > &lu, const Vector< T > &y) |
| template<typename T > | |
| TVector< T > | LU_solve (const BdMatrix< T > &lu, const Vector< T > &b) |
| Solve the equation Ax = b where A IS already LU decomposed. More... | |
| template<typename T > | |
| TVector< T > | lu_solve (BdMatrix< T > &mat, const Vector< T > &b) |
| Solve the equation Ax = b where A still needs to be LU decomposed. More... | |
| template<typename T > | |
| TMatrix< T > | LU_solve (const BdMatrix< T > &lu, const Matrix< T > &b) |
| template<typename T > | |
| TMatrix< T > | lu_solve (BdMatrix< T > &mat, const Matrix< T > &b) |
| template<typename T > | |
| T | LU_det (const BdMatrix< T > &lu) |
| calculates determinant of an already LU decomposed BdMatrix More... | |
| template<typename T > | |
| T | lu_det (BdMatrix< T > &mat) |
| calculates the determinant of a BdMatrix by doing an LU decomposition More... | |
| template<typename T > | |
| TMatrix< T > | LU_invert (const BdMatrix< T > &lu) |
| return the inverse Matrix for an already LU decomposed BdMatrix More... | |
| template<typename T > | |
| TMatrix< T > | lu_invert (BdMatrix< T > &mat) |
| return the inverse Matrix for a BdMatrix by doing an LU decomposition More... | |
LU solver for TBCI::BdMatrix class (TBCI::lu_decomp)
LU decomposizes a BdMatrix and solves the Vector equation Ax = b
Definition in file bd_lu_solver.h.
| #define BDMLU_MINVAL 1e-16 |
Definition at line 33 of file bd_lu_solver.h.
Referenced by lu_decomp().
| #define BDMLU_RES_WARN 1e-11 |
Definition at line 38 of file bd_lu_solver.h.
Referenced by lu_solve().
Definition at line 224 of file bd_lu_solver.h.
References ALIGN2, BCHK, TVector< T >::get(), BdMatrix< T >::get(), BdMatrix< T >::getmaxoff(), i, MIN, MIN_ALIGN2, REGISTER, BdMatrix< T >::rows(), TVector< T >::set(), TVector< T >::size(), x, and y.
Referenced by LU_solve().
| NAMESPACE_TBCI int lu_decomp | ( | BdMatrix< T > & | mat | ) |
LU decompose a TBCI::BdMatrix.
Decomposition is compactly stored in one BdMatrix The diagonal elements of the lower BdMatrix are all 1 (this is a feature of the algorithm)
Definition at line 57 of file bd_lu_solver.h.
References ALIGN2, BCHK, BDMLU_MINVAL, BdMatrix< T >::expand(), std::fabs(), BdMatrix< T >::get(), BdMatrix< T >::getmaxoff(), i, MATH__, MAX, MIN, MIN_ALIGN2, REGISTER, BdMatrix< T >::rows(), BdMatrix< T >::setval(), STD__, T, and UNLIKELY.
calculates determinant of an already LU decomposed BdMatrix
Definition at line 317 of file bd_lu_solver.h.
References ALIGN2, BdMatrix< T >::get(), i, MIN_ALIGN2, REGISTER, and BdMatrix< T >::rows().
Referenced by lu_det().
calculates the determinant of a BdMatrix by doing an LU decomposition
Definition at line 329 of file bd_lu_solver.h.
References lu_decomp(), and LU_det().
Definition at line 207 of file bd_lu_solver.h.
References ALIGN2, BCHK, TVector< T >::get(), BdMatrix< T >::get(), BdMatrix< T >::getmaxoff(), i, MAX, MIN_ALIGN2, REGISTER, BdMatrix< T >::rows(), TVector< T >::set(), TVector< T >::size(), x, and y.
Referenced by LU_solve().
return the inverse Matrix for an already LU decomposed BdMatrix
Definition at line 338 of file bd_lu_solver.h.
References BdMatrix< T >::columns(), inv(), LU_solve(), BdMatrix< T >::rows(), T, v, and y.
Referenced by lu_invert().
return the inverse Matrix for a BdMatrix by doing an LU decomposition
Definition at line 355 of file bd_lu_solver.h.
References lu_decomp(), and LU_invert().
|
inline |
Solve the equation Ax = b where A IS already LU decomposed.
Definition at line 246 of file bd_lu_solver.h.
References LU_bkw_subst(), LU_fwd_subst(), and y.
Referenced by LU_invert(), and lu_solve().
Solve the equation Ax = b where A still needs to be LU decomposed.
Definition at line 260 of file bd_lu_solver.h.
References BDMLU_RES_WARN, BVector< T >::copy(), std::fabs(), lu_decomp(), LU_solve(), MATH__, res, TVector< T >::size(), STD__, UNLIKELY, and x.
Definition at line 279 of file bd_lu_solver.h.
References TMatrix< T >::columns(), TMatrix< T >::get_col(), i, LU_bkw_subst(), LU_fwd_subst(), TMatrix< T >::rows(), x, and y.
Definition at line 295 of file bd_lu_solver.h.
References lu_decomp(), and LU_solve().
1.8.5