H2Lib
3.0

Coarsening of hierarchical matrices. More...
Functions  
void  coarsen_hmatrix (phmatrix G, ptruncmode tm, real eps, bool recursive) 
Coarsen the block structure of a hmatrix. More...  
Coarsening of hierarchical matrices.
void coarsen_hmatrix  (  phmatrix  G, 
ptruncmode  tm,  
real  eps,  
bool  recursive  
) 
Coarsen the block structure of a hmatrix.
For a hmatrix consisting only of admissible or inadmissible leafs it can be advantageous to store the hmatrix as a single low rank matrix with a slightly higher rank.
If we consider a 2x2 block matrix
with a low rank representation with each having a rank of at most . (Inadmissible blocks can be written as low rank matrices with or .)
We can rewrite this as a rank low rank matrix
Now an approximation of via SVD using trunc_rkmatrix is computed:
.
If the size of is smaller than the size of , then will be replaced by . Otherwise is rejected.
If recursive == true
holds, this process is repeated for father blocks as long as they only consist of leaf blocks aswell.
G  Input hmatrix. Will be changed during the coarsening process. 
tm  Truncation mode. 
eps  Accuracy for low rank truncation. 
recursive  Flag to indicate whether the coarsening algorithm should be applied to the son blocks aswell or not. 