HLIBpro  3.0
TCoarsen Class Reference

Implements coarsening, e.g. agglomeration of blocked matrices into dense or low-rank matrices if the later use less memory.

#include <TCoarsen.hh>

Public Member Functions

 TCoarsen (const bool aallow_dense=true, const bool arecompress_lr=false, const size_t amax_block_size=50, const size_t amax_dense_size=500)
 constructs coarsening object
 
virtual ~TCoarsen ()
 destructor
 
TCoarsenallow_dense (const bool b)
 set dense conversion mode, e.g. low-rank to dense or block to dense
 
TCoarsenrecompress_lr (const bool b)
 set recompression of low-rank blocks
 
TCoarsenonly_offdiag_lr (const bool b)
 turn on/off low-rank compression of diagonal blocks
 
TCoarsenmax_block_size (const size_t n)
 set maximal size of block-matrices, still worth to try coarsening
 
TCoarsenmax_dense_size (const size_t n)
 set maximal size of dense matrices, still worth to try coarsening
 
template<typename value_t >
TMatrix< value_t > * rec_coarsen (TMatrix< value_t > *A, const TTruncAcc &acc) const
 
template<typename value_t >
TMatrix< value_t > * coarsen (TMatrix< value_t > *A, const TTruncAcc &acc) const
 

Protected Member Functions

template<typename value_t >
size_t byte_size (const TMatrix< value_t > *A) const
 return "corrected" bytesizes, e.g. in symmetric case, of matrices for internal use
 

Member Function Documentation

◆ coarsen()

TMatrix< value_t >* coarsen ( TMatrix< value_t > *  A,
const TTruncAcc acc 
) const

coarsen matrix A without recursion, i.e. no coarsening of subblocks.

Parameters
Amatrix to coarsen
accaccuracy to maintain during coarsening

◆ rec_coarsen()

TMatrix< value_t >* rec_coarsen ( TMatrix< value_t > *  A,
const TTruncAcc acc 
) const

coarsen matrix A with recursion, i.e. first try to coarsen subblocks.

Parameters
Amatrix to coarsen
accaccuracy to maintain during coarsening