Skip to main content

A JAX library for solving block tri-diagonal matrix systems

Project description

blocktrix

A JAX library for efficiently solving block tri-diagonal matrix systems

Author: Philip Mocz (@pmocz)

Implements both a block Thomas (serial) solver and a block cyclic reduction B-cyclic (parallel) solver.

⚠️ Warning: Work in Progress

This library is still under active development and is not guaranteed to work at this point XXX.

Installation

pip install blocktrix

Usage

import jax
from blocktrix import solve_block_tridiagonal_bcyclic, random_block_tridiagonal

# Generate a random test system
key = jax.random.PRNGKey(42)
n_blocks, block_size = 8, 4

lower, diag, upper, rhs = random_block_tridiagonal(key, n_blocks, block_size)

# Solve the system
x = solve_block_tridiagonal_bcyclic(n_blocks, lower, diag, upper, rhs)

Quickstart

It's fast!

Timing comparison

Speedup

Links

Cite this repository

If you use this software, please cite it as below.

XXX

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blocktrix-0.0.4.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blocktrix-0.0.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file blocktrix-0.0.4.tar.gz.

File metadata

  • Download URL: blocktrix-0.0.4.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for blocktrix-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1b99287d5c51358b4636a1b274b2000f5d4fa49c3c2385b5840426faf22d9c55
MD5 3ba0b9a34d23b0fc2097fc50b57b7e59
BLAKE2b-256 ebd1a289b583e625498309b5879dbeb4bc26d1cbb218aebcab448a952845884e

See more details on using hashes here.

Provenance

The following attestation bundles were made for blocktrix-0.0.4.tar.gz:

Publisher: publish-package.yml on pmocz/blocktrix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file blocktrix-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: blocktrix-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for blocktrix-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b6b4dcf8832c928d91ff24e04a87a8e5bc1f73e991915d725bcdb501b1439d03
MD5 42a1a8283b23d34cfc4b2c0e01553ee5
BLAKE2b-256 d4c426a1ffd469bfdfb20ca90bf7ce1d2291ac2396bd3e68609e02d04b6ff3a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for blocktrix-0.0.4-py3-none-any.whl:

Publisher: publish-package.yml on pmocz/blocktrix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page