HLIBpro 3.1
Loading...
Searching...
No Matches
TDenseMatBuilder< T_value > Class Template Reference

Creates matrices by computing low rank approximations of dense sub matrices, e.g. via ACA or SVD.

#include <TMatBuilder.hh>

Inheritance diagram for TDenseMatBuilder< T_value >:
TMatBuilder< value_t >

Classes

struct  stat_t
 statistical data of computations More...
 

Public Member Functions

 TDenseMatBuilder (const TCoeffFn< value_t > *coeff_fn, const TLowRankApx< value_t > *lr_apx, const bool recompress=CFG::Build::recompress, const bool cvt_to_dense=CFG::Build::to_dense, stat_t *stat=nullptr)
 
void set_recompression (const bool b)
 (de-) activate recompression of low-rank blocks
 
void set_stat (stat_t *stat)
 assign statistics object
 
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 the 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
 
virtual std::unique_ptr< TMatrix< value_t > > build (const TBlockCluster *cluster, const matform_t matformat, const TTruncAcc &acc, TProgressBar *progress=nullptr) const
 same as
 
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

std::unique_ptr< TMatrix< value_t > > build_dense (const TBlockCluster *bc, const matform_t matformat, const TTruncAcc &acc) const
 
std::unique_ptr< TMatrix< value_t > > build_rank (const TBlockCluster *bc, const TTruncAcc &acc) const
 
- Protected Member Functions inherited from TMatBuilder< value_t >
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 TCoeffFn< value_t > * _coeff_fn
 function for computing matrix entries
 
const TLowRankApx< value_t > * _lr_apx
 low-rank approximation algorithm
 
bool _recompress
 if true, use recompression for low-rank blocks
 
const bool _convert_to_dense
 if true, convert low-rank to dense if rank too high
 
stat_t_stat
 statistics object
 

Constructor & Destructor Documentation

◆ TDenseMatBuilder()

template<typename T_value >
TDenseMatBuilder ( const TCoeffFn< value_t > *  coeff_fn,
const TLowRankApx< value_t > *  lr_apx,
const bool  recompress = CFG::Build::recompress,
const bool  cvt_to_dense = CFG::Build::to_dense,
stat_t stat = nullptr 
)

ctor for construction of H-matrix out of given coefficient function and low-rank approximation method.

Member Function Documentation

◆ build_dense()

template<typename T_value >
std::unique_ptr< TMatrix< value_t > > build_dense ( const TBlockCluster bc,
const matform_t  matformat,
const TTruncAcc acc 
) const
protected

build dense matrix for given block cluster by directly evaluating the matrix coefficient via the coefficient function

◆ build_rank()

template<typename T_value >
std::unique_ptr< TMatrix< value_t > > build_rank ( const TBlockCluster bc,
const TTruncAcc acc 
) const
protected

build low-rank matrix for given block cluster by using internal low-rank approximation object