Optimization & Roadmap
This page maps the development of Blaze into stages, grouping related modules so that later work can build on a mature foundation. Each module is marked Done, In Development, or Planned.
Blaze was built specifically for a master's thesis, with a narrower application than established reference solvers: two-dimensional photonic crystals, repeated parameter studies, and projected Maxwell operators. It remains actively developed, with broader capabilities and further optimization as the next research priorities.
MPB remains Blaze's strongest reference and principal validation target. Adopting and optimizing MPB's capabilities is a natural direction, while retaining Blaze's emphasis on sweeps and operator data.[1]
Stage 1: Research foundation
Establish a reliable research core. Symmetries and configuration warm starts are the next solver features.
2D research core
DoneBlaze's research core computes TE and TM bands for circular inclusions in positive scalar dielectrics, runs parameter sweeps, and projects Maxwell operators. Native and browser execution share a configuration format. MPB comparisons and convergence metadata provide the baseline for further work.
Symmetries
In DevelopmentStart with rotations and reflections that preserve the sampled crystal. Equivalent wavevectors can then share a solve. Symmetry sectors and real-valued representations offer further reductions where the material and discretization allow them.
Configuration warm starts
PlannedIndependent geometry jobs currently start afresh in Blaze. MPB's standard run also resets fields, although explicit reuse is possible.[2] Blaze already reuses fields along k-paths and accepts native warm-start inputs. The planned step is automatic reuse between configurations: correct the old subspace for the new material and check its residual. Published methods for tracking Maxwell modes as geometry changes provide a starting point.[3]
Theory and benchmarks
In DevelopmentKeep this website up-to-date with the theory, implementation reasoning, and reproducible measurements. Profile setup, FFTs, orthogonalization, allocations, and memory. Compare total runtime at equal accuracy, with configurations, hardware, and tolerances reported alongside the results.
Stage 2: Generalize and optimize 2D
Fully generalize 2D geometry, improve solving, and support MPB workflows. MPB remains the reference for the extended capabilities.
General geometry
PlannedAdd polygons, composite shapes, and imported dielectric grids, with clear overlap rules and accurate material-interface sampling. Initially retain positive scalar permittivity. Tensor materials, loss, and dispersion would need separate extensions to the physical formulation.
Solver optimization
PlannedTune the existing block eigensolver, preconditioning, memory layout, and precision choices. Then add calculations near a chosen frequency, a capability MPB already offers. Evaluate alternative algorithms against difficult or clustered bands, with the same residual accuracy and requested band coverage.
Gradients and inverse design
PlannedExtend operator workflows with geometry and material derivatives. Minkov and colleagues demonstrated photonic-crystal inverse design through automatic differentiation.[5] Blaze needs derivatives consistent with its discrete operators, including careful treatment of interfaces and degenerate modes.
MPB compatibility
PlannedBegin with equivalent examples, geometry conversion, and a scoped Python adapter. Match units, field normalization, metadata, and required exports such as HDF5. Broader Python or Scheme compatibility can follow as tested workflows expand.
k_points
num_bands
Fields · HDF5
Metadata
Stage 3: GPU, 3D, and slabs
Build on the optimized 2D core to make large parameter studies more practical and study structures beyond the 2D TE/TM model. GPU parallelism targets faster band calculations, while 3D and slab models add polarization coupling and vertical confinement.
GPU execution
PlannedKeep FFTs, material operations, preconditioning, and block algebra on the device throughout a solve. Jin and Xie report over 40× average acceleration for their 3D finite-difference solver using CuPy on an RTX 4090 D against a NumPy CPU implementation.[6] Blaze's plane-wave solver needs its own measurements.
Full 3D Maxwell
PlannedExtend to lossless periodic 3D crystals with vector fields, 3D FFTs, and material sampling. The scalar TE/TM split no longer applies: enforce transverse fields and handle the curl operator's null space, with a larger memory budget.
Periodic 3D geometryPhotonic slabs
PlannedGuided-mode expansion uses the modes of an unpatterned waveguide as a reduced basis for efficient slab band calculations, combining periodicity in the plane with vertical confinement. Legume implements this for photonic crystal slabs.[8] A similar extension could expose slab bands, fields, and radiative losses, within the method's basis and perturbative radiation approximations.
Ideas and contributions are warmly welcome, whether a useful test case, a numerical method, or a clearer explanation. Join the project on GitHub.
References
- [1]
S. G. Johnson and J. D. Joannopoulos, "Block-iterative frequency-domain methods for Maxwell's equations in a planewave basis," Optics Express 8, 173–190 (2001). [DOI]
- [2]
MPB developers, "User Interface: run_parity," MPB Documentation, accessed September 2026. [Documentation]
- [3]
N. Georg, W. Ackermann, J. Corno and S. Schöps, "Uncertainty Quantification for Maxwell's Eigenproblem based on Isogeometric Analysis and Mode Tracking," Computer Methods in Applied Mechanics and Engineering 350, 228–244 (2019). [DOI]
- [4]
S. Börm, R. Köhl and N. Talebi, "Computing Maxwell eigenmodes with Bloch boundary conditions," arXiv:2304.00337, preprint (2023). [arXiv]
- [5]
M. Minkov, I. A. D. Williamson, L. C. Andreani, D. Gerace, B. Lou, A. Y. Song, T. W. Hughes and S. Fan, "Inverse Design of Photonic Crystals through Automatic Differentiation," ACS Photonics 7, 1729–1741 (2020). [DOI]
- [6]
C. Jin and H. Xie, "A Robust GPU-Accelerated Kernel Compensation Solver with Novel Discretization for Photonic Crystals in Anisotropic Media," arXiv:2511.17107v3, preprint (2026). [arXiv]
- [7]
L. Feng, "Inverse Design of Photonic Crystal Waveguides Using Neural Networks and Dispersion Optimization," arXiv:2410.06374, preprint (2024). [arXiv]
- [8]
S. Zanotti, M. Minkov, D. Nigro, D. Gerace, S. Fan and L. C. Andreani, "Legume: A free implementation of the guided-mode expansion method for photonic crystal slabs," Computer Physics Communications 304, 109286 (2024). [DOI]