Differential equations often result in rank-structured matrices associated with low-rank off-diagonal blocks. These matrices are often represented in a hierarchical format, and their operation often results in fast arithmetic, e.g., matrix-vector product. The hierarchical matrix [2] is a class of dense rank-structured matrices with a hierarchical low-rank off diagonal block structure, which frequently arises from finite element discretization of an elliptic PDE, radial basis function interpolation, and boundary integral equations.
Hierarchical Off-Diagonal Low-Rank (HODLR) matrix, as a typical hierarchical matrix, is formulated by hierarchically partitioning the matrix in terms of a binary cluster tree and all off-diagonal blocks of each level of the tree are represented as low-rank matrices. This repository is concerned with HODLR matrix construction as well as basic matrix computations with HOLDR matrices, which aims to provide a convenient API for HODLR operations. It also provides simulation code for mixed-precision and adaptive precision HODLR matrix computing [1]. Our low precision arithmetic is simulated in terms of [4].
Our software mainly contains three components
Class | Description |
---|---|
@hodlr |
Compute HODLR matrix |
@mphodlr |
Compute HODLR matrix in mixed precision (precisions are defined by the users) |
@amphodlr |
Compute HODLR matrix in adaptive precision (precisions are provided by the users) |
The environment for running mhodlr
is MATLAB2023a, MATLAB2023b, MATLAB2024a, MATLAB2024b.
One can fork this repository, and simply download this repository via
git clone https://github.com/<username>/mhodlr.git
and run the command below:
cd mhodlr/mhodlr
Simple example on usage is referred to EXAMPLE.
Matrix computations | API |
---|---|
Matrix transpose | hodlr(A).transpose() mphodlr(A).transpose() |
Matrix (vector) multiplication | hdot(A/H, H/B) mphdot |
LU factorization | hlu(H/A) |
Cholesky factorization | hchol(H/A) |
Triangular solver (Lower triangular solver LX=B, Upper triangular solver XU=B) | htrsl(H, B) , htrsu(B, H) |
Linear solver (Ax = b) | lu_solve(H, B) |
Any forms of contributions are welcomed. Our documents are still in progress; feel free to pull request and submit issues for suggestions. Before contributing code, we suggest to contact the maintainers. The contact information of maintainers can be found in MaintainerList.
This project is supported by the European Union (ERC, InEXASCALE, 101075632). Views and opinions expressed are those of the authors only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them.
[1] C. Erin, X. Chen and X. Liu, Mixed precision HODLR matrices, arXiv:2407.21637, (2024), https://doi.org/10.48550/arXiv.2407.21637.
[2] S. B¨orm, L. Grasedyck, and W. Hackbusch, Introduction to hierarchical matrices with applications, Eng. Anal. Bound. Elem., 27 (2003), pp. 405–422, https://doi.org/10.1016/S0955-7997(02)00152-2.
[3] N. J. Higham and S. Pranesh, Simulating low precision floating-point arithmetic, SIAM J. Sci. Comput., 41 (2019), pp. C585–C602, https://doi.org/10.1137/19M1251308.