HLIBpro  1.2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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 arecompress_lr=true, const size_t amax_block_size=50, const size_t amax_dense_size=500)
 constructs coarsening object
virtual ~TCoarsen ()
 destructor
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
virtual TMatrixrec_coarsen (const uint nprocs, TMatrix *A, const TTruncAcc &acc, TProgressBar *progress=NULL) const
virtual TMatrixcoarsen (TMatrix *A, const TTruncAcc &acc) const

Protected Member Functions

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

Protected Attributes

bool _recompress_lr
 recompress low-rank blocks if true
size_t _max_block_size
 maximal size of block-matrices, still worth to try coarsening
size_t _max_dense_size
 maximal size of dense matrices, still worth to try coarsening
bool _only_offdiag_lr
 do not convert diagonal blocks to low-rank if true

Member Function Documentation

virtual TMatrix* coarsen ( TMatrix A,
const TTruncAcc acc 
) const
virtual

coarsen matrix A without recursion, e.g. coarsening of subblocks.

Parameters
Amatrix to coarsen
accaccuracy to mantain during coarsening
virtual TMatrix* rec_coarsen ( const uint  nprocs,
TMatrix A,
const TTruncAcc acc,
TProgressBar progress = NULL 
) const
virtual

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

Parameters
nprocsnumber of threads to use
Amatrix to coarsen
accaccuracy to mantain during coarsening
progressprogress bar