Actively developed

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

Done

Blaze'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.

Dielectric geometry
ωΓXMPhotonic bands
Projected operators

Symmetries

In Development

Start 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.

For a square-symmetric crystal, rotations and reflections group this illustrative nine by nine interior grid into fifteen sets. The triangular wedge contains one representative from each set.ΓXM
81k-points
C₄ᵥ symmetryRotations and reflections
For a square-symmetric crystal, rotations and reflections group this illustrative nine by nine interior grid into fifteen sets. The triangular wedge contains one representative from each set.ΓXM
15representatives

Configuration warm starts

Planned

Independent 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]

Configuration A
Cold startNew initial guess
Transfer the subspaceWarm start
Configuration B

Theory and benchmarks

In Development

Keep 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.

Website
Theory
015003000Sq. TM, MPB: 1501.5 ± 66.3 msSq. TM, Blaze f64: 240.1 ± 0.1 msSq. TM, Blaze mixed: 157.5 ± 0.2 msSq. TMSq. TE, MPB: 2419.3 ± 96.5 msSq. TE, Blaze f64: 312.4 ± 1.0 msSq. TE, Blaze mixed: 169.2 ± 0.3 msSq. TETri. TM, MPB: 1304.3 ± 49.3 msTri. TM, Blaze f64: 232.9 ± 1.2 msTri. TM, Blaze mixed: 149.6 ± 1.8 msTri. TMTri. TE, MPB: 2520.3 ± 74.9 msTri. TE, Blaze f64: 350.0 ± 5.5 msTri. TE, Blaze mixed: 169.6 ± 2.2 msTri. TE
MPBBlaze f64Blaze mixed

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

Planned

Add 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.

Circular inclusion
Polygons, cutouts, and imported grids

Solver optimization

Planned

Tune 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.

FFTεQ†QProfile the work
Check residualTune iterations
Saved full-precision Blaze results for rods of radius 0.2a and dielectric constant 8.9. Ten bands follow the Gamma, X, M, Gamma path. The orange window highlights frequencies near the illustrative solver target.00.511.5ΓXMΓωa / (2πc)ω₀ = 0.8Choose a frequency

Gradients and inverse design

Planned

Extend 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.

Vary the geometry
∂ω/∂rrCompute sensitivities
ωΓXMOptimize a band gap

MPB compatibility

Planned

Begin 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.

geometry
k_points
num_bands
MPB calculation
GeometryUnitsFieldsPreserve meaning
Bands
Fields · HDF5
Metadata
Blaze outputs

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

Planned

Keep 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.

Set up once
GPU memory
FFTMaterialBlock algebra
Fields stay on the device
Export datasets

Full 3D Maxwell

Planned

Extend 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.

3D woodpile photonic crystal with stacked square-section dielectric rods. Blue and orange distinguish perpendicular rod orientations.Periodic 3D geometry
HxHyHz∇ · H = 0Coupled vector fields

Photonic slabs

Planned

Guided-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.

A patterned film
z|H(z)|Vertical confinement

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. [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. [2]

    MPB developers, "User Interface: run_parity," MPB Documentation, accessed September 2026. [Documentation]

  3. [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. [4]

    S. Börm, R. Köhl and N. Talebi, "Computing Maxwell eigenmodes with Bloch boundary conditions," arXiv:2304.00337, preprint (2023). [arXiv]

  5. [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. [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. [7]

    L. Feng, "Inverse Design of Photonic Crystal Waveguides Using Neural Networks and Dispersion Optimization," arXiv:2410.06374, preprint (2024). [arXiv]

  8. [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]

Blaze2D

Loading search…

Tab to move through results · Escape to close