Skip to main content

Time-Implicit Differentiable Finite Difference Solvers in JAX.

Project description

picardax logo

Time-Implicit Differentiable PDE Solvers in JAX.

PyPI Tests docs-latest License

InstallationQuickstartDesignFeaturesDocumentationBackground

🚨 This is a pre-release for me to cite in my dissertation. It is based on code from the PRDP paper and Emulator Superiority Paper slightly rewritten and enhanced. Please check back end of May 2026 for a full release with extended features, documentation, and examples.

Picardax is a sister project to Exponax (which provides explicit and exponential time steppers). Where Exponax sidesteps nonlinear solves entirely, Picardax embraces them: it solves the implicit system arising from theta-method (and similar) time discretizations using iterative nonlinear solvers (Picard iteration, Newton's method) that themselves rely on iterative linear solvers (CG, GMRES, BiCGStab). Built on JAX and Equinox, every solver is automatically differentiable, JIT-compilable, and GPU/TPU-ready.

Installation

pip install picardax

Requires Python 3.10+ and JAX 0.4.13+. See the JAX install guide.

Quickstart

Use a convenience stepper for common PDEs:

import picardax
from picardax.periodic.stepper import Diffusion

stepper = Diffusion(
    num_spatial_dims=1,
    domain_extent=1.0,
    num_points=64,
    dt=0.01,
    diffusivity=0.01,
)

u_next = stepper(u)

Or assemble components manually for full control:

from picardax import CG, Picard, Stepper, ThetaResiduum
from picardax.periodic import CollocatedDerivatives
from picardax.periodic.rhs import Diffusion

derivatives = CollocatedDerivatives(
    num_spatial_dims=1, num_points=64, domain_extent=1.0
)
rhs = Diffusion(derivatives=derivatives, diffusivity=0.01)
residuum = ThetaResiduum(rhs=rhs, theta=0.5, dt=0.01)
solver = Picard(linear_solver=CG(), maxiter=10, tol=1e-6)
stepper = Stepper(residuum=residuum, solver=solver)

u_next = stepper(u)

# Diagnose convergence
n_iters = stepper.diagnose(u)
errors = stepper.get_error_iterates(u)

Design

TODO

Features

TODO

Documentation

Documentation is available at fkoehler.site/picardax.

Background

TODO

Related

TODO

License

MIT, see here


fkoehler.site  ·  GitHub @ceyron  ·  X @felix_m_koehler  ·  LinkedIn Felix Koehler

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

picardax-0.0.1.tar.gz (80.9 kB view details)

Uploaded Source

Built Distribution

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

picardax-0.0.1-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file picardax-0.0.1.tar.gz.

File metadata

  • Download URL: picardax-0.0.1.tar.gz
  • Upload date:
  • Size: 80.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for picardax-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e5a79a49e8722bec6c3e13d450debaa6a4e1671eab2f56b11a8185e0c8e321b3
MD5 e78b27b23468f9b412cd9fcb3be22527
BLAKE2b-256 b1569e68d93604163081b135bfc75df9f6d11e02e9f3f2b4886d6590d2a6f4be

See more details on using hashes here.

Provenance

The following attestation bundles were made for picardax-0.0.1.tar.gz:

Publisher: publish.yml on Ceyron/picardax

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

File details

Details for the file picardax-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: picardax-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for picardax-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b49277de2fbde888139dddcca7c52a4c0152223d074728eb3416e7af3d1439fa
MD5 61197d5511a8d1d3934fefce1398ba6e
BLAKE2b-256 cd7272bad9690bc2f680eceb3cdf924b81a92df3047d290a21b2d111821307ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for picardax-0.0.1-py3-none-any.whl:

Publisher: publish.yml on Ceyron/picardax

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