Skip to main content

CuWave

CuWave is a single-GPU, differentiable finite difference wave propagation code. Possible applications include

nondestructive testing via full waveform inversion nondestructive testing via full waveform inversion
transient acoustic topology optimization transient acoustic topology optimization
analog neural networks
transient photonic topology optimization transient photonic topology optimization

Documentation

  • see the documentation for how the code works (AI-assisted; verify with sources for critical details)
  • see examples for how to apply the code

Development status

Scalar & acoustic wave equations have been developed over the last 2 years and are thoroughly validated.

Performance

CuWave's runtime for identical discretizations is comparable to that of other established wave propagation finite difference codes. Speedups in 2D with reflecting boundaries (a ratio above 1 means CuWave is that many times faster) compared to the following frameworks:

  • scalar wave equation
  • elastic wave equation
    • Deepwave (forward: ~1.1x, sensitivity: ~1.3x)
    • SeismicWaves.jl (forward: ~4x, sensitivity: ~5x) Tested on one NVIDIA RTX PRO 500 Blackwell laptop GPU (6 GB) on the largest possible grids with CuWave's superposition_sensitivity as reference for the sensitivities. The specific numbers need to be taken with a grain of salt, as they are subject to specific hardware and simulation setup. All implementations operate on the same order of magnitude.

Additional benefits of CuWave are

  • the built-in higher order finite difference schemes, allowing for fewer grid points
  • a sensitivity analysis whose memory is independent of the number of timesteps, allowing for orders of magnitude larger grids

Install

pip install cuwave

Requires an NVIDIA GPU and CuPy matching your CUDA toolkit (e.g. pip install cupy-cuda12x), which is not pulled in automatically. For the full installation, including the optional PyTorch and running the tests, see docs/install.md.

References

If you use our code for your scientific research, please acknowledge this by referring to the following publication:

Herrmann, L., Bürchner, T., Kudela, L., Kollmannsberger, S., 2026, A memory-efficient adjoint method to enable billion parameter optimization on a single GPU in dynamic problems, Structural and Multidisciplinary Optimization, Volume 69, 52 (2026), DOI: 10.1007/s00158-025-04237-y

Contact

For questions, bug reports, or collaboration inquiries, please don't hesitate to contact Leon Herrmann at herrmann.leon@pm.me.

License

MIT; see LICENSE.

Metadata

Release files for cuwave 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cuwave 0.2.0
File Size Uploaded
cuwave-0.2.0.tar.gz 65.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cuwave 0.2.0
File Interpreter ABI Platform
cuwave-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 145.8 kB

Release files / cuwave-0.2.0.tar.gz

Download URL cuwave-0.2.0.tar.gz
Size 65.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2cd0913edb5c51e0325b6a84e5685860f895e679c30405c98d85bbcb283d9c3d
BLAKE2b-256 checksum
How to use checksums
054479028372a54aa58c33ca1c031e777b1ce74b87e6381677e0baa3087f7a84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / cuwave-0.2.0-py3-none-any.whl

Download URL cuwave-0.2.0-py3-none-any.whl
Size 80.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c609c346e76eeea38998ad20e64445918b74b9c2571d2d206f694d699a332b4f
BLAKE2b-256 checksum
How to use checksums
37c7916cbda9ad44f4bbe1258602583816662a021cfd6f9f1cb2deff08409c59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page