#include <band_matrix.h>


Public Types | |
| typedef T | value_type |
| typedef T | element_type |
| typedef T | aligned_value_type |
Public Member Functions | |
| BdMatrix (const unsigned int=0) | |
| c'tor tridiagonal | |
| BdMatrix (const unsigned int, const unsigned int) | |
| c'tor with rows and columns (which need to be identical) | |
| BdMatrix (const unsigned int, const BVector< unsigned int > &) | |
| c'tor with config Vector | |
| BdMatrix (const BdMatrix< T > &) | |
| copy c'tor | |
| BdMatrix (const T &, const unsigned int) | |
| c'tor variants with initial value on diag (tridiag, with config) | |
| BdMatrix (const T &, const unsigned int, const BVector< unsigned int > &) | |
| BdMatrix (const T &, const unsigned int, unsigned int) | |
| c'tor with # of offdiags (band Matrix) | |
| BdMatrix (const Matrix< T > &) | |
| c'tor to copy Matrix and self-determine sparseness | |
| ~BdMatrix () | |
| void | destroy () |
| destroy object explicitly | |
| template<typename U> | |
| BdMatrix (const BdMatrix< U > &bm) | |
| operator TMatrix< T > () const | |
| cast | |
| T & | operator() (const unsigned int, const unsigned int) |
| rw member access | |
| tbci_traits< T >::const_refval_type | operator() (const unsigned int, const unsigned int) const |
| ro member access | |
| BdMatrix< T > & | setval (const T &v, const unsigned int r, const unsigned int c) |
| autoinsert, sparse class compatible | |
| T & | setval (const unsigned int r, const unsigned int c) |
| tbci_traits< T >::const_refval_type | get (const unsigned int i, const unsigned int j) const |
| BdMatrix< T > & | transpose () |
| transpose() does change the object! | |
| BdMatrix< T > & | resize (const unsigned int) |
| BdMatrix< T > & | resize (const T &, const unsigned int) |
| BdMatrix< T > & | resize (const unsigned int, const BVector< unsigned int > &) |
| BdMatrix< T > & | resize (const T &, const unsigned int, const BVector< unsigned int > &) |
| BdMatrix< T > & | resize (const BdMatrix< T > &bdm) |
| Resizing assignment. | |
| BdMatrix< T > & | reconfig (const BVector< unsigned int > &) |
| BdMatrix< T > & | setunit (const T &=1) |
| BdMatrix< T > & | fill (const T &=0) |
| BdMatrix< T > & | clear () |
| BdMatrix< T > & | adddiag (const unsigned) |
| BdMatrix< T > & | removediag (const unsigned) |
| BdMatrix< T > & | autoinsert (const T &, const unsigned, const unsigned) |
| BdMatrix< T > & | expand (unsigned=0) |
| BdMatrix< T > & | set_row (const Vector< T > &val, const unsigned, const unsigned=0) |
| Overwrite row with Vector. | |
| TVector< T > | get_row (const unsigned int) const |
| Construct Vector from row. | |
| TVector< T > | get_col (const unsigned int) const |
| Construct Vector from column. | |
| unsigned int | size () const |
| size: incompatibility to Matrix (!) | |
| unsigned int | noelem () const |
| Number of elements that are actually stored. | |
| unsigned int | rows () const |
| number of rows | |
| unsigned int | columns () const |
| number of columns | |
| const BVector< unsigned int > & | getcfg () const |
| ro access to config BVector | |
| unsigned int | getmaxoff () const |
| max distance from main diagonal | |
| T | trace () const |
| BdMatrix< T > & | operator= (const BdMatrix< T > &) |
| The assignment operators in TBCI are NOT resizing. | |
| BdMatrix< T > & | operator= (const T &) |
| BdMatrix< T > & | operator+= (const BdMatrix< T > &) |
| BdMatrix< T > & | operator-= (const BdMatrix< T > &) |
| BdMatrix< T > & | operator*= (const T &) |
| BdMatrix< T > & | operator/= (const T &) |
| bool | operator== (const BdMatrix< T > &) const |
| bool | operator!= (const BdMatrix< T > &ma) const |
| BdMatrix< T > | operator+ (const BdMatrix< T > &) const |
| BdMatrix< T > | operator- (const BdMatrix< T > &) const |
| BdMatrix< T > | operator* (const BdMatrix< T > &) const |
| BdMatrix< T > | operator* (const T &) const |
| BdMatrix< T > | operator/ (const T &) const |
| BdMatrix< T > | operator- () const |
| TVector< T > | operator* (const Vector< T > &) const |
| Matrix-Vector multiplication. | |
| TVector< T > | transMult (const Vector< T > &) const |
| Transposed Matrix-Vector multiplication. | |
| TVector< T > | dotMult (const Vector< T > &) const |
| TMatrix< T > | operator* (const Matrix< T > &) const |
| BdMatrix< T > & | mult_rows (const Vector< T > &) |
| Linewise multiplication. | |
| BdMatrix< T > & | div_rows (const Vector< T > &) |
| BdMatrix< T > & | mult_row (const T &, const unsigned) |
| BdMatrix< T > & | div_row (const T &, const unsigned) |
| const BdMatrix< T > & | setoutopts (int w=5, int p=4, char f= ' ') const |
| BdMatrix< T > | inverse () const |
| template<> | |
| BdMatrix< int > & | operator/= (const int &div) |
| template<> | |
| BdMatrix< unsigned int > & | operator/= (const unsigned int &div) |
Static Public Member Functions | |
| static const char * | mat_info () |
Protected Member Functions | |
| void | constructor (const unsigned int, const bool=true) |
| T * | check (const unsigned r, const unsigned c) const |
| void | free_diags (const unsigned) |
| Implementation alternative: All memory is allocated in one big chunk (default). | |
| void | do_copy (const BdMatrix< T > &) |
Protected Attributes | |
| unsigned int | dim |
| unsigned int | maxoff |
| size, max offset from diag | |
| unsigned long | arsz |
| # of saved elems, | |
| BVector< unsigned > | diagconf |
| configuration | |
| BVector< T * > | adiag |
| BVector< T * > | bdiag |
| pointers to upper and lower diagonals | |
| T * | diag |
Friends | |
| class | ILU0_BdMatrixPreconditioner< T > |
| class | DILU_BdMatrixPreconditioner< T > |
| class | BdMatrix |
| std::istream & | operator>> (std::istream &, BdMatrix< T > &) |
| std::ostream & | operator<< (std::ostream &, const BdMatrix< T > &) |
| void | gaussj (const BdMatrix< T > &, const Matrix< T > &) |
| int | lu_decomp (BdMatrix< T > &) |
| LU decompose a TBCI::BdMatrix. | |
| void | do_bdmat_vec_mult (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *) |
| void | do_bdmat_vec_transmult (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *) |
| void | do_bdmat_vec_dotmult (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *) |
It stores the main diagonal and additional diagonals of your Matrix as arrays.
This is an efficient way to handle matrices that have only a few diagonals, such as e.g. the typical pentadiagonal systems from solving discretized partial differential equations in 2 dimensions.
Default shape is tridiagonal, additional diagonals to be stored can be given by a BVector argument to the constructor, or by using autoinsert(), which allocates diagonals as needed.
Alternatives: CSCMatrix is a good choice for sparse matrices as well.
Layout:
... d ad1 ad2 ...
bd1. \. \. \.
bd2.\.00 01 02 03 04 .... 0N
... \.10 11 12 13 14 .... 1N
..... 20 21 22 23 24 .... 2N
..... .. .. .. .. .. .... ..
..... .. .. .. .. .. .... ..
..... N0 N1 N2 N3 N4 .... NN
Thus, an element a(i,j) is
diag[i] if i==j
adiag(j-i)[i] if j>i
bdiag(i-j)[j] if i>j
adiag(j-i)[i] with j >= N <=> i + j-i >= N do not exist
bdiag(i-j)[j] with i >= N <=> j + i-j >= N do not exist
Definition at line 103 of file band_matrix.h.
| typedef T TBCI::BdMatrix< T >::value_type |
Definition at line 131 of file band_matrix.h.
| typedef T TBCI::BdMatrix< T >::element_type |
Definition at line 132 of file band_matrix.h.
| typedef T TBCI::BdMatrix< T >::aligned_value_type |
Definition at line 133 of file band_matrix.h.
| TBCI::BdMatrix< T >::BdMatrix | ( | const unsigned int | d = 0 |
) | [inline, explicit] |
c'tor tridiagonal
Definition at line 492 of file band_matrix.h.
References TBCI::BdMatrix< T >::clear(), TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::diagconf, TBCI::BVector< T >::resize(), and UNLIKELY.
| TBCI::BdMatrix< T >::BdMatrix | ( | const unsigned int | d, | |
| const unsigned int | e | |||
| ) | [inline, explicit] |
c'tor with rows and columns (which need to be identical)
Definition at line 501 of file band_matrix.h.
References BCHKNR, TBCI::BdMatrix< T >::clear(), TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::diagconf, TBCI::BVector< T >::resize(), and UNLIKELY.
| TBCI::BdMatrix< T >::BdMatrix | ( | const unsigned int | d, | |
| const BVector< unsigned int > & | conf | |||
| ) | [inline, explicit] |
c'tor with config Vector
Definition at line 511 of file band_matrix.h.
References TBCI::BdMatrix< T >::clear(), and TBCI::BdMatrix< T >::constructor().
| TBCI::BdMatrix< T >::BdMatrix | ( | const BdMatrix< T > & | mat | ) | [inline] |
copy c'tor
Definition at line 519 of file band_matrix.h.
References TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::dim, TBCI::BdMatrix< T >::do_copy(), TBCI::BdMatrix< T >::outf, TBCI::BdMatrix< T >::outp, TBCI::BdMatrix< T >::outset, TBCI::BdMatrix< T >::outw, and UNLIKELY.
| TBCI::BdMatrix< T >::BdMatrix | ( | const T & | val, | |
| const unsigned int | d | |||
| ) | [inline] |
c'tor variants with initial value on diag (tridiag, with config)
Definition at line 531 of file band_matrix.h.
References TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::diagconf, TBCI::BVector< T >::resize(), TBCI::BdMatrix< T >::setunit(), and UNLIKELY.
| TBCI::BdMatrix< T >::BdMatrix | ( | const T & | val, | |
| const unsigned int | d, | |||
| const BVector< unsigned int > & | conf | |||
| ) | [inline] |
Definition at line 556 of file band_matrix.h.
References TBCI::BdMatrix< T >::constructor(), and TBCI::BdMatrix< T >::setunit().
| TBCI::BdMatrix< T >::BdMatrix | ( | const T & | val, | |
| const unsigned int | d, | |||
| unsigned int | mo | |||
| ) | [inline] |
c'tor with # of offdiags (band Matrix)
Definition at line 541 of file band_matrix.h.
References TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::diagconf, TBCI::BVector< T >::resize(), and TBCI::BdMatrix< T >::setunit().
| TBCI::BdMatrix< T >::BdMatrix | ( | const Matrix< T > & | mat | ) | [inline] |
c'tor to copy Matrix and self-determine sparseness
Definition at line 566 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, BCHKNR, TBCI::BdMatrix< T >::bdiag, TBCI::TMatrix< T >::columns(), TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, TBCI::BVector< T >::resize(), TBCI::TMatrix< T >::rows(), TBCI::BVector< T >::size(), and T.
| TBCI::BdMatrix< T >::~BdMatrix | ( | ) | [inline] |
Definition at line 601 of file band_matrix.h.
References BCHKNR, TBCI::BdMatrix< T >::diagconf, TBCI::BdMatrix< T >::free_diags(), and TBCI::BVector< T >::size().
| TBCI::BdMatrix< T >::BdMatrix | ( | const BdMatrix< U > & | bm | ) | [inline, explicit] |
Definition at line 170 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::dim, TBCI::BdMatrix< T >::outf, TBCI::BdMatrix< T >::outp, TBCI::BdMatrix< T >::outset, and TBCI::BdMatrix< T >::outw.
| void TBCI::BdMatrix< T >::constructor | ( | const unsigned int | d, | |
| const bool | delout = true | |||
| ) | [inline, protected] |
Definition at line 364 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, TBCI::BdMatrix< T >::arsz, BCHKNR, TBCI::BdMatrix< T >::bdiag, BDMATDBG, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, TBCI::BdMatrix< T >::dim, LIKELY, TBCI::BdMatrix< T >::maxoff, NEW, TBCI::BVector< T >::resize(), TBCI::BVector< T >::size(), STD__, and UNLIKELY.
Referenced by TBCI::BdMatrix< T >::BdMatrix(), TBCI::BdMatrix< T >::operator=(), TBCI::BdMatrix< T >::reconfig(), and TBCI::BdMatrix< T >::resize().
| T * TBCI::BdMatrix< T >::check | ( | const unsigned | r, | |
| const unsigned | c | |||
| ) | const [inline, protected] |
Definition at line 623 of file band_matrix.h.
References abs, TBCI::BdMatrix< T >::adiag, BCHK, TBCI::BdMatrix< T >::bdiag, CSTD__, TBCI::BdMatrix< T >::diag, LIKELY, and TBCI::BdMatrix< T >::maxoff.
Referenced by TBCI::BdMatrix< T >::autoinsert(), TBCI::BdMatrix< T >::operator()(), and TBCI::BdMatrix< T >::setval().
| void TBCI::BdMatrix< T >::free_diags | ( | const unsigned | dummy | ) | [inline, protected] |
Implementation alternative: All memory is allocated in one big chunk (default).
Definition at line 344 of file band_matrix.h.
References TBCI::BdMatrix< T >::arsz, BDMATDBG, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::dim, STD__, and TBCIDELETE.
Referenced by TBCI::BdMatrix< T >::operator=(), TBCI::BdMatrix< T >::resize(), and TBCI::BdMatrix< T >::~BdMatrix().
| void TBCI::BdMatrix< T >::do_copy | ( | const BdMatrix< T > & | bdm | ) | [inline, protected] |
Definition at line 352 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, TBCI::BdMatrix< T >::arsz, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, TBCI::BVector< T >::size(), and TBCICOPY.
Referenced by TBCI::BdMatrix< T >::BdMatrix(), and TBCI::BdMatrix< T >::operator=().
| void TBCI::BdMatrix< T >::destroy | ( | ) | [inline] |
| static const char* TBCI::BdMatrix< T >::mat_info | ( | ) | [inline, static] |
| TBCI::BdMatrix< T >::operator TMatrix< T > | ( | ) | const [inline] |
cast
Definition at line 2327 of file band_matrix.h.
References _DIM, TBCI::BdMatrix< T >::adiag, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, TBCI::TMatrix< T >::setval(), and TBCI::BVector< T >::size().
| T & TBCI::BdMatrix< T >::operator() | ( | const unsigned int | r, | |
| const unsigned int | c | |||
| ) | [inline] |
rw member access
Definition at line 650 of file band_matrix.h.
References BCHK, TBCI::BdMatrix< T >::check(), and LIKELY.
| tbci_traits< T >::const_refval_type TBCI::BdMatrix< T >::operator() | ( | const unsigned int | r, | |
| const unsigned int | c | |||
| ) | const [inline] |
ro member access
Definition at line 663 of file band_matrix.h.
References BCHK, TBCI::BdMatrix< T >::check(), and LIKELY.
| BdMatrix<T>& TBCI::BdMatrix< T >::setval | ( | const T & | v, | |
| const unsigned int | r, | |||
| const unsigned int | c | |||
| ) | [inline] |
autoinsert, sparse class compatible
Definition at line 202 of file band_matrix.h.
Referenced by TBCI::lu_decomp(), and TBCI::operator>>().
| T & TBCI::BdMatrix< T >::setval | ( | const unsigned int | r, | |
| const unsigned int | c | |||
| ) | [inline] |
Definition at line 676 of file band_matrix.h.
References abs, TBCI::BdMatrix< T >::adddiag(), TBCI::BdMatrix< T >::autoinsert(), BCHK, TBCI::BdMatrix< T >::check(), CSTD__, and LIKELY.
| tbci_traits<T>::const_refval_type TBCI::BdMatrix< T >::get | ( | const unsigned int | i, | |
| const unsigned int | j | |||
| ) | const [inline] |
Definition at line 207 of file band_matrix.h.
| BdMatrix< T > & TBCI::BdMatrix< T >::transpose | ( | ) | [inline] |
transpose() does change the object!
Definition at line 1346 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diagconf, TBCI::BVector< T >::size(), and TBCI::BVector< T >::swap().
| BdMatrix< T > & TBCI::BdMatrix< T >::resize | ( | const unsigned int | nd | ) | [inline] |
Definition at line 718 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, TBCI::BdMatrix< T >::arsz, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, MIN, TBCI::min(), TBCI::BVector< T >::resize(), TBCI::BVector< T >::size(), TBCICOPY, TBCIDELETE, and TBCIFILL.
Referenced by TBCI::BdMatrix< T >::resize().
| BdMatrix< T > & TBCI::BdMatrix< T >::resize | ( | const T & | val, | |
| const unsigned int | nd | |||
| ) | [inline] |
Definition at line 770 of file band_matrix.h.
References TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::diagconf, TBCI::BdMatrix< T >::free_diags(), TBCI::BVector< T >::resize(), TBCI::BdMatrix< T >::setunit(), and TBCI::BVector< T >::size().
| BdMatrix< T > & TBCI::BdMatrix< T >::resize | ( | const unsigned int | nd, | |
| const BVector< unsigned int > & | cfg | |||
| ) | [inline] |
Definition at line 787 of file band_matrix.h.
References TBCI::BdMatrix< T >::clear(), TBCI::BdMatrix< T >::constructor(), TBCI::BVector< T >::copy(), TBCI::BdMatrix< T >::diagconf, TBCI::BdMatrix< T >::free_diags(), and TBCI::BVector< T >::size().
| BdMatrix< T > & TBCI::BdMatrix< T >::resize | ( | const T & | val, | |
| const unsigned int | nd, | |||
| const BVector< unsigned int > & | cfg | |||
| ) | [inline] |
Definition at line 801 of file band_matrix.h.
References TBCI::BdMatrix< T >::diag, and TBCI::BdMatrix< T >::resize().
| BdMatrix<T>& TBCI::BdMatrix< T >::resize | ( | const BdMatrix< T > & | bdm | ) | [inline] |
Resizing assignment.
Definition at line 222 of file band_matrix.h.
References TBCI::BdMatrix< T >::diagconf, and TBCI::BdMatrix< T >::dim.
| BdMatrix< T > & TBCI::BdMatrix< T >::reconfig | ( | const BVector< unsigned int > & | cfg | ) | [inline] |
Definition at line 815 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, TBCI::BdMatrix< T >::arsz, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::clear(), TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, MIN, TBCI::BVector< T >::resize(), TBCI::BVector< T >::size(), TBCICOPY, and TBCIDELETE.
Referenced by TBCI::BdMatrix< T >::expand().
| BdMatrix< T > & TBCI::BdMatrix< T >::setunit | ( | const T & | val = 1 |
) | [inline] |
Reimplemented from TBCI::Matrix_Sig< T >.
Definition at line 694 of file band_matrix.h.
References TBCI::BdMatrix< T >::arsz, TBCI::BdMatrix< T >::diag, and TBCIFILL.
Referenced by TBCI::BdMatrix< T >::BdMatrix(), TBCI::BdMatrix< T >::operator=(), and TBCI::BdMatrix< T >::resize().
| BdMatrix< T > & TBCI::BdMatrix< T >::fill | ( | const T & | val = 0 |
) | [inline] |
Reimplemented from TBCI::Matrix_Sig< T >.
Definition at line 1024 of file band_matrix.h.
References TBCI::BdMatrix< T >::arsz, TBCI::BdMatrix< T >::diag, and TBCIFILL.
| BdMatrix< T > & TBCI::BdMatrix< T >::clear | ( | ) | [inline] |
Reimplemented from TBCI::Matrix_Sig< T >.
Definition at line 1031 of file band_matrix.h.
References TBCI::BdMatrix< T >::arsz, TBCI::BdMatrix< T >::diag, and TBCIFILL.
Referenced by TBCI::BdMatrix< T >::BdMatrix(), TBCI::BdMatrix< T >::reconfig(), and TBCI::BdMatrix< T >::resize().
| BdMatrix< T > & TBCI::BdMatrix< T >::adddiag | ( | const unsigned | ndg | ) | [inline] |
Definition at line 857 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, TBCI::BVector< T >::append(), TBCI::BdMatrix< T >::arsz, BCHK, BCHKNR, TBCI::BdMatrix< T >::bdiag, BDMATDBG, TBCI::BVector< T >::contains(), TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, LIKELY, TBCI::BdMatrix< T >::maxoff, REALLOC, TBCI::BVector< T >::size(), STD__, TBCIFILL, and UNLIKELY.
Referenced by TBCI::BdMatrix< T >::autoinsert(), TBCI::BdMatrix< T >::expand(), and TBCI::BdMatrix< T >::setval().
| BdMatrix< T > & TBCI::BdMatrix< T >::removediag | ( | const unsigned | dg | ) | [inline] |
Definition at line 942 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, TBCI::BdMatrix< T >::arsz, TBCI::BdMatrix< T >::bdiag, BDMATDBG, TBCI::BVector< T >::contains(), TBCI::BdMatrix< T >::diagconf, TBCI::BdMatrix< T >::maxoff, MIN, TBCI::BVector< T >::remove(), STD__, TBCIDELETE, and TBCIFILL.
| BdMatrix< T > & TBCI::BdMatrix< T >::autoinsert | ( | const T & | val, | |
| const unsigned | r, | |||
| const unsigned | c | |||
| ) | [inline] |
Definition at line 965 of file band_matrix.h.
References abs, TBCI::BdMatrix< T >::adddiag(), BCHK, BD_MINVAL, TBCI::BdMatrix< T >::check(), CSTD__, std::fabs(), LIKELY, and MATH__.
Referenced by TBCI::BdMatrix< T >::set_row(), and TBCI::BdMatrix< T >::setval().
| BdMatrix< T > & TBCI::BdMatrix< T >::expand | ( | unsigned | m = 0 |
) | [inline] |
Definition at line 1066 of file band_matrix.h.
References TBCI::BdMatrix< T >::adddiag(), TBCI::BdMatrix< T >::arsz, BCHK, LIKELY, TBCI::BdMatrix< T >::maxoff, TBCI::BdMatrix< T >::reconfig(), TBCI::BdMatrix< T >::size(), and UNLIKELY.
Referenced by TBCI::lu_decomp().
| BdMatrix< T > & TBCI::BdMatrix< T >::set_row | ( | const Vector< T > & | val, | |
| const unsigned | r, | |||
| const unsigned | s = 0 | |||
| ) | [inline] |
Overwrite row with Vector.
Definition at line 983 of file band_matrix.h.
References TBCI::BdMatrix< T >::autoinsert(), and TBCI::TVector< T >::size().
| TVector< T > TBCI::BdMatrix< T >::get_row | ( | const unsigned int | r | ) | const [inline] |
Construct Vector from row.
Definition at line 991 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, BCHK, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, LIKELY, TBCI::TVector< T >::set(), and TBCI::BVector< T >::size().
| TVector< T > TBCI::BdMatrix< T >::get_col | ( | const unsigned int | c | ) | const [inline] |
Construct Vector from column.
Definition at line 1007 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, BCHK, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, LIKELY, TBCI::TVector< T >::set(), and TBCI::BVector< T >::size().
| unsigned int TBCI::BdMatrix< T >::size | ( | ) | const [inline] |
size: incompatibility to Matrix (!)
Definition at line 241 of file band_matrix.h.
Referenced by TBCI::BdMatrix< T >::div_rows(), TBCI::BdMatrix< T >::expand(), TBCI::BdMatrix< T >::mult_rows(), TBCI::BdMatrix< T >::operator*(), and TBCI::BdMatrix< T >::operator=().
| unsigned int TBCI::BdMatrix< T >::noelem | ( | ) | const [inline] |
| unsigned int TBCI::BdMatrix< T >::rows | ( | ) | const [inline] |
number of rows
Reimplemented from TBCI::Matrix_Sig< T >.
Definition at line 245 of file band_matrix.h.
Referenced by TBCI::CSCMatrix< T >::CSCMatrix(), TBCI::LU_bkw_subst(), TBCI::lu_decomp(), TBCI::LU_det(), TBCI::LU_fwd_subst(), and TBCI::LU_invert().
| unsigned int TBCI::BdMatrix< T >::columns | ( | ) | const [inline] |
number of columns
Reimplemented from TBCI::Matrix_Sig< T >.
Definition at line 247 of file band_matrix.h.
Referenced by TBCI::CSCMatrix< T >::CSCMatrix(), and TBCI::LU_invert().
| const BVector<unsigned int>& TBCI::BdMatrix< T >::getcfg | ( | ) | const [inline] |
| unsigned int TBCI::BdMatrix< T >::getmaxoff | ( | ) | const [inline] |
max distance from main diagonal
Definition at line 252 of file band_matrix.h.
Referenced by TBCI::LU_bkw_subst(), TBCI::lu_decomp(), and TBCI::LU_fwd_subst().
| T TBCI::BdMatrix< T >::trace | ( | ) | const [inline] |
| BdMatrix< T > & TBCI::BdMatrix< T >::operator= | ( | const BdMatrix< T > & | mat | ) | [inline] |
The assignment operators in TBCI are NOT resizing.
Definition at line 1223 of file band_matrix.h.
References BCHK, TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::diagconf, TBCI::BdMatrix< T >::dim, TBCI::BdMatrix< T >::do_copy(), TBCI::BdMatrix< T >::free_diags(), TBCI::BVector< T >::resize(), TBCI::BVector< T >::size(), TBCI::BdMatrix< T >::size(), and STD__.
| BdMatrix< T > & TBCI::BdMatrix< T >::operator= | ( | const T & | val | ) | [inline] |
| BdMatrix< T > & TBCI::BdMatrix< T >::operator+= | ( | const BdMatrix< T > & | mat | ) | [inline] |
Definition at line 1283 of file band_matrix.h.
| BdMatrix< T > & TBCI::BdMatrix< T >::operator-= | ( | const BdMatrix< T > & | mat | ) | [inline] |
Definition at line 1284 of file band_matrix.h.
| BdMatrix< T > & TBCI::BdMatrix< T >::operator*= | ( | const T & | mult | ) | [inline] |
Definition at line 1303 of file band_matrix.h.
| BdMatrix< T > & TBCI::BdMatrix< T >::operator/= | ( | const T & | div | ) | [inline] |
Definition at line 1309 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, ALIGN, BCHK, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, MIN_ALIGN, and TBCI::BVector< T >::size().
| bool TBCI::BdMatrix< T >::operator== | ( | const BdMatrix< T > & | ma | ) | const [inline] |
Definition at line 2179 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, BD_MINVAL, TBCI::BdMatrix< T >::bdiag, TBCI::BVector< T >::contains(), TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, TBCI::BdMatrix< T >::dim, std::fabs(), LIKELY, MATH__, TBCI::BVector< T >::size(), TBCICOMP, and UNLIKELY.
| bool TBCI::BdMatrix< T >::operator!= | ( | const BdMatrix< T > & | ma | ) | const [inline] |
Definition at line 280 of file band_matrix.h.
| BdMatrix< T > TBCI::BdMatrix< T >::operator+ | ( | const BdMatrix< T > & | m2 | ) | const [inline] |
Definition at line 1386 of file band_matrix.h.
| BdMatrix< T > TBCI::BdMatrix< T >::operator- | ( | const BdMatrix< T > & | m2 | ) | const [inline] |
Definition at line 1387 of file band_matrix.h.
| BdMatrix< T > TBCI::BdMatrix< T >::operator* | ( | const BdMatrix< T > & | mat2 | ) | const [inline] |
Definition at line 1391 of file band_matrix.h.
References ALIGN, BCHK, MAX, TBCI::BdMatrix< T >::maxoff, MIN, MIN_ALIGN, TBCI::BdMatrix< T >::size(), and T.
| BdMatrix< T > TBCI::BdMatrix< T >::operator* | ( | const T & | val | ) | const [inline] |
Definition at line 1375 of file band_matrix.h.
| BdMatrix< T > TBCI::BdMatrix< T >::operator/ | ( | const T & | val | ) | const [inline] |
Definition at line 1374 of file band_matrix.h.
| BdMatrix< T > TBCI::BdMatrix< T >::operator- | ( | ) | const [inline] |
Definition at line 1448 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, and TBCI::BVector< T >::size().
| TVector< T > TBCI::BdMatrix< T >::operator* | ( | const Vector< T > & | vec | ) | const [inline] |
Matrix-Vector multiplication.
Definition at line 2091 of file band_matrix.h.
References BCHK, LIKELY, PREFETCH_R, PREFETCH_W, TBCI::TVector< T >::size(), TBCI::slice_offset(), SMP_BDMATSLICE, TBCI::thread_start_off(), TBCI::thread_wait(), TBCI::threads_avail(), and TBCI::BVector< T >::vec.
| TVector< T > TBCI::BdMatrix< T >::transMult | ( | const Vector< T > & | vec | ) | const [inline] |
Transposed Matrix-Vector multiplication.
Definition at line 2116 of file band_matrix.h.
References BCHK, LIKELY, PREFETCH_R, PREFETCH_W, TBCI::TVector< T >::size(), TBCI::slice_offset(), SMP_BDMATSLICE, TBCI::thread_start_off(), TBCI::thread_wait(), TBCI::threads_avail(), and TBCI::BVector< T >::vec.
| TVector< T > TBCI::BdMatrix< T >::dotMult | ( | const Vector< T > & | vec | ) | const [inline] |
| TMatrix<T> TBCI::BdMatrix< T >::operator* | ( | const Matrix< T > & | ) | const |
| BdMatrix< T > & TBCI::BdMatrix< T >::mult_rows | ( | const Vector< T > & | v | ) | [inline] |
Linewise multiplication.
Definition at line 2213 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, BCHK, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, TBCI::BVector< T >::size(), TBCI::BdMatrix< T >::size(), and TBCI::TVector< T >::size().
| BdMatrix< T > & TBCI::BdMatrix< T >::div_rows | ( | const Vector< T > & | v | ) | [inline] |
Definition at line 2231 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, BCHK, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, TBCI::BVector< T >::size(), TBCI::BdMatrix< T >::size(), and TBCI::TVector< T >::size().
| BdMatrix< T > & TBCI::BdMatrix< T >::mult_row | ( | const T & | f, | |
| const unsigned | i | |||
| ) | [inline] |
Definition at line 2249 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, BCHK, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, and TBCI::BVector< T >::size().
| BdMatrix< T > & TBCI::BdMatrix< T >::div_row | ( | const T & | d, | |
| const unsigned | i | |||
| ) | [inline] |
Definition at line 2265 of file band_matrix.h.
References TBCI::BdMatrix< T >::adiag, BCHK, TBCI::BdMatrix< T >::bdiag, TBCI::BdMatrix< T >::diag, TBCI::BdMatrix< T >::diagconf, and TBCI::BVector< T >::size().
| const BdMatrix<T>& TBCI::BdMatrix< T >::setoutopts | ( | int | w = 5, |
|
| int | p = 4, |
|||
| char | f = ' ' | |||
| ) | const [inline] |
Definition at line 319 of file band_matrix.h.
| BdMatrix<T> TBCI::BdMatrix< T >::inverse | ( | ) | const |
| BdMatrix< int > & TBCI::BdMatrix< int >::operator/= | ( | const int & | div | ) | [inline] |
Definition at line 1342 of file band_matrix.h.
| BdMatrix< unsigned int > & TBCI::BdMatrix< unsigned int >::operator/= | ( | const unsigned int & | div | ) | [inline] |
Definition at line 1343 of file band_matrix.h.
friend class ILU0_BdMatrixPreconditioner< T > [friend] |
Definition at line 105 of file band_matrix.h.
friend class DILU_BdMatrixPreconditioner< T > [friend] |
Definition at line 106 of file band_matrix.h.
friend class BdMatrix [friend] |
Definition at line 169 of file band_matrix.h.
| std:: istream& operator>> | ( | std::istream & | istr, | |
| BdMatrix< T > & | mat | |||
| ) | [friend] |
Definition at line 2309 of file band_matrix.h.
| std:: ostream& operator<< | ( | std::ostream & | ostr, | |
| const BdMatrix< T > & | mat | |||
| ) | [friend] |
Definition at line 2282 of file band_matrix.h.
| int lu_decomp | ( | BdMatrix< T > & | mat | ) | [friend] |
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.
| void do_bdmat_vec_dotmult | ( | const unsigned | start, | |
| const unsigned | end, | |||
| TVector< T > * | res, | |||
| const BdMatrix< T > * | mat, | |||
| const Vector< T > * | vec | |||
| ) | [friend] |
Definition at line 1863 of file band_matrix.h.
unsigned int TBCI::BdMatrix< T >::dim [protected] |
Definition at line 109 of file band_matrix.h.
Referenced by TBCI::BdMatrix< T >::BdMatrix(), TBCI::BdMatrix< T >::constructor(), TBCI::do_bdmat_vec_dotmult(), TBCI::do_bdmat_vec_mult(), TBCI::do_bdmat_vec_transmult(), TBCI::BdMatrix< T >::free_diags(), TBCI::BdMatrix< T >::operator=(), TBCI::BdMatrix< T >::operator==(), TBCI::operator>>(), TBCI::BdMatrix< T >::resize(), TBCI::ILU0_BdMatrixPreconditioner< T >::update(), and TBCI::DILU_BdMatrixPreconditioner< T >::update().
unsigned int TBCI::BdMatrix< T >::maxoff [protected] |
size, max offset from diag
Definition at line 109 of file band_matrix.h.
Referenced by TBCI::BdMatrix< T >::adddiag(), TBCI::BdMatrix< T >::check(), TBCI::BdMatrix< T >::constructor(), TBCI::do_bdmat_vec_dotmult(), TBCI::do_bdmat_vec_mult(), TBCI::do_bdmat_vec_transmult(), TBCI::BdMatrix< T >::expand(), TBCI::BdMatrix< T >::operator*(), and TBCI::BdMatrix< T >::removediag().
unsigned long TBCI::BdMatrix< T >::arsz [protected] |
# of saved elems,
Definition at line 110 of file band_matrix.h.
Referenced by TBCI::BdMatrix< T >::adddiag(), TBCI::BdMatrix< T >::clear(), TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::do_copy(), TBCI::BdMatrix< T >::expand(), TBCI::BdMatrix< T >::fill(), TBCI::BdMatrix< T >::free_diags(), TBCI::BdMatrix< T >::reconfig(), TBCI::BdMatrix< T >::removediag(), TBCI::BdMatrix< T >::resize(), and TBCI::BdMatrix< T >::setunit().
BVector<unsigned> TBCI::BdMatrix< T >::diagconf [protected] |
configuration
Definition at line 111 of file band_matrix.h.
Referenced by TBCI::BdMatrix< T >::adddiag(), TBCI::BdMatrix< T >::BdMatrix(), TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::div_row(), TBCI::BdMatrix< T >::div_rows(), TBCI::do_bdmat_vec_dotmult(), TBCI::do_bdmat_vec_mult(), TBCI::do_bdmat_vec_transmult(), TBCI::BdMatrix< T >::do_copy(), TBCI::BdMatrix< T >::get_col(), TBCI::BdMatrix< T >::get_row(), TBCI::BdMatrix< T >::mult_row(), TBCI::BdMatrix< T >::mult_rows(), TBCI::BdMatrix< T >::operator TMatrix< T >(), TBCI::BdMatrix< T >::operator-(), TBCI::BdMatrix< T >::operator/=(), TBCI::BdMatrix< T >::operator=(), TBCI::BdMatrix< T >::operator==(), TBCI::operator>>(), TBCI::BdMatrix< T >::reconfig(), TBCI::BdMatrix< T >::removediag(), TBCI::BdMatrix< T >::resize(), TBCI::BdMatrix< T >::transpose(), TBCI::ILU0_BdMatrixPreconditioner< T >::update(), TBCI::DILU_BdMatrixPreconditioner< T >::update(), and TBCI::BdMatrix< T >::~BdMatrix().
BVector<T*> TBCI::BdMatrix< T >::adiag [protected] |
Definition at line 112 of file band_matrix.h.
Referenced by TBCI::BdMatrix< T >::adddiag(), TBCI::BdMatrix< T >::BdMatrix(), TBCI::BdMatrix< T >::check(), TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::div_row(), TBCI::BdMatrix< T >::div_rows(), TBCI::do_bdmat_vec_dotmult(), TBCI::do_bdmat_vec_mult(), TBCI::do_bdmat_vec_transmult(), TBCI::BdMatrix< T >::do_copy(), TBCI::BdMatrix< T >::get_col(), TBCI::BdMatrix< T >::get_row(), TBCI::BdMatrix< T >::mult_row(), TBCI::BdMatrix< T >::mult_rows(), TBCI::BdMatrix< T >::operator TMatrix< T >(), TBCI::BdMatrix< T >::operator-(), TBCI::BdMatrix< T >::operator/=(), TBCI::BdMatrix< T >::operator==(), TBCI::BdMatrix< T >::reconfig(), TBCI::BdMatrix< T >::removediag(), TBCI::BdMatrix< T >::resize(), TBCI::BdMatrix< T >::transpose(), TBCI::ILU0_BdMatrixPreconditioner< T >::update(), and TBCI::DILU_BdMatrixPreconditioner< T >::update().
BVector<T*> TBCI::BdMatrix< T >::bdiag [protected] |
pointers to upper and lower diagonals
Definition at line 112 of file band_matrix.h.
Referenced by TBCI::BdMatrix< T >::adddiag(), TBCI::BdMatrix< T >::BdMatrix(), TBCI::BdMatrix< T >::check(), TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::div_row(), TBCI::BdMatrix< T >::div_rows(), TBCI::do_bdmat_vec_dotmult(), TBCI::do_bdmat_vec_mult(), TBCI::do_bdmat_vec_transmult(), TBCI::BdMatrix< T >::do_copy(), TBCI::BdMatrix< T >::get_col(), TBCI::BdMatrix< T >::get_row(), TBCI::BdMatrix< T >::mult_row(), TBCI::BdMatrix< T >::mult_rows(), TBCI::BdMatrix< T >::operator TMatrix< T >(), TBCI::BdMatrix< T >::operator-(), TBCI::BdMatrix< T >::operator/=(), TBCI::BdMatrix< T >::operator==(), TBCI::BdMatrix< T >::reconfig(), TBCI::BdMatrix< T >::removediag(), TBCI::BdMatrix< T >::resize(), TBCI::BdMatrix< T >::transpose(), TBCI::ILU0_BdMatrixPreconditioner< T >::update(), and TBCI::DILU_BdMatrixPreconditioner< T >::update().
T* TBCI::BdMatrix< T >::diag [protected] |
Definition at line 113 of file band_matrix.h.
Referenced by TBCI::BdMatrix< T >::adddiag(), TBCI::BdMatrix< T >::BdMatrix(), TBCI::BdMatrix< T >::check(), TBCI::BdMatrix< T >::clear(), TBCI::BdMatrix< T >::constructor(), TBCI::BdMatrix< T >::div_row(), TBCI::BdMatrix< T >::div_rows(), TBCI::do_bdmat_vec_dotmult(), TBCI::do_bdmat_vec_mult(), TBCI::do_bdmat_vec_transmult(), TBCI::BdMatrix< T >::do_copy(), TBCI::BdMatrix< T >::fill(), TBCI::BdMatrix< T >::free_diags(), TBCI::BdMatrix< T >::get_col(), TBCI::BdMatrix< T >::get_row(), TBCI::BdMatrix< T >::mult_row(), TBCI::BdMatrix< T >::mult_rows(), TBCI::BdMatrix< T >::operator TMatrix< T >(), TBCI::BdMatrix< T >::operator-(), TBCI::BdMatrix< T >::operator/=(), TBCI::BdMatrix< T >::operator==(), TBCI::BdMatrix< T >::reconfig(), TBCI::BdMatrix< T >::resize(), TBCI::BdMatrix< T >::setunit(), and TBCI::DILU_BdMatrixPreconditioner< T >::update().
1.5.6