FDTDX: High-Performance Open-Source FDTD Simulation with Automatic Differentiation

FDTDX: High-Performance Open-Source FDTD Simulation with Automatic Differentiation - Published in JOSS (2026)

https://github.com/ymahlau/fdtdx

Science Score: 89.0%

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

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in JOSS metadata
  • Academic publication links
    Links to: arxiv.org, joss.theoj.org
  • Committers with academic emails
    3 of 14 committers (21.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: about 1 month ago · JSON representation

Repository

Electromagnetic FDTD Simulations in JAX

Basic Info
Statistics
  • Stars: 196
  • Watchers: 8
  • Forks: 42
  • Open Issues: 50
  • Releases: 10
Created about 1 year ago · Last pushed about 1 month ago
Metadata Files
Readme Changelog Contributing License

README.md

logo

Documentation arXiv arXiv codecov PyPI version Continuous integration status

FDTDX: Electromagnetic Simulations in JAX

FDTDX is an efficient open-source Python package for the simulation and design of three-dimensional photonic nanostructures using the Finite-Difference Time-Domain (FDTD) method. Built on JAX, it provides native GPU support and automatic differentiation capabilities, making it ideal for large-scale design tasks.

Key Features

The key features differentiating FDTDX from other simulation software packages like Meep (which is also great!) are the following:

  • High Performance: GPU-accelerated FDTD simulations with multi-GPU scaling capabilities
  • Memory Efficient: Leverages time-reversibility in Maxwell's equations for efficient gradient computation
  • Automatic Differentiation: Built-in gradient-based optimization for complex 3D structures
  • User-Friendly API: Intuitive positioning and sizing of objects in absolute or relative coordinates
  • Large-Scale Design: Capable of handling simulations with billions of grid cells
  • Open Source: Freely available for research, development and commercial use.

Documentation

Visit our documentation for: - Detailed API reference - Tutorial guides - Best practices

Also check out our whitepaper for some examples and a comparison to other popular FDTD-frameworks.

Installation

Install FDTDX using pip:

bash pip install fdtdx # Basic CPU-Installation pip install fdtdx[cuda12] # GPU-Acceleration (Highly Recommended!) pip install fdtdx[rocm] # AMD-GPU (only python<=3.12)

For development installation, see the contributing guidelines!

Multi-GPU

```bash

The following lines often lead to better memory usage in JAX

when using multiple GPU.

export XLAPYTHONCLIENTALLOCATOR="platform" export XLAPYTHONCLIENTPREALLOCATE="false" export NCCLLL128BUFFSIZE="-2" export NCCLLLBUFFSIZE="-2" export NCCL_PROTO="SIMPLE,LL,LL128" ```

Citation

If you find this repository helpful for you work, please consider citing: @article{schubert2025quantized, title={Quantized inverse design for photonic integrated circuits}, author={Schubert, Frederik and Mahlau, Yannik and Bethmann, Konrad and Hartmann, Fabian and Caspary, Reinhard and Munderloh, Marco and Ostermann, J{\"o}rn and Rosenhahn, Bodo}, journal={ACS omega}, volume={10}, number={5}, pages={5080--5086}, year={2025}, publisher={ACS Publications} }

Acknowedgement

This project was developed at the Institute of Information Processing at Leibniz University Hannover, Germany and sponsored by the cluster of excellence PhoenixD (Photonics, Optics, Engineering, Innovation across Disciplines).

Owner

  • Name: Yannik Mahlau
  • Login: ymahlau
  • Kind: user

JOSS Publication

FDTDX: High-Performance Open-Source FDTD Simulation with Automatic Differentiation
Published
January 13, 2026
Volume 11, Issue 117, Page 8912
Authors
Yannik Mahlau ORCID
Institute of Information Processing, Leibniz University Hannover, Germany
Frederik Schubert ORCID
Institute of Information Processing, Leibniz University Hannover, Germany
Lukas Berg ORCID
Institute of Information Processing, Leibniz University Hannover, Germany
Bodo Rosenhahn ORCID
Institute of Information Processing, Leibniz University Hannover, Germany
Editor
Fruzsina Agocs ORCID
Tags
Electromagnetics Photonics Numerical Simulation

GitHub Events

Total
  • Create event: 22
  • Release event: 5
  • Issues event: 106
  • Watch event: 155
  • Delete event: 1
  • Issue comment event: 247
  • Member event: 1
  • Push event: 257
  • Pull request review event: 32
  • Pull request review comment event: 28
  • Pull request event: 117
  • Fork event: 25
Last Year
  • Create event: 15
  • Release event: 5
  • Issues event: 97
  • Watch event: 90
  • Delete event: 1
  • Issue comment event: 234
  • Push event: 240
  • Pull request review event: 32
  • Pull request review comment event: 28
  • Pull request event: 113
  • Fork event: 17

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 316
  • Total Committers: 14
  • Avg Commits per committer: 22.571
  • Development Distribution Score (DDS): 0.196
Past Year
  • Commits: 316
  • Committers: 14
  • Avg Commits per committer: 22.571
  • Development Distribution Score (DDS): 0.196
Top Committers
Name Email Commits
ymahlau m****k@g****m 254
renaissancenerd v****a@g****m 13
Marko Simic m****c@u****t 9
Tianxiang Dai t****i@s****u 9
TheDarkchip r****e@m****m 7
kinimod0 s****k@o****m 7
Dorian Brandmüller d****n@b****t 4
Frederik Schubert g****b@f****e 4
Agustín Galante 8****e@u****m 2
Lukas Berg l****g@s****e 2
Yannik Mahlau 5****u@u****m 2
Tianxiang Dai t****6@g****m 1
brandmud 1****d@u****m 1
kdotom k****h@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 month ago

All Time
  • Total issues: 59
  • Total pull requests: 81
  • Average time to close issues: 25 days
  • Average time to close pull requests: 3 days
  • Total issue authors: 21
  • Total pull request authors: 16
  • Average comments per issue: 1.19
  • Average comments per pull request: 1.33
  • Merged pull requests: 48
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 53
  • Pull requests: 79
  • Average time to close issues: 28 days
  • Average time to close pull requests: 3 days
  • Issue authors: 19
  • Pull request authors: 15
  • Average comments per issue: 1.28
  • Average comments per pull request: 1.34
  • Merged pull requests: 47
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ymahlau (31)
  • galcerte (4)
  • QuentinWach (4)
  • SMSajadi99 (3)
  • andrewgiuliani (1)
  • kaipengliuHIT (1)
  • flaport (1)
  • victorapm (1)
  • joamatab (1)
  • georgebu31 (1)
  • yff-me (1)
  • Paul-Hi (1)
  • hao14chasing (1)
  • 694856790 (1)
  • rachsmith1 (1)
Pull Request Authors
  • ymahlau (35)
  • renaissancenerd (16)
  • txdai (6)
  • brandmud (4)
  • sIHURs (3)
  • TheDarkchip (3)
  • galcerte (3)
  • QuentinWach (2)
  • msimicphysics (2)
  • l-berg (1)
  • kdotom (1)
  • kyleniemeyer (1)
  • bruxillensis (1)
  • kinimod0 (1)
  • georgebu31 (1)
Top Labels
Issue Labels
enhancement (22) bug (5) question (5) good first issue (4) Unitful (2) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 476 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 35
  • Total maintainers: 1
proxy.golang.org: github.com/ymahlau/fdtdx
  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.5%
Dependent repos count: 5.7%
Last synced: about 2 months ago
pypi.org: fdtdx

A JAX framework for the finite-difference time-domain (FDTD) method for solving Maxwell's equations with a focus on inverse design of photonic devices.

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 476 Last month
Rankings
Dependent packages count: 9.9%
Average: 32.7%
Dependent repos count: 55.6%
Maintainers (1)
Last synced: about 2 months ago

Dependencies

.github/actions/setup-python-env/action.yml actions
  • actions/setup-python v5 composite
  • astral-sh/setup-uv v2 composite
.github/workflows/main.yml actions
  • ./.github/actions/setup-python-env * composite
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • codecov/codecov-action v3 composite
pyproject.toml pypi
  • equinox >=0.11.10
  • jax [cuda12]<0.4.36; platform_system == 'Linux'
  • jax <0.4.36; platform_system != 'Linux'
  • loguru >=0.7.3
  • matfree >=0.1.1
  • matplotlib >=3.9.4
  • moviepy >=2.1.1
  • optax >=0.2.4
  • pytreeclass >=0.9.2
  • rich >=13.9.4
  • seaborn >=0.13.2
  • sharedarray >=3.2.4
  • tidy3d >=2.7.8
  • trimesh >=4.5.3
  • zstandard >=0.23.0