TBCI Numerical high perf. C++ Library 2.8.0
BdMatrix< T > Class Template Reference

The class BdMatrix is an implementation to store and do operations on sparse Matrices with a band structure. More...

#include <band_matrix.h>

Inheritance diagram for BdMatrix< T >:
Collaboration diagram for BdMatrix< T >:

Public Types

typedef T value_type
typedef T element_type
typedef T aligned_value_type TALIGN(MIN_ALIGN2)

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 () THROWEXCEPT
void destroy ()
 destroy object explicitly
template<typename U>
 BdMatrix (const BdMatrix< U > &bm)
 operator TMatrix< T > () const
 cast
Toperator() (const unsigned int, const unsigned int) HOT
 rw member access
tbci_traits< T >::const_refval_type operator() (const unsigned int, const unsigned int) const HOT
 ro member access
tbci_traits< T >::const_refval_type get (const unsigned int, const unsigned int) const HOT
BdMatrix< T > & setval (const T &v, const unsigned int r, const unsigned int c)
 autoinsert, sparse class compatible
Tsetval (const unsigned int r, const unsigned int c)
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 > &) COLD
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< Tget_row (const unsigned int) const
 Construct Vector from row.
TVector< Tget_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< Toperator+ (const BdMatrix< T > &) const
BdMatrix< Toperator- (const BdMatrix< T > &) const
BdMatrix< Toperator* (const BdMatrix< T > &) const
BdMatrix< Toperator* (const T &) const
BdMatrix< Toperator/ (const T &) const
BdMatrix< Toperator- () const
TVector< Toperator* (const Vector< T > &) const HOT
 Matrix-Vector multiplication.
TVector< TtransMult (const Vector< T > &) const HOT
 Transposed Matrix-Vector multiplication.
TVector< TdotMult (const Vector< T > &) const
TMatrix< Toperator* (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< Tinverse () const
BdMatrix< int > & operator/= (const int &div)
BdMatrix< unsigned int > & operator/= (const unsigned int &div)
Public Member Functions inherited from Matrix_Sig< T >
 Matrix_Sig ()
 ~Matrix_Sig ()
tbci_traits< T >::const_refval_type operator() (const unsigned, const unsigned) const
 ro access
Toperator() (const unsigned, const unsigned)
 rw access
Matrix_Sig< T > & fill (const T &)
Matrix_Sig< T > & setunit (const T &=(T) 1)
Matrix_Sig< T > & clear ()
TVector< Toperator* (const Vector_Sig< T > &) const
TVector< TtransMult (const Vector_Sig< T > &) const
unsigned int rows () const
unsigned int columns () const

Static Public Member Functions

static const char * mat_info ()
Static Public Member Functions inherited from Matrix_Sig< T >
static const char * mat_info ()

Protected Member Functions

void constructor (const unsigned int, const bool=true)
Tcheck (const unsigned r, const unsigned c) const HOT
Tcheck_internal (const unsigned r, const unsigned c) const HOT
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
BVector< unsigned > diagconf
 configuration
BVector< T * > adiag
BVector< T * > bdiag
 pointers to upper and lower diagonals
Tdiag

Friends

class ILU0_BdMatrixPreconditioner< T >
class DILU_BdMatrixPreconditioner< T >
template<typename U>
class BdMatrix
STD__ istream & operator>>FGD (STD__ istream &, BdMatrix< T > &)
STD__ ostream & operator<<FGD (STD__ ostream &, const BdMatrix< T > &)
NOINST void gaussj FGDT (const BdMatrix< T > &, const Matrix< T > &)
NOINST int lu_decomp FGDT (BdMatrix< T > &) HOT
void FRIEND_TBCI2__ do_bdmat_vec_mult_lnw FGDT (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *)
void FRIEND_TBCI2__ do_bdmat_vec_mult_lnw_opt FGDT (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *)
void FRIEND_TBCI2__ do_bdmat_vec_mult_diagw_exact FGDT (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *)
void FRIEND_TBCI2__ do_bdmat_vec_mult FGDT (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *)
void FRIEND_TBCI2__ do_bdmat_vec_transmult_lnw FGDT (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *)
void FRIEND_TBCI2__ do_bdmat_vec_transmult_lnw_opt FGDT (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *)
void FRIEND_TBCI2__ do_bdmat_vec_transmult_diagw_exact FGDT (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *)
void FRIEND_TBCI2__ do_bdmat_vec_transmult FGDT (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *)
void FRIEND_TBCI2__ do_bdmat_vec_dotmult FGDT (const unsigned, const unsigned, TVector< T > *, const BdMatrix< T > *, const Vector< T > *)

Detailed Description

template<typename T>
class BdMatrix< T >

The class BdMatrix is an implementation to store and do operations on sparse Matrices with a band structure.

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.

Member Typedef Documentation

◆ element_type

template<typename T>
typedef T BdMatrix< T >::element_type

Definition at line 133 of file band_matrix.h.

◆ TALIGN

template<typename T>
typedef T aligned_value_type BdMatrix< T >::TALIGN(MIN_ALIGN2)

Definition at line 134 of file band_matrix.h.

◆ value_type

template<typename T>
typedef T BdMatrix< T >::value_type

Definition at line 132 of file band_matrix.h.

Constructor & Destructor Documentation

◆ BdMatrix() [1/9]

template<typename T>
BdMatrix< T >::BdMatrix ( const unsigned int d = 0)
inlineexplicit

c'tor tridiagonal

Definition at line 506 of file band_matrix.h.

References adiag, bdiag, clear(), constructor(), diagconf, and UNLIKELY.

◆ BdMatrix() [2/9]

template<typename T>
BdMatrix< T >::BdMatrix ( const unsigned int d,
const unsigned int e )
inlineexplicit

c'tor with rows and columns (which need to be identical)

Definition at line 515 of file band_matrix.h.

References adiag, BCHKNR, bdiag, clear(), constructor(), diagconf, and UNLIKELY.

◆ BdMatrix() [3/9]

template<typename T>
BdMatrix< T >::BdMatrix ( const unsigned int d,
const BVector< unsigned int > & conf )
inlineexplicit

c'tor with config Vector

Definition at line 525 of file band_matrix.h.

References adiag, bdiag, clear(), constructor(), and diagconf.

◆ BdMatrix() [4/9]

template<typename T>
BdMatrix< T >::BdMatrix ( const BdMatrix< T > & mat)
inline

copy c'tor

Definition at line 533 of file band_matrix.h.

References adiag, bdiag, BdMatrix, constructor(), diagconf, dim, do_copy(), and UNLIKELY.

◆ BdMatrix() [5/9]

template<typename T>
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 545 of file band_matrix.h.

References adiag, bdiag, constructor(), diagconf, setunit(), T, and UNLIKELY.

◆ BdMatrix() [6/9]

template<typename T>
BdMatrix< T >::BdMatrix ( const T & val,
const unsigned int d,
const BVector< unsigned int > & conf )
inline

Definition at line 570 of file band_matrix.h.

References adiag, bdiag, constructor(), diagconf, setunit(), and T.

◆ BdMatrix() [7/9]

template<typename T>
BdMatrix< T >::BdMatrix ( const T & val,
const unsigned int d,
unsigned int mo )
inline

c'tor with # of offdiags (band Matrix)

Definition at line 555 of file band_matrix.h.

References adiag, bdiag, constructor(), diagconf, REGISTER, setunit(), and T.

◆ BdMatrix() [8/9]

template<typename T>
BdMatrix< T >::BdMatrix ( const Matrix< T > & mat)

c'tor to copy Matrix and self-determine sparseness

Definition at line 580 of file band_matrix.h.

References adiag, BCHKNR, bdiag, columns(), TMatrix< T >::columns(), constructor(), diag, diagconf, dim, i, REGISTER, rows(), TMatrix< T >::rows(), and T.

◆ ~BdMatrix()

template<typename T>
BdMatrix< T >::~BdMatrix ( )
inline

Definition at line 615 of file band_matrix.h.

References BCHKNR, diagconf, free_diags(), T, and THROWEXCEPT.

◆ BdMatrix() [9/9]

template<typename T>
template<typename U>
BdMatrix< T >::BdMatrix ( const BdMatrix< U > & bm)
inlineexplicit

Definition at line 171 of file band_matrix.h.

References adiag, bdiag, BdMatrix, constructor(), diag, diagconf, dim, BVector< T >::get(), and i.

Member Function Documentation

◆ adddiag()

template<typename T>
BdMatrix< T > & BdMatrix< T >::adddiag ( const unsigned ndg)

Definition at line 888 of file band_matrix.h.

References adddiag(), adiag, arsz, BCHK, BCHKNR, bdiag, BDMATDBG, BdMatrix, diag, diagconf, dim, i, LIKELY, maxoff, REALLOC, STD__, T, TBCIFILL, and UNLIKELY.

Referenced by adddiag(), autoinsert(), expand(), and setval().

◆ autoinsert()

template<typename T>
BdMatrix< T > & BdMatrix< T >::autoinsert ( const T & val,
const unsigned r,
const unsigned c )

Definition at line 996 of file band_matrix.h.

References abs, adddiag(), autoinsert(), BCHK, BD_MINVAL, BdMatrix, c, check(), CSTD__, fabs(), LIKELY, MATH__, REGISTER, and T.

Referenced by autoinsert(), set_row(), setval(), and setval().

◆ check()

template<typename T>
T * BdMatrix< T >::check ( const unsigned r,
const unsigned c ) const
inlineprotected

Definition at line 659 of file band_matrix.h.

References check_internal(), dim, EXPCHK, i, index, and T.

Referenced by autoinsert(), operator()(), operator()(), and setval().

◆ check_internal()

template<typename T>
T * BdMatrix< T >::check_internal ( const unsigned r,
const unsigned c ) const
inlineprotected

Definition at line 636 of file band_matrix.h.

References abs, adiag, bdiag, CSTD__, diag, i, LIKELY, maxoff, and T.

Referenced by check(), and get().

◆ clear()

template<typename T>
BdMatrix< T > & BdMatrix< T >::clear ( )
inline

Definition at line 1062 of file band_matrix.h.

References arsz, BdMatrix, diag, T, and TBCIFILL.

Referenced by BdMatrix(), BdMatrix(), BdMatrix(), reconfig(), and resize().

◆ columns()

template<typename T>
unsigned int BdMatrix< T >::columns ( ) const
inline

number of columns

Definition at line 249 of file band_matrix.h.

References dim.

Referenced by BdMatrix(), CSCMatrix< T >::CSCMatrix(), and LU_invert().

◆ constructor()

template<typename T>
void BdMatrix< T >::constructor ( const unsigned int d,
const bool delout = true )
protected

◆ destroy()

template<typename T>
void BdMatrix< T >::destroy ( )
inline

destroy object explicitly

Definition at line 156 of file band_matrix.h.

References adiag, arsz, bdiag, destroy(), diagconf, dim, and free_diags().

Referenced by destroy(), TVector< T >::operator+(), TVector< T >::operator-(), TVector< T >::operator=(), and TVector< T >::operator=().

◆ div_row()

template<typename T>
BdMatrix< T > & BdMatrix< T >::div_row ( const T & d,
const unsigned i )

Definition at line 2695 of file band_matrix.h.

References adiag, BCHK, bdiag, BdMatrix, diag, diagconf, dim, div_row(), i, index, and T.

Referenced by div_row().

◆ div_rows()

template<typename T>
BdMatrix< T > & BdMatrix< T >::div_rows ( const Vector< T > & v)

Definition at line 2661 of file band_matrix.h.

References adiag, BCHK, bdiag, BdMatrix, diag, diagconf, dim, TVector< T >::get(), i, size(), and TVector< T >::size().

◆ do_copy()

template<typename T>
void BdMatrix< T >::do_copy ( const BdMatrix< T > & bdm)
inlineprotected

Definition at line 366 of file band_matrix.h.

References adiag, arsz, bdiag, BdMatrix, diag, diagconf, BVector< T >::get(), i, T, and TBCICOPY.

Referenced by BdMatrix(), and operator=().

◆ dotMult()

template<typename T>
TVector< T > BdMatrix< T >::dotMult ( const Vector< T > & vec) const

Definition at line 2592 of file band_matrix.h.

References BCHK, BdMatrix, dim, do_bdmat_vec_dotmult(), and TVector< T >::size().

◆ expand()

template<typename T>
BdMatrix< T > & BdMatrix< T >::expand ( unsigned m = 0)

Definition at line 1097 of file band_matrix.h.

References adddiag(), arsz, BCHK, BdMatrix, dim, i, LIKELY, maxoff, reconfig(), BVector< T >::set(), size(), and UNLIKELY.

Referenced by lu_decomp().

◆ fill()

template<typename T>
BdMatrix< T > & BdMatrix< T >::fill ( const T & val = 0)
inline

Definition at line 1055 of file band_matrix.h.

References arsz, BdMatrix, diag, T, and TBCIFILL.

◆ free_diags()

template<typename T>
void BdMatrix< T >::free_diags ( const unsigned dummy)
inlineprotected

Implementation alternative: All memory is allocated in one big chunk (default).

Definition at line 358 of file band_matrix.h.

References arsz, BDMATDBG, diag, dim, STD__, T, and TBCIDELETE.

Referenced by destroy(), operator=(), resize(), resize(), and ~BdMatrix().

◆ get()

template<typename T>
tbci_traits< T >::const_refval_type BdMatrix< T >::get ( const unsigned int r,
const unsigned int c ) const
inline

◆ get_col()

template<typename T>
TVector< T > BdMatrix< T >::get_col ( const unsigned int c) const

Construct Vector from column.

Definition at line 1038 of file band_matrix.h.

References adiag, BCHK, bdiag, c, diag, diagconf, dim, get_col(), i, LIKELY, REGISTER, and TVector< T >::set().

Referenced by get_col().

◆ get_row()

template<typename T>
TVector< T > BdMatrix< T >::get_row ( const unsigned int r) const

Construct Vector from row.

Definition at line 1022 of file band_matrix.h.

References adiag, BCHK, bdiag, diag, diagconf, dim, get_row(), i, LIKELY, REGISTER, and TVector< T >::set().

Referenced by get_row().

◆ getcfg()

template<typename T>
const BVector< unsigned int > & BdMatrix< T >::getcfg ( ) const
inline

ro access to config BVector

Definition at line 252 of file band_matrix.h.

References diagconf.

◆ getmaxoff()

template<typename T>
unsigned int BdMatrix< T >::getmaxoff ( ) const
inline

max distance from main diagonal

Definition at line 254 of file band_matrix.h.

References maxoff.

Referenced by LU_bkw_subst(), lu_decomp(), and LU_fwd_subst().

◆ inverse()

template<typename T>
BdMatrix< T > BdMatrix< T >::inverse ( ) const

References BdMatrix.

◆ mat_info()

template<typename T>
const char * BdMatrix< T >::mat_info ( )
inlinestatic

Definition at line 164 of file band_matrix.h.

◆ mult_row()

template<typename T>
BdMatrix< T > & BdMatrix< T >::mult_row ( const T & f,
const unsigned i )

Definition at line 2679 of file band_matrix.h.

References adiag, BCHK, bdiag, BdMatrix, diag, diagconf, dim, i, index, mult_row(), and T.

Referenced by mult_row().

◆ mult_rows()

template<typename T>
BdMatrix< T > & BdMatrix< T >::mult_rows ( const Vector< T > & v)

Linewise multiplication.

Definition at line 2643 of file band_matrix.h.

References adiag, BCHK, bdiag, BdMatrix, diag, diagconf, dim, TVector< T >::get(), i, size(), and TVector< T >::size().

◆ noelem()

template<typename T>
unsigned int BdMatrix< T >::noelem ( ) const
inline

Number of elements that are actually stored.

Definition at line 245 of file band_matrix.h.

References arsz.

◆ operator TMatrix< T >()

template<typename T>
BdMatrix< T >::operator TMatrix< T > ( ) const

cast

Definition at line 2757 of file band_matrix.h.

References _DIM, adiag, bdiag, BdMatrix, diag, diagconf, dim, i, TMatrix< T >::setval(), and T.

◆ operator!=()

template<typename T>
bool BdMatrix< T >::operator!= ( const BdMatrix< T > & ma) const
inline

Definition at line 282 of file band_matrix.h.

References BdMatrix.

◆ operator()() [1/2]

template<typename T>
tbci_traits< T >::const_refval_type BdMatrix< T >::operator() ( const unsigned int r,
const unsigned int c ) const
inline

ro member access

Definition at line 681 of file band_matrix.h.

References c, check(), LIKELY, REGISTER, and T.

◆ operator()() [2/2]

template<typename T>
T & BdMatrix< T >::operator() ( const unsigned int r,
const unsigned int c )
inline

rw member access

Definition at line 668 of file band_matrix.h.

References c, check(), LIKELY, REGISTER, and T.

◆ operator*() [1/4]

template<typename T>
BdMatrix< T > BdMatrix< T >::operator* ( const BdMatrix< T > & mat2) const

Definition at line 1422 of file band_matrix.h.

References ALIGN, BCHK, BdMatrix, dim, get(), i, MAX, maxoff, MIN, MIN_ALIGN, REGISTER, size(), and T.

◆ operator*() [2/4]

template<typename T>
TMatrix< T > BdMatrix< T >::operator* ( const Matrix< T > & ) const

References BdMatrix, and T.

◆ operator*() [3/4]

template<typename T>
BdMatrix< T > BdMatrix< T >::operator* ( const T & val) const
inline

Definition at line 1406 of file band_matrix.h.

References STDDEF_ST.

◆ operator*() [4/4]

template<typename T>
TVector< T > BdMatrix< T >::operator* ( const Vector< T > & vec) const

◆ operator*=()

template<typename T>
BdMatrix< T > & BdMatrix< T >::operator*= ( const T & mult)

Definition at line 1334 of file band_matrix.h.

References T.

Referenced by TVector< T >::operator/=().

◆ operator+()

template<typename T>
BdMatrix< T > BdMatrix< T >::operator+ ( const BdMatrix< T > & m2) const

Definition at line 1417 of file band_matrix.h.

◆ operator+=()

template<typename T>
BdMatrix< T > & BdMatrix< T >::operator+= ( const BdMatrix< T > & mat)

Definition at line 1314 of file band_matrix.h.

Referenced by TVector< T >::operator+(), and TVector< T >::operator+().

◆ operator-() [1/2]

template<typename T>
BdMatrix< T > BdMatrix< T >::operator- ( ) const

Definition at line 1489 of file band_matrix.h.

References adiag, bdiag, BdMatrix, diag, diagconf, dim, i, REGISTER, and BVector< T >::set().

◆ operator-() [2/2]

template<typename T>
BdMatrix< T > BdMatrix< T >::operator- ( const BdMatrix< T > & m2) const

Definition at line 1418 of file band_matrix.h.

References STDDEF_SS, and T.

◆ operator-=()

template<typename T>
BdMatrix< T > & BdMatrix< T >::operator-= ( const BdMatrix< T > & mat)

Definition at line 1315 of file band_matrix.h.

References SFORALL_S.

Referenced by TVector< T >::operator-(), and TVector< T >::operator-().

◆ operator/()

template<typename T>
BdMatrix< T > BdMatrix< T >::operator/ ( const T & val) const
inline

Definition at line 1405 of file band_matrix.h.

◆ operator/=() [1/3]

BdMatrix< int > & BdMatrix< int >::operator/= ( const int & div)
inline

Definition at line 1373 of file band_matrix.h.

◆ operator/=() [2/3]

template<typename T>
BdMatrix< T > & BdMatrix< T >::operator/= ( const T & div)
inline

Definition at line 1340 of file band_matrix.h.

References adiag, ALIGN, BCHK, bdiag, BdMatrix, diag, diagconf, dim, i, MIN_ALIGN, REGISTER, and T.

◆ operator/=() [3/3]

BdMatrix< unsigned int > & BdMatrix< unsignedint >::operator/= ( const unsigned int & div)
inline

Definition at line 1374 of file band_matrix.h.

References INTDIVEQ, and T.

◆ operator=() [1/2]

template<typename T>
BdMatrix< T > & BdMatrix< T >::operator= ( const BdMatrix< T > & mat)

The assignment operators in TBCI are NOT resizing.

Definition at line 1254 of file band_matrix.h.

References BCHK, BdMatrix, constructor(), diagconf, dim, do_copy(), free_diags(), size(), BVector< T >::size(), and STD__.

◆ operator=() [2/2]

template<typename T>
BdMatrix< T > & BdMatrix< T >::operator= ( const T & val)
inline

Definition at line 1276 of file band_matrix.h.

References BdMatrix, setunit(), and T.

◆ operator==()

template<typename T>
bool BdMatrix< T >::operator== ( const BdMatrix< T > & ma) const

◆ reconfig()

template<typename T>
BdMatrix< T > & BdMatrix< T >::reconfig ( const BVector< unsigned int > & cfg)

◆ removediag()

template<typename T>
BdMatrix< T > & BdMatrix< T >::removediag ( const unsigned dg)

Definition at line 973 of file band_matrix.h.

References adiag, arsz, bdiag, BDMATDBG, BdMatrix, diagconf, dim, maxoff, MIN, STD__, T, TBCIDELETE, and TBCIFILL.

◆ resize() [1/5]

template<typename T>
BdMatrix< T > & BdMatrix< T >::resize ( const BdMatrix< T > & bdm)
inline

Resizing assignment.

Definition at line 224 of file band_matrix.h.

References BdMatrix, diagconf, dim, and resize().

◆ resize() [2/5]

template<typename T>
BdMatrix< T > & BdMatrix< T >::resize ( const T & val,
const unsigned int nd )

Definition at line 801 of file band_matrix.h.

References BdMatrix, constructor(), diagconf, dim, free_diags(), setunit(), and T.

◆ resize() [3/5]

template<typename T>
BdMatrix< T > & BdMatrix< T >::resize ( const T & val,
const unsigned int nd,
const BVector< unsigned int > & cfg )

Definition at line 832 of file band_matrix.h.

References BdMatrix, diag, dim, i, resize(), and T.

◆ resize() [4/5]

template<typename T>
BdMatrix< T > & BdMatrix< T >::resize ( const unsigned int nd)

◆ resize() [5/5]

template<typename T>
BdMatrix< T > & BdMatrix< T >::resize ( const unsigned int nd,
const BVector< unsigned int > & cfg )

Definition at line 818 of file band_matrix.h.

References BdMatrix, clear(), constructor(), diagconf, dim, and free_diags().

◆ rows()

template<typename T>
unsigned int BdMatrix< T >::rows ( ) const
inline

number of rows

Definition at line 247 of file band_matrix.h.

References dim.

Referenced by BdMatrix(), CSCMatrix< T >::CSCMatrix(), LU_bkw_subst(), lu_decomp(), LU_det(), LU_fwd_subst(), and LU_invert().

◆ set_row()

template<typename T>
BdMatrix< T > & BdMatrix< T >::set_row ( const Vector< T > & val,
const unsigned r,
const unsigned s = 0 )

Overwrite row with Vector.

Definition at line 1014 of file band_matrix.h.

References autoinsert(), BdMatrix, i, and TVector< T >::size().

◆ setoutopts()

template<typename T>
const BdMatrix< T > & BdMatrix< T >::setoutopts ( int w = 5,
int p = 4,
char f = ' ' ) const
inline

Definition at line 321 of file band_matrix.h.

References BdMatrix, and p.

◆ setunit()

template<typename T>
BdMatrix< T > & BdMatrix< T >::setunit ( const T & val = 1)
inline

Definition at line 725 of file band_matrix.h.

References arsz, BdMatrix, diag, dim, T, and TBCIFILL.

Referenced by BdMatrix(), BdMatrix(), BdMatrix(), operator=(), and resize().

◆ setval() [1/2]

template<typename T>
BdMatrix< T > & BdMatrix< T >::setval ( const T & v,
const unsigned int r,
const unsigned int c )
inline

autoinsert, sparse class compatible

Definition at line 205 of file band_matrix.h.

References autoinsert(), BdMatrix, c, and T.

Referenced by lu_decomp(), and operator>>().

◆ setval() [2/2]

template<typename T>
T & BdMatrix< T >::setval ( const unsigned int r,
const unsigned int c )

Definition at line 707 of file band_matrix.h.

References abs, adddiag(), autoinsert(), BCHK, c, check(), CSTD__, LIKELY, REGISTER, and T.

◆ size()

template<typename T>
unsigned int BdMatrix< T >::size ( ) const
inline

size: incompatibility to Matrix (!)

Definition at line 243 of file band_matrix.h.

References dim.

Referenced by div_rows(), expand(), mult_rows(), operator*(), and operator=().

◆ trace()

template<typename T>
T BdMatrix< T >::trace ( ) const
inline

Definition at line 256 of file band_matrix.h.

References ALIGN, diag, dim, i, MIN_ALIGN, REGISTER, and T.

◆ transMult()

template<typename T>
TVector< T > BdMatrix< T >::transMult ( const Vector< T > & vec) const

◆ transpose()

template<typename T>
BdMatrix< T > & BdMatrix< T >::transpose ( )
inline

transpose() does change the object!

Definition at line 1377 of file band_matrix.h.

References adiag, bdiag, BdMatrix, diagconf, REGISTER, T, and transpose().

Referenced by transpose().

◆ BdMatrix

◆ DILU_BdMatrixPreconditioner< T >

template<typename T>
friend class DILU_BdMatrixPreconditioner< T >
friend

Definition at line 55 of file band_matrix.h.

◆ FGDT [1/11]

template<typename T>
NOINST int lu_decomp FGDT ( BdMatrix< T > & )
friend

References BdMatrix, HOT, lu_decomp(), and NOINST.

◆ FGDT [2/11]

template<typename T>
NOINST void gaussj FGDT ( const BdMatrix< T > & ,
const Matrix< T > &  )
friend

References BdMatrix, gaussj(), and NOINST.

◆ FGDT [3/11]

template<typename T>
void FRIEND_TBCI2__ do_bdmat_vec_dotmult FGDT ( const unsigned ,
const unsigned ,
TVector< T > * ,
const BdMatrix< T > * ,
const Vector< T > *  )
friend

◆ FGDT [4/11]

template<typename T>
void FRIEND_TBCI2__ do_bdmat_vec_transmult FGDT ( const unsigned ,
const unsigned ,
TVector< T > * ,
const BdMatrix< T > * ,
const Vector< T > *  )
friend

◆ FGDT [5/11]

template<typename T>
void FRIEND_TBCI2__ do_bdmat_vec_transmult_diagw_exact FGDT ( const unsigned ,
const unsigned ,
TVector< T > * ,
const BdMatrix< T > * ,
const Vector< T > *  )
friend

◆ FGDT [6/11]

template<typename T>
void FRIEND_TBCI2__ do_bdmat_vec_transmult_lnw_opt FGDT ( const unsigned ,
const unsigned ,
TVector< T > * ,
const BdMatrix< T > * ,
const Vector< T > *  )
friend

◆ FGDT [7/11]

template<typename T>
void FRIEND_TBCI2__ do_bdmat_vec_transmult_lnw FGDT ( const unsigned ,
const unsigned ,
TVector< T > * ,
const BdMatrix< T > * ,
const Vector< T > *  )
friend

◆ FGDT [8/11]

template<typename T>
void FRIEND_TBCI2__ do_bdmat_vec_mult FGDT ( const unsigned ,
const unsigned ,
TVector< T > * ,
const BdMatrix< T > * ,
const Vector< T > *  )
friend

◆ FGDT [9/11]

template<typename T>
void FRIEND_TBCI2__ do_bdmat_vec_mult_diagw_exact FGDT ( const unsigned ,
const unsigned ,
TVector< T > * ,
const BdMatrix< T > * ,
const Vector< T > *  )
friend

◆ FGDT [10/11]

template<typename T>
void FRIEND_TBCI2__ do_bdmat_vec_mult_lnw_opt FGDT ( const unsigned ,
const unsigned ,
TVector< T > * ,
const BdMatrix< T > * ,
const Vector< T > *  )
friend

◆ FGDT [11/11]

template<typename T>
void FRIEND_TBCI2__ do_bdmat_vec_mult_lnw FGDT ( const unsigned ,
const unsigned ,
TVector< T > * ,
const BdMatrix< T > * ,
const Vector< T > *  )
friend

◆ ILU0_BdMatrixPreconditioner< T >

template<typename T>
friend class ILU0_BdMatrixPreconditioner< T >
friend

Definition at line 55 of file band_matrix.h.

◆ operator<<FGD

template<typename T>
STD__ ostream & operator<<FGD ( STD__ ostream & ,
const BdMatrix< T > &  )
friend

References BdMatrix, and STD__.

◆ operator>>FGD

template<typename T>
STD__ istream & operator>>FGD ( STD__ istream & ,
BdMatrix< T > &  )
friend

References BdMatrix, and STD__.

Member Data Documentation

◆ adiag

◆ arsz

template<typename T>
unsigned long BdMatrix< T >::arsz
protected

of saved elems,

Definition at line 110 of file band_matrix.h.

Referenced by adddiag(), clear(), constructor(), destroy(), do_copy(), expand(), fill(), free_diags(), noelem(), reconfig(), removediag(), resize(), and setunit().

◆ bdiag

◆ diag

◆ diagconf

◆ dim

◆ maxoff

template<typename T>
unsigned int BdMatrix< T >::maxoff
protected

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