Coder Social home page Coder Social logo

the-null / mhodlr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenxinye/mhodlr

0.0 0.0 0.0 12.04 MB

Matrix computations with HODLR representation and mixed-precision simulations

License: BSD 3-Clause "New" or "Revised" License

Python 0.35% MATLAB 99.65%

mhodlr's Introduction

drawing

mhodlr: Matrix computations in HODLR representation

License MATLAB View mhodlr on File Exchange Documentation Status Open in MATLAB Online

Abstract

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)

Setup

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.

Support routines

Note these routines work for both hodlr, mphodlr, amphodlr class.

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)

Contributions

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.

Acknowledgement

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.

References

[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.

License

This project is licensed under the terms of the License.

mhodlr's People

Contributors

chenxinye avatar xiaobo-liu avatar eccarson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.