HLIBpro  3.0
TSparseMatBuilder< value_t, sparse_value_t > Class Template Reference

Creates H-matrices out of sparse matrices.

#include <TMatBuilder.hh>

Inheritance diagram for TSparseMatBuilder< value_t, sparse_value_t >:
TMatBuilder< value_t >

Public Member Functions

 TSparseMatBuilder (const TSparseMatrix< sparse_value_t > *sparse_mat)
 construct TSparseMatBuilder object with given sparse matrix and permutations
 
 TSparseMatBuilder (const TSparseMatrix< sparse_value_t > *sparse_mat, const TPermutation *row_perm_i2e, const TPermutation *col_perm_e2i)
 construct TSparseMatBuilder object with given sparse matrix and permutations
 
void set_sparse_mode (const bool b)
 (de-) activate construction of sparse leaves
 
void set_use_zero_mat (const bool b)
 (de-) activate construction of sparse leaves
 
virtual std::unique_ptr< TMatrix< value_t > > build_leaf (const TBlockCluster *bc, const matform_t matformat, const TTruncAcc &acc) const
 construct matrices for leaves in block cluster tree
 
virtual std::unique_ptr< TMatrix< value_t > > build_ghost (const TBlockCluster *bc) const
 build placeholder matrix for remote blocks
 
virtual matform_t matrix_format () const
 return matrix format
 
- Public Member Functions inherited from TMatBuilder< value_t >
 TMatBuilder (const bool coarsening=CFG::Build::coarsen)
 
void set_coarsening (const bool b)
 (de-) activate coarsening with standard accuracy (default: off)
 
void set_coarsening (const TTruncAcc &acc)
 activate coarsening with accuracy acc
 
void set_build_ghosts (const bool b)
 
void set_bc_builder (const TBCBuilder *bc_builder)
 set block cluster tree builder object (default: nullptr)
 
virtual std::unique_ptr< TMatrix< value_t > > build (const TBlockClusterTree *bct, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 build the H-matrix with block-wise accuracy defined by acc
 
virtual std::unique_ptr< TMatrix< value_t > > build (const TBlockCluster *bc, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 
virtual std::unique_ptr< TMatrix< value_t > > build (const TBlockClusterTree *cluster, const matform_t matformat, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 same as More...
 
virtual std::unique_ptr< TMatrix< value_t > > build (const TBlockCluster *cluster, const matform_t matformat, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 same as More...
 
virtual std::unique_ptr< TBlockMatrix< value_t > > build_blocked (const TBlockCluster *bc) const
 build blocked matrix
 
const stat_t & statistics () const
 return statistics information
 

Protected Member Functions

virtual std::unique_ptr< TMatrix< value_t > > thr_build (const TBlockCluster *bc, const matform_t matformat, const TTruncAcc &acc, TProgressBar *progress) const
 threaded building process
 

Protected Attributes

const TSparseMatrix< sparse_value_t > * _sparse_mat
 sparse matrix holding coefficients
 
const TPermutation_row_perm_i2e
 mapping of of internal numbering (in row cluster tree) to external numbering (in sparse matrix)
 
const TPermutation_col_perm_e2i
 mapping of of external numbering (in sparse matrix) to internal numbering (in column cluster tree)
 
bool _build_sparse
 if true, build sparse matrices in leaves (default: false)
 
bool _use_zero_mat
 if true, use TZeroMatrix for off-diagonal domain-domain blocks (default: true)