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.2.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.2-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: picardax-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ee79fc4e65da9342a332b736cdd99940c06dd47c404c9d5faa85520b0a933d20
MD5 f8a6268bfd9947fccaa6db2ae37bb901
BLAKE2b-256 1ea4a30624d76b2e160cfa2aa7b01b33387837fe46e79c74fff847de8405d403

See more details on using hashes here.

Provenance

The following attestation bundles were made for picardax-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: picardax-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 452242767ab3705278d88ddd7245875d5833ea7a0c04fc58c8ad7b3cd0e566b4
MD5 f08b314e56ac0befe4f8832d99b0e573
BLAKE2b-256 ae4055a5d85bb78161476015399be5c45160a2aa57b7526647bdfc1f0dfc0517

See more details on using hashes here.

Provenance

The following attestation bundles were made for picardax-0.0.2-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