HLIBpro  2.5.1
TSparseMatBuilder Class Reference

Creates H-matrices out of sparse matrices.

#include <TMatBuilder.hh>

Inheritance diagram for TSparseMatBuilder:
TMatBuilder

Public Member Functions

 TSparseMatBuilder (const TSparseMatrix *sparse_mat, const TPermutation *row_perm_i2e, const TPermutation *col_perm_e2i)
 construct TSparseMatBuilder object with given sparse matrix and permutations
 
 TSparseMatBuilder (const TSparseMatrix *sparse_mat, const TPermutation *row_perm_i2e, const TPermutation *col_perm_e2i, const value_type_t value_type)
 
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< TMatrixbuild_leaf (const TBlockCluster *bc, const matform_t matformat, const TTruncAcc &acc) const
 construct matrices for leaves in block cluster tree
 
virtual std::unique_ptr< TMatrixbuild_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
 TMatBuilder (const bool coarsening=CFG::Arith::coarsen_build)
 
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)
 
virtual std::unique_ptr< TMatrixbuild (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< TMatrixbuild (const TBlockCluster *bc, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 
virtual std::unique_ptr< TMatrixbuild (const TBlockClusterTree *cluster, const matform_t matformat, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 same as More...
 
virtual std::unique_ptr< TMatrixbuild (const TBlockCluster *cluster, const matform_t matformat, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 same as More...
 
virtual std::unique_ptr< TBlockMatrixbuild_blocked (const TBlockCluster *bc) const
 build blocked matrix
 
const stat_t & statistics () const
 return statistics information
 

Protected Member Functions

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

Protected Attributes

const TSparseMatrix_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)
 
value_type_t _value_type
 value type of matrices to create (default: defined by sparse matrix)
 

Constructor & Destructor Documentation

◆ TSparseMatBuilder()

TSparseMatBuilder ( const TSparseMatrix sparse_mat,
const TPermutation row_perm_i2e,
const TPermutation col_perm_e2i,
const value_type_t  value_type 
)

construct TSparseMatBuilder object with given sparse matrix and permutations and user-defined value type