jaxhps

jaxhps: an elliptic PDE solver built with machine learning in mind

https://github.com/meliao/jaxhps

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

jaxhps: an elliptic PDE solver built with machine learning in mind

Basic Info
  • Host: GitHub
  • Owner: meliao
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 1.7 MB
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • Open Issues: 2
  • Releases: 0
Created about 1 year ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License Citation

README.md

jaxhps

A JAX package implementing hardware acceleration for HPS methods in two and three dimensions.

See our preprint on arXiv: Hardware Acceleration for HPS Methods in Two and Three Dimensions

Installation

To install, you can use pip:

pip install jaxhps

The examples require additional packages matplotlib and h5py. If you want to install them automatically, use:

pip install jaxhps[examples]

Documentation

https://jaxhps.readthedocs.io/en/latest/

Examples

hp convergence on 2D problems with known solutions

Shows convergence using uniform quadtrees using both DtN matrices and ItI matrices. python examples/hp_convergence_2D_problems.py --DtN --ItI

High-wavenumber scattering problem

First, run the matlab script examples/driver_gen_SD_matrices.m. This will generate and save exterior single and double-layer kernel matrices. These matrices are necessary to define a boundary integral equation for the scattering problem. Once in place, we can run the script: python examples/wave_scattering_compute_reference_soln.py --scattering_potential gauss_bumps -k 100 --plot_utot This will generate plots which looks like this, showing the scattering potential and real part and modulus of the total field:

Showing the scattering potential, a sum of randomly-placed Gaussian bumps. Showing the real part of the total wave field of a scattering problem where k=100 and the scattering potential is a sum of randomly-placed Gaussian bumps. Showing the absolute value of the total wave field of a scattering problem where k=100 and the scattering potential is a sum of randomly-placed Gaussian bumps.

Adaptive discretization on a 3D problem with known solution

We have a script for generating adaptive discretizations on the wavefront problem presented in our paper:

python examples/wavefront_adaptive_discretization_3D.py -p 10 --tol 1e-02 1e-05

This should produce an image showing the computed solution, generated grid, and error map:

Showing the computed solution, the adaptive grid, and the errors on a 2D slice of our 3D wavefont probelm.

Inverse wave scattering using automatic differentiation

We have an implementation of a low-dimensional optimization problem using automatic differentiation:

python examples/inverse_wave_scattering.py --n_iter 25

This is an inverse scattering problem where we try to recover the locations of four Gaussian bumps which make up the scattering potential. Running the code should produce plots showing the optimization variables converging at the centers of the Gaussian bumps in the scattering potential, as well as a plot showing the convergence of the objective function:

Showing the convergence of the objective function in our inverse scattering example. Showing the convergence of the iterates to the centers of the Gaussian bumps.

Linearized Poisson--Boltzmann equation

Our method can be used to solve the a linearized Poisson-Boltzmann equation, which models the electrostatic properties of a molecule in solution.

python examples/poisson_boltzmann_example.py --tol 1e-01 1e-03 -p 10

Owner

  • Login: meliao
  • Kind: user
  • Location: Chicago, IL

Hi! I'm a graduate student at UChicago CS studying machine learning theory.

JOSS Publication

jaxhps: An elliptic PDE solver built with machine learning in mind
Published
November 14, 2025
Volume 10, Issue 115, Page 8549
Authors
Owen Melia ORCID
Center for Computational Mathematics, Flatiron Institute, USA
Daniel Fortunato ORCID
Center for Computational Mathematics, Flatiron Institute, USA, Center for Computational Biology, Flatiron Institute, USA
Jeremy Hoskins ORCID
Computational and Applied Mathematics, Department of Statistics, University of Chicago, USA
Rebecca Willett ORCID
Computational and Applied Mathematics, Department of Statistics, University of Chicago, USA, Department of Computer Science, University of Chicago, USA, Data Science Institute, University of Chicago, USA
Editor
Anjali Sandip ORCID
Tags
JAX numerical analysis partial differential equations scientific computing

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite both the article from preferred-citation and the software itself.
authors:
  - family-names: Melia
    given-names: Owen
  - family-names: Fortunato
    given-names: Daniel
  - family-names: Jeremy
    given-names: Hoskins
  - family-names: Rebecca
    given-names: Willett
title: Hardware Acceleration for HPS Algorithms in Two and Three Dimensions
version: 1.0.0
url: https://github.com/meliao/jaxhps
date-released: '2025-03-28'
preferred-citation:
  authors:
    - family-names: Melia
      given-names: Owen
    - family-names: Fortunato
      given-names: Daniel
    - family-names: Jeremy
      given-names: Hoskins
    - family-names: Rebecca
      given-names: Willett
  title: Hardware Acceleration for HPS Algorithms in Two and Three Dimensions
  url: https://arxiv.org/abs/2503.17535
  type: generic
  year: '2025'
  conference: {}
  publisher: {}

GitHub Events

Total
  • Issues event: 1
  • Watch event: 3
  • Delete event: 2
  • Push event: 11
  • Pull request event: 3
  • Fork event: 1
  • Create event: 5
Last Year
  • Issues event: 1
  • Watch event: 3
  • Delete event: 2
  • Push event: 11
  • Pull request event: 3
  • Fork event: 1
  • Create event: 5

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 32 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
pypi.org: jaxhps

An elliptic PDE solver built with machine learning in mind

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 32 Last month
Rankings
Dependent packages count: 9.1%
Average: 30.1%
Dependent repos count: 51.1%
Maintainers (1)
Last synced: 7 months ago

Dependencies

.github/workflows/python-conda-testing.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite