witwin-maxwell 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/.github/workflows/publish-witwin-maxwell.yml +118 -20
  2. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/.gitignore +7 -4
  3. witwin_maxwell-0.3.0/CHANGELOG.md +51 -0
  4. witwin_maxwell-0.3.0/FEATURE_LIST.md +432 -0
  5. witwin_maxwell-0.3.0/LICENSE +13 -0
  6. witwin_maxwell-0.3.0/PKG-INFO +184 -0
  7. witwin_maxwell-0.3.0/README.md +167 -0
  8. witwin_maxwell-0.3.0/docs/releases/0.3.0.md +27 -0
  9. witwin_maxwell-0.3.0/docs/validation/tidy3d-numerical-alignment-0.3.0.md +130 -0
  10. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/hatch_build.py +3 -1
  11. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/pyproject.toml +9 -8
  12. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/scripts/build_fdtd_cuda_prebuilt.py +2 -2
  13. witwin_maxwell-0.3.0/scripts/perf_cuda_graph_dispersive.py +134 -0
  14. witwin_maxwell-0.3.0/scripts/verify_cuda_binary_arches.py +73 -0
  15. witwin_maxwell-0.3.0/tests/api/adapters/tidy3d/test_tidy3d_adapter.py +2228 -0
  16. witwin_maxwell-0.3.0/tests/api/public/test_dependency_contract.py +22 -0
  17. witwin_maxwell-0.3.0/tests/api/public/test_guard_census.py +184 -0
  18. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/api/public/test_public_api.py +30 -3
  19. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/boundaries/boundary_physics/test_fdtd_boundary_physics.py +118 -14
  20. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/boundaries/boundary_specs/test_fdtd_boundaries.py +4 -13
  21. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/boundaries/cpml/test_fdtd_cpml.py +18 -16
  22. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/boundaries/symmetry/test_symmetry_generalization.py +1 -1
  23. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/core/grid/test_autogrid.py +61 -13
  24. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/core/grid/test_gridspec_custom.py +56 -8
  25. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/core/grid/test_nonuniform_uniform_equivalence.py +11 -10
  26. witwin_maxwell-0.3.0/tests/fdtd/__init__.py +0 -0
  27. witwin_maxwell-0.3.0/tests/fdtd/cuda/__init__.py +0 -0
  28. witwin_maxwell-0.3.0/tests/fdtd/cuda/test_cuda_adjoint_native.py +174 -0
  29. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/test_cuda_common_parity.py +1 -3
  30. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/test_cuda_cpml_extension_parity.py +6 -6
  31. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/torch_reference.py +77 -37
  32. witwin_maxwell-0.3.0/tests/fdtd/test_cuda_graph_capture_coverage.py +226 -0
  33. witwin_maxwell-0.3.0/tests/fdtd/test_cuda_graph_complex_bloch.py +112 -0
  34. witwin_maxwell-0.3.0/tests/fdtd/test_cuda_graph_dispersive.py +91 -0
  35. witwin_maxwell-0.3.0/tests/fdtd/test_cuda_graph_nonlinear.py +89 -0
  36. witwin_maxwell-0.3.0/tests/fdtd/test_cuda_graph_tfsf.py +163 -0
  37. witwin_maxwell-0.3.0/tests/fdtd/test_cuda_graph_tfsf_slab.py +141 -0
  38. witwin_maxwell-0.3.0/tests/gradients/e2e/__init__.py +0 -0
  39. witwin_maxwell-0.3.0/tests/gradients/e2e/test_fdtd_two_port_sparam_optimization.py +169 -0
  40. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/gradients/fdtd_adjoint_baselines.py +8 -125
  41. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/gradients/test_fdtd_adjoint_bridge.py +699 -523
  42. witwin_maxwell-0.3.0/tests/gradients/test_fdtd_adjoint_materials.py +1735 -0
  43. witwin_maxwell-0.3.0/tests/gradients/test_fdtd_adjoint_p6_acceptance.py +59 -0
  44. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/gradients/test_fdtd_adjoint_rigorous.py +70 -3
  45. witwin_maxwell-0.3.0/tests/gradients/test_fdtd_custom_source_adjoint.py +411 -0
  46. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/gradients/test_fdtd_mode_source_adjoint.py +5 -97
  47. witwin_maxwell-0.3.0/tests/gradients/test_fdtd_multisource_adjoint.py +436 -0
  48. witwin_maxwell-0.3.0/tests/materials/__init__.py +1 -0
  49. witwin_maxwell-0.3.0/tests/materials/anisotropic/test_fdtd_full_anisotropy.py +477 -0
  50. witwin_maxwell-0.3.0/tests/materials/combinations/__init__.py +0 -0
  51. witwin_maxwell-0.3.0/tests/materials/combinations/test_aniso_pml_overlap_reflection.py +206 -0
  52. witwin_maxwell-0.3.0/tests/materials/combinations/test_bloch_dispersive_forward.py +117 -0
  53. witwin_maxwell-0.3.0/tests/materials/combinations/test_combination_matrix.py +284 -0
  54. witwin_maxwell-0.3.0/tests/materials/combinations/test_diagonal_aniso_dispersive.py +194 -0
  55. witwin_maxwell-0.3.0/tests/materials/combinations/test_lossy_anisotropic_slab.py +291 -0
  56. witwin_maxwell-0.3.0/tests/materials/combinations/test_modulated_dispersive_nonlinear.py +391 -0
  57. witwin_maxwell-0.3.0/tests/materials/combinations/test_modulated_slab_cpml.py +154 -0
  58. witwin_maxwell-0.3.0/tests/materials/combinations/test_mu_tensor_dispersion.py +205 -0
  59. witwin_maxwell-0.3.0/tests/materials/combinations/test_multi_frequency_modulation.py +189 -0
  60. witwin_maxwell-0.3.0/tests/materials/combinations/test_rotated_birefringent_dispersive_slab.py +330 -0
  61. witwin_maxwell-0.3.0/tests/materials/combinations/test_shg_dispersive_phase_matching.py +212 -0
  62. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/compiler/test_material_compiler.py +210 -54
  63. witwin_maxwell-0.3.0/tests/materials/compiler/test_pec_conformal_nonuniform.py +238 -0
  64. witwin_maxwell-0.3.0/tests/materials/compiler/test_subpixel_nonuniform.py +270 -0
  65. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/conductive/test_fdtd_conductive.py +39 -54
  66. witwin_maxwell-0.3.0/tests/materials/conductive/test_fdtd_magnetic_conductive.py +316 -0
  67. witwin_maxwell-0.3.0/tests/materials/dispersive/test_custom_dispersive.py +314 -0
  68. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/dispersive/test_fdtd_dispersive.py +18 -16
  69. witwin_maxwell-0.3.0/tests/materials/dispersive/test_fdtd_gain.py +156 -0
  70. witwin_maxwell-0.3.0/tests/materials/dispersive/test_fdtd_sellmeier.py +142 -0
  71. witwin_maxwell-0.3.0/tests/materials/modulation/test_fdtd_modulation.py +387 -0
  72. witwin_maxwell-0.3.0/tests/materials/nonlinear/test_fdtd_nonlinear.py +572 -0
  73. witwin_maxwell-0.3.0/tests/materials/perturbation/test_perturbation_medium.py +224 -0
  74. witwin_maxwell-0.3.0/tests/materials/sheet/__init__.py +1 -0
  75. witwin_maxwell-0.3.0/tests/materials/sheet/sheet_measurement.py +132 -0
  76. witwin_maxwell-0.3.0/tests/materials/sheet/test_fdtd_graphene.py +333 -0
  77. witwin_maxwell-0.3.0/tests/materials/sheet/test_fdtd_medium2d.py +143 -0
  78. witwin_maxwell-0.3.0/tests/materials/sheet/test_lossy_metal.py +161 -0
  79. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/monitors/observers/test_fdtd_observers.py +17 -15
  80. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/postprocess/rcs/test_postprocess.py +213 -0
  81. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/postprocess/scattering/test_mode_overlap.py +2 -2
  82. witwin_maxwell-0.3.0/tests/postprocess/scattering/test_ring_resonator_s21.py +288 -0
  83. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/postprocess/scattering/test_scattering_parameters.py +147 -9
  84. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/definitions/test_astigmatic_gaussian_beam.py +7 -6
  85. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/definitions/test_custom_uniform_sources.py +5 -1
  86. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/definitions/test_sources.py +11 -16
  87. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/incident/test_fdtd_incident.py +24 -2
  88. witwin_maxwell-0.3.0/tests/sources/incident/test_soft_planewave_absolute_power.py +209 -0
  89. witwin_maxwell-0.3.0/tests/sources/mode/test_fdtd_anisotropic_aperture.py +217 -0
  90. witwin_maxwell-0.3.0/tests/sources/mode/test_fdtd_bent_mode_source.py +158 -0
  91. witwin_maxwell-0.3.0/tests/sources/mode/test_fdtd_broadband_mode_source.py +178 -0
  92. witwin_maxwell-0.3.0/tests/sources/mode/test_fdtd_complex_lossy_slab_mode.py +146 -0
  93. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/mode/test_fdtd_mode_source.py +1 -1
  94. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/mode/test_mode_solver_gradients.py +29 -0
  95. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/point/test_fdtd_sources.py +8 -8
  96. witwin_maxwell-0.3.0/tests/sources/tfsf/test_fdtd_grating_pulsed_bloch.py +256 -0
  97. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/tfsf/test_fdtd_grating_tfsf.py +222 -17
  98. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/tfsf/test_fdtd_tfsf.py +5 -5
  99. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/validation/physics/test_autogrid_physics.py +25 -10
  100. witwin_maxwell-0.3.0/tests/validation/physics/test_autogrid_subpixel_thesis.py +193 -0
  101. witwin_maxwell-0.3.0/tests/validation/physics/test_bloch_broadband_vs_cw.py +213 -0
  102. witwin_maxwell-0.3.0/tests/validation/physics/test_dispersive_metasurface_bloch.py +110 -0
  103. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/validation/physics/test_fdtd_physics_correctness.py +12 -17
  104. witwin_maxwell-0.3.0/tests/validation/physics/test_layered_exterior_huygens_validation.py +324 -0
  105. witwin_maxwell-0.3.0/tests/validation/physics/test_lossy_metal_sibc.py +161 -0
  106. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/validation/physics/test_nonuniform_grid_physics.py +7 -5
  107. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/validation/physics/test_postprocess_end_to_end_validation.py +55 -11
  108. witwin_maxwell-0.3.0/tests/validation/physics/test_soft_planewave_graded.py +302 -0
  109. witwin_maxwell-0.3.0/tests/validation/physics/test_tfsf_nonuniform.py +335 -0
  110. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/__init__.py +29 -2
  111. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/adapters/gds.py +1 -1
  112. witwin_maxwell-0.3.0/witwin/maxwell/adapters/tidy3d.py +1669 -0
  113. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/adjoint_inputs.py +4 -0
  114. witwin_maxwell-0.3.0/witwin/maxwell/compiler/materials.py +1355 -0
  115. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/compiler/sources.py +11 -3
  116. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdfd/adjoint/bridge.py +2 -0
  117. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdfd/solver.py +30 -7
  118. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/adjoint/__init__.py +21 -0
  119. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/adjoint/bridge.py +746 -0
  120. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/adjoint/capabilities.py +29 -0
  121. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/adjoint/core.py +1425 -288
  122. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/adjoint/dispatch.py +684 -0
  123. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/adjoint/native.py +2561 -0
  124. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/adjoint/profiler.py +14 -0
  125. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/adjoint/reverse_common.py +207 -0
  126. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/adjoint/seeds.py +98 -53
  127. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/boundary/cpml.py +9 -4
  128. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/checkpoint.py +52 -0
  129. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/backend.py +1410 -398
  130. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/build.py +63 -13
  131. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/extension.cpp +2053 -0
  132. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/kernels/adjoint.cu +5290 -0
  133. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/kernels/aniso.cu +1704 -0
  134. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/kernels/boundary.cu +101 -31
  135. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/kernels/common.cu +74 -0
  136. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/kernels/dispersive.cu +782 -0
  137. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/kernels/electric.cu +3613 -0
  138. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/kernels/magnetic.cu +781 -0
  139. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/kernels/observers.cu +65 -68
  140. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/kernels/projection.cu +19 -22
  141. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/kernels/sources.cu +180 -183
  142. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/kernels/spectral.cu +69 -72
  143. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/launch.h +23 -0
  144. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/tensors.h +35 -0
  145. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/excitation/__init__.py +2 -0
  146. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/excitation/injection.py +346 -125
  147. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/excitation/modes.py +487 -192
  148. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/excitation/spatial.py +58 -20
  149. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/excitation/temporal.py +83 -31
  150. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/excitation/tfsf_apply.py +57 -20
  151. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/excitation/tfsf_common.py +44 -13
  152. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/excitation/tfsf_specs.py +0 -1
  153. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/excitation/tfsf_state.py +63 -8
  154. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/material_pullback.py +117 -19
  155. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/meshing/autogrid.py +48 -26
  156. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/observers.py +103 -31
  157. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/runtime/__init__.py +2 -6
  158. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/runtime/initialization.py +30 -5
  159. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/runtime/materials.py +1563 -0
  160. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/runtime/spectral.py +13 -20
  161. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/runtime/stepping.py +920 -146
  162. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/solver.py +6 -14
  163. witwin_maxwell-0.3.0/witwin/maxwell/geometry/__init__.py +5 -0
  164. witwin_maxwell-0.3.0/witwin/maxwell/geometry/polyslab.py +299 -0
  165. witwin_maxwell-0.3.0/witwin/maxwell/media.py +1467 -0
  166. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/monitors.py +10 -0
  167. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/ports.py +12 -0
  168. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/postprocess/__init__.py +4 -0
  169. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/postprocess/modal.py +2 -0
  170. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/postprocess/nfft.py +26 -9
  171. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/postprocess/scattering_parameters.py +149 -16
  172. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/postprocess/stratton_chu.py +306 -27
  173. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/scene.py +102 -25
  174. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/simulation.py +15 -0
  175. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/sources.py +64 -2
  176. witwin_maxwell-0.2.0/COPYING +0 -674
  177. witwin_maxwell-0.2.0/FEATURE_LIST.md +0 -358
  178. witwin_maxwell-0.2.0/PKG-INFO +0 -177
  179. witwin_maxwell-0.2.0/README.md +0 -159
  180. witwin_maxwell-0.2.0/assets/teapot.obj +0 -24238
  181. witwin_maxwell-0.2.0/benchmark/FDFD_PERFORMANCE.md +0 -13
  182. witwin_maxwell-0.2.0/benchmark/RESULTS.md +0 -60
  183. witwin_maxwell-0.2.0/benchmark/__init__.py +0 -3
  184. witwin_maxwell-0.2.0/benchmark/__main__.py +0 -5
  185. witwin_maxwell-0.2.0/benchmark/cache.py +0 -146
  186. witwin_maxwell-0.2.0/benchmark/fdfd_performance.py +0 -324
  187. witwin_maxwell-0.2.0/benchmark/metrics.py +0 -155
  188. witwin_maxwell-0.2.0/benchmark/models.py +0 -38
  189. witwin_maxwell-0.2.0/benchmark/paths.py +0 -36
  190. witwin_maxwell-0.2.0/benchmark/plotting.py +0 -449
  191. witwin_maxwell-0.2.0/benchmark/report.py +0 -141
  192. witwin_maxwell-0.2.0/benchmark/runner.py +0 -577
  193. witwin_maxwell-0.2.0/benchmark/scenes/__init__.py +0 -47
  194. witwin_maxwell-0.2.0/benchmark/scenes/_common.py +0 -76
  195. witwin_maxwell-0.2.0/benchmark/scenes/dipole/__init__.py +0 -21
  196. witwin_maxwell-0.2.0/benchmark/scenes/dipole/dipole_dielectric_box.py +0 -39
  197. witwin_maxwell-0.2.0/benchmark/scenes/dipole/dipole_dielectric_sphere.py +0 -40
  198. witwin_maxwell-0.2.0/benchmark/scenes/dipole/dipole_ey.py +0 -45
  199. witwin_maxwell-0.2.0/benchmark/scenes/dipole/dipole_offcenter.py +0 -45
  200. witwin_maxwell-0.2.0/benchmark/scenes/dipole/dipole_two_freq.py +0 -37
  201. witwin_maxwell-0.2.0/benchmark/scenes/dipole/dipole_vacuum.py +0 -48
  202. witwin_maxwell-0.2.0/benchmark/scenes/dipole/high_eps_box.py +0 -38
  203. witwin_maxwell-0.2.0/benchmark/scenes/dipole/lorentz_resonator.py +0 -45
  204. witwin_maxwell-0.2.0/benchmark/scenes/dipole/multi_dielectric.py +0 -39
  205. witwin_maxwell-0.2.0/benchmark/scenes/planewave/__init__.py +0 -13
  206. witwin_maxwell-0.2.0/benchmark/scenes/planewave/dielectric_slab.py +0 -44
  207. witwin_maxwell-0.2.0/benchmark/scenes/planewave/dielectric_sphere.py +0 -36
  208. witwin_maxwell-0.2.0/benchmark/scenes/planewave/metal_sphere.py +0 -52
  209. witwin_maxwell-0.2.0/benchmark/scenes/planewave/planewave_dielectric_sphere.py +0 -38
  210. witwin_maxwell-0.2.0/benchmark/scenes/planewave/planewave_vacuum.py +0 -37
  211. witwin_maxwell-0.2.0/benchmark/tidy3d_scene.py +0 -32
  212. witwin_maxwell-0.2.0/docs/dev/fdtd/native_cuda/bench_baseline.py +0 -160
  213. witwin_maxwell-0.2.0/docs/dev/fdtd/native_cuda/kernel_mapping.md +0 -42
  214. witwin_maxwell-0.2.0/docs/dev/fdtd/native_cuda/parity_matrix.md +0 -31
  215. witwin_maxwell-0.2.0/docs/dev/fdtd/native_cuda/profile_scenario.py +0 -24
  216. witwin_maxwell-0.2.0/docs/dev/fdtd/native_cuda/profiling_baseline.md +0 -173
  217. witwin_maxwell-0.2.0/docs/dev/fdtd/native_cuda/snapshot_tool.py +0 -189
  218. witwin_maxwell-0.2.0/docs/dev/grating-tfsf-bloch-pml-notes.md +0 -41
  219. witwin_maxwell-0.2.0/tests/api/adapters/tidy3d/test_tidy3d_adapter.py +0 -528
  220. witwin_maxwell-0.2.0/tests/assets/cube.obj +0 -15
  221. witwin_maxwell-0.2.0/tests/assets/teapot.obj +0 -599
  222. witwin_maxwell-0.2.0/tests/fdtd/cuda/test_cuda_adjoint_parity.py +0 -1275
  223. witwin_maxwell-0.2.0/tests/validation/benchmark/test_benchmark_system.py +0 -591
  224. witwin_maxwell-0.2.0/tests/validation/benchmark/test_fdfd_performance.py +0 -27
  225. witwin_maxwell-0.2.0/witwin/maxwell/adapters/tidy3d.py +0 -663
  226. witwin_maxwell-0.2.0/witwin/maxwell/compiler/materials.py +0 -761
  227. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/adjoint/__init__.py +0 -22
  228. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/adjoint/bridge.py +0 -480
  229. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/adjoint/dispatch.py +0 -415
  230. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/adjoint/reference.py +0 -1003
  231. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/adjoint/reverse_common.py +0 -467
  232. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/cuda/extension.cpp +0 -1235
  233. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/cuda/kernels/adjoint.cu +0 -3244
  234. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/cuda/kernels/common.cu +0 -63
  235. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/cuda/kernels/dispersive.cu +0 -475
  236. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/cuda/kernels/electric.cu +0 -2298
  237. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/cuda/kernels/magnetic.cu +0 -981
  238. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/cuda/launch.h +0 -16
  239. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/cuda/runtime/parity.py +0 -9
  240. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/cuda/tensors.h +0 -22
  241. witwin_maxwell-0.2.0/witwin/maxwell/fdtd/runtime/materials.py +0 -695
  242. witwin_maxwell-0.2.0/witwin/maxwell/media.py +0 -413
  243. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/TEST_LAYOUT.md +0 -0
  244. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/__init__.py +0 -0
  245. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/api/adapters/gds/test_gds_adapter.py +0 -0
  246. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/api/public/test_simulation_smoke.py +0 -0
  247. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/boundaries/absorbers/test_boundary_variants.py +0 -0
  248. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/boundaries/boundary_physics/test_fdtd_pec_material.py +0 -0
  249. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/conftest.py +0 -0
  250. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/core/geometry/test_mesh_geometry.py +0 -0
  251. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/core/grid/test_fdtd_coords.py +0 -0
  252. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/core/grid/test_nonuniform_placement.py +0 -0
  253. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/core/scene/test_scene.py +0 -0
  254. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdfd/test_ams.py +0 -0
  255. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdfd/test_direct_solver.py +0 -0
  256. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdfd/test_krylov.py +0 -0
  257. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdfd/test_matrix_cache.py +0 -0
  258. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdfd/test_preconditioners.py +0 -0
  259. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdfd/test_symmetric_formulation.py +0 -0
  260. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/_parity_backend.py +0 -0
  261. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/test_cuda_dispersive_parity.py +0 -0
  262. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/test_cuda_electric_boundary_parity.py +0 -0
  263. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/test_cuda_extension_load.py +0 -0
  264. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/test_cuda_graph.py +0 -0
  265. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/test_cuda_magnetic_parity.py +0 -0
  266. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/test_cuda_sources_parity.py +0 -0
  267. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/cuda/test_cuda_spectral_observer_parity.py +0 -0
  268. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/test_cuda_graph.py +0 -0
  269. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/fdtd/test_fdtd_autoshutoff.py +0 -0
  270. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/gradients/README.md +0 -0
  271. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/gradients/__init__.py +0 -0
  272. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/gradients/test_fdfd_adjoint.py +0 -0
  273. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/compiler/test_fdfd_material_support.py +0 -0
  274. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/compiler/test_pec_material.py +0 -0
  275. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/compiler/test_polarized_averaging.py +0 -0
  276. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/compiler/test_polyslab.py +0 -0
  277. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/compiler/test_subpixel_gradients.py +0 -0
  278. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/compiler/test_subpixel_normals.py +0 -0
  279. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/materials/compiler/test_subpixel_spec.py +0 -0
  280. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/monitors/diffraction/test_diffraction_monitor.py +0 -0
  281. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/monitors/emission/test_dipole_emission_monitor.py +0 -0
  282. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/monitors/material/test_permittivity_monitor.py +0 -0
  283. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/monitors/time/test_fdtd_time_monitors.py +0 -0
  284. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/postprocess/directivity/test_directivity.py +0 -0
  285. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/postprocess/evaluation/test_fdtd_evaluation.py +0 -0
  286. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/definitions/test_custom_source_time.py +0 -0
  287. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/sources/point/test_fdtd_source_normalization.py +0 -0
  288. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/validation/cross_solver/test_fdfd_vs_fdtd.py +0 -0
  289. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/validation/physics/test_fdtd_boundary_tfsf_validation.py +0 -0
  290. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/tests/validation/physics/test_pec_conformal.py +0 -0
  291. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/adapters/__init__.py +0 -0
  292. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/compiler/__init__.py +0 -0
  293. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/compiler/monitors.py +0 -0
  294. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdfd/__init__.py +0 -0
  295. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdfd/adjoint/__init__.py +0 -0
  296. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdfd/ams.py +0 -0
  297. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdfd/krylov.py +0 -0
  298. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdfd/plotting.py +0 -0
  299. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdfd/postprocess.py +0 -0
  300. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/__init__.py +0 -0
  301. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/boundary/__init__.py +0 -0
  302. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/boundary/bloch.py +0 -0
  303. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/boundary/common.py +0 -0
  304. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/boundary/runtime.py +0 -0
  305. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/coords.py +0 -0
  306. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/__init__.py +0 -0
  307. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/kernels/common.cuh +0 -0
  308. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/runtime/__init__.py +0 -0
  309. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/runtime/dispatcher.py +0 -0
  310. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/cuda/runtime/graph.py +0 -0
  311. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/dispersion.py +0 -0
  312. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/evaluation.py +0 -0
  313. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/io.py +0 -0
  314. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/meshing/__init__.py +0 -0
  315. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/plotting.py +0 -0
  316. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/postprocess.py +0 -0
  317. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/fdtd/runtime/module_cache.py +0 -0
  318. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/materials.py +0 -0
  319. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/postprocess/RCS.py +0 -0
  320. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/postprocess/diffraction.py +0 -0
  321. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/postprocess/directivity.py +0 -0
  322. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/postprocess/emission.py +0 -0
  323. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/result.py +0 -0
  324. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/visualization/__init__.py +0 -0
  325. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/visualization/interactive.py +0 -0
  326. {witwin_maxwell-0.2.0 → witwin_maxwell-0.3.0}/witwin/maxwell/visualization/plots.py +0 -0
@@ -83,14 +83,13 @@ jobs:
83
83
  PY
84
84
 
85
85
  build_cuda_wheels:
86
- name: Build CUDA wheel / ${{ matrix.os }} / py${{ matrix.python_version }}
86
+ name: Build stable CUDA wheel / ${{ matrix.os }}
87
87
  needs: validate_release
88
88
  runs-on: ${{ matrix.os }}
89
89
  strategy:
90
90
  fail-fast: false
91
91
  matrix:
92
92
  os: [ubuntu-22.04, windows-2022]
93
- python_version: ["3.10", "3.11", "3.12"]
94
93
 
95
94
  steps:
96
95
  - name: Check out repository
@@ -99,7 +98,7 @@ jobs:
99
98
  - name: Set up Python
100
99
  uses: actions/setup-python@v5
101
100
  with:
102
- python-version: ${{ matrix.python_version }}
101
+ python-version: "3.10"
103
102
 
104
103
  - name: Free disk space (Linux)
105
104
  if: runner.os == 'Linux'
@@ -113,11 +112,11 @@ jobs:
113
112
  echo "Disk after cleanup:"; df -h /
114
113
 
115
114
  - name: Install CUDA Toolkit
116
- uses: Jimver/cuda-toolkit@v0.2.29
115
+ uses: Jimver/cuda-toolkit@v0.2.35
117
116
  with:
118
- cuda: "12.5.0"
117
+ cuda: "12.8.1"
119
118
  method: local
120
- log-file-suffix: "${{ runner.os }}-py${{ matrix.python_version }}"
119
+ log-file-suffix: "${{ runner.os }}-stable-abi"
121
120
 
122
121
  - name: Set up MSVC
123
122
  if: runner.os == 'Windows'
@@ -149,16 +148,27 @@ jobs:
149
148
  - name: Install CUDA extension build dependencies
150
149
  run: |
151
150
  python -m pip install --upgrade pip setuptools wheel ninja numpy
152
- python -m pip install torch==2.6.0 --index-url https://download.pytorch.org/whl/cu124
151
+ python -m pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cu128
153
152
  python -m pip install build
154
153
 
155
- - name: Build packaged FDTD CUDA extension
154
+ - name: Build packaged stable FDTD CUDA extension
155
+ shell: bash
156
156
  env:
157
157
  MAX_JOBS: "2"
158
- TORCH_CUDA_ARCH_LIST: "7.0;8.0;8.6;8.9;9.0+PTX"
159
- WITWIN_MAXWELL_FDTD_CUDA_BUILD_DIR: ${{ runner.temp }}/witwin_maxwell_fdtd_cuda
158
+ WITWIN_CUDA_GENCODE_ARCHES: "7.0;7.5;8.0;8.6;8.9;9.0;10.0;10.1;12.0+PTX"
159
+ PACKAGE_DIR: ${{ needs.validate_release.outputs.package_dir }}
160
+ WITWIN_MAXWELL_FDTD_CUDA_BUILD_DIR: ${{ runner.temp }}/witwin_maxwell_fdtd_cuda/stable_abi_v1
161
+ run: |
162
+ python "$PACKAGE_DIR"/scripts/build_fdtd_cuda_prebuilt.py --verbose
163
+
164
+ - name: Verify compiled CUDA architectures
165
+ shell: bash
166
+ env:
167
+ PACKAGE_DIR: ${{ needs.validate_release.outputs.package_dir }}
160
168
  run: |
161
- python scripts/build_fdtd_cuda_prebuilt.py --verbose
169
+ python "$PACKAGE_DIR"/scripts/verify_cuda_binary_arches.py \
170
+ --stem witwin_maxwell_fdtd_cuda \
171
+ "$PACKAGE_DIR"/witwin/maxwell/fdtd/cuda/prebuilt
162
172
 
163
173
  - name: Build platform wheel
164
174
  shell: bash
@@ -167,21 +177,25 @@ jobs:
167
177
  run: |
168
178
  python -m build --wheel "$PACKAGE_DIR"
169
179
 
170
- - name: Normalize Linux wheel platform tag
180
+ - name: Repair Linux wheel platform tag
171
181
  if: runner.os == 'Linux'
172
182
  shell: bash
173
183
  env:
174
184
  PACKAGE_DIR: ${{ needs.validate_release.outputs.package_dir }}
175
185
  run: |
176
- # PyPI rejects the raw linux_x86_64 tag; the extension is built on the
177
- # ubuntu-22.04 runner (glibc 2.35), so retag to the matching manylinux
178
- # tag. torch/CUDA runtime libraries are runtime dependencies and stay
179
- # unbundled, so no auditwheel repair is required.
180
- shopt -s nullglob
186
+ python -m pip install auditwheel patchelf
187
+ mkdir -p "$PACKAGE_DIR"/wheelhouse
181
188
  for whl in "$PACKAGE_DIR"/dist/*-linux_x86_64.whl; do
182
- echo "Retagging $whl"
183
- python -m wheel tags --platform-tag manylinux_2_35_x86_64 --remove "$whl"
189
+ python -m auditwheel repair "$whl" \
190
+ --plat manylinux_2_35_x86_64 \
191
+ --wheel-dir "$PACKAGE_DIR"/wheelhouse \
192
+ --exclude libc10.so --exclude libc10_cuda.so \
193
+ --exclude libtorch.so --exclude libtorch_cpu.so \
194
+ --exclude libtorch_cuda.so --exclude libtorch_python.so \
195
+ --exclude libcudart.so.12 --exclude libcuda.so.1
184
196
  done
197
+ rm -f "$PACKAGE_DIR"/dist/*-linux_x86_64.whl
198
+ mv "$PACKAGE_DIR"/wheelhouse/*.whl "$PACKAGE_DIR"/dist/
185
199
  ls -l "$PACKAGE_DIR"/dist
186
200
 
187
201
  - name: Smoke install prebuilt wheel
@@ -195,9 +209,18 @@ jobs:
195
209
  python -m pip install --no-deps "$PACKAGE_DIR"/dist/*.whl
196
210
  python - <<'PY'
197
211
  import importlib.util
212
+ import os
198
213
  import site
214
+ import zipfile
199
215
  from pathlib import Path
200
216
 
217
+ wheel = next((Path(os.environ["PACKAGE_DIR"]) / "dist").glob("*.whl"))
218
+ names = zipfile.ZipFile(wheel).namelist()
219
+ native = [name for name in names if "witwin_maxwell_fdtd_cuda" in name and name.endswith((".so", ".pyd"))]
220
+ assert len(native) == 1, native
221
+ assert "/prebuilt/" in f"/{native[0]}"
222
+ assert "torch_" not in native[0]
223
+
201
224
  candidates = []
202
225
  for root in site.getsitepackages() + [site.getusersitepackages()]:
203
226
  candidates.append(Path(root) / "witwin" / "maxwell" / "fdtd" / "cuda" / "build.py")
@@ -210,6 +233,7 @@ jobs:
210
233
 
211
234
  path = module.prebuilt_extension_path()
212
235
  assert path.exists(), f"missing packaged prebuilt extension: {path}"
236
+ assert path.parent.name == "prebuilt"
213
237
  extension = module.build_extension()
214
238
  print(f"Loaded packaged FDTD CUDA extension from {extension.__file__}")
215
239
  PY
@@ -217,10 +241,83 @@ jobs:
217
241
  - name: Upload wheel artifact
218
242
  uses: actions/upload-artifact@v4
219
243
  with:
220
- name: wheel-${{ matrix.os }}-py${{ matrix.python_version }}
244
+ name: wheel-${{ matrix.os }}
221
245
  path: ${{ needs.validate_release.outputs.package_dir }}/dist/*.whl
222
246
  if-no-files-found: error
223
247
 
248
+ test_torch_compatibility:
249
+ name: Stable ABI / ${{ matrix.os }} / py${{ matrix.compatibility.python_version }} / torch${{ matrix.compatibility.torch_version }}
250
+ needs:
251
+ - validate_release
252
+ - build_cuda_wheels
253
+ runs-on: ${{ matrix.os }}
254
+ strategy:
255
+ fail-fast: false
256
+ matrix:
257
+ os: [ubuntu-22.04, windows-2022]
258
+ compatibility:
259
+ - {python_version: "3.10", torch_version: "2.10.0", cuda_index: "cu128"}
260
+ - {python_version: "3.11", torch_version: "2.10.0", cuda_index: "cu128"}
261
+ - {python_version: "3.12", torch_version: "2.10.0", cuda_index: "cu128"}
262
+ - {python_version: "3.13", torch_version: "2.10.0", cuda_index: "cu128"}
263
+ - {python_version: "3.14", torch_version: "2.10.0", cuda_index: "cu128"}
264
+ - {python_version: "3.14", torch_version: "2.11.0", cuda_index: "cu128"}
265
+ - {python_version: "3.14", torch_version: "2.12.0", cuda_index: "cu126"}
266
+
267
+ steps:
268
+ - name: Set up Python
269
+ uses: actions/setup-python@v5
270
+ with:
271
+ python-version: ${{ matrix.compatibility.python_version }}
272
+
273
+ - name: Download stable wheel
274
+ uses: actions/download-artifact@v4
275
+ with:
276
+ name: wheel-${{ matrix.os }}
277
+ path: dist
278
+
279
+ - name: Install compatibility environment
280
+ shell: bash
281
+ run: |
282
+ python -m pip install --upgrade pip
283
+ python -m pip install --no-cache-dir "torch==${{ matrix.compatibility.torch_version }}" \
284
+ --index-url "https://download.pytorch.org/whl/${{ matrix.compatibility.cuda_index }}"
285
+ python -m pip install --no-deps dist/*.whl
286
+
287
+ - name: Load the same stable binary
288
+ shell: bash
289
+ env:
290
+ EXPECTED_TORCH: ${{ matrix.compatibility.torch_version }}
291
+ WITWIN_MAXWELL_FDTD_CUDA_PREBUILT: "1"
292
+ WITWIN_MAXWELL_FDTD_CUDA_BUILD_DIR: ${{ runner.temp }}/must-not-jit-build
293
+ run: |
294
+ python - <<'PY'
295
+ import importlib.util
296
+ import os
297
+ import site
298
+ from pathlib import Path
299
+
300
+ import torch
301
+
302
+ assert torch.__version__.split("+", 1)[0] == os.environ["EXPECTED_TORCH"]
303
+ candidates = [
304
+ Path(root) / "witwin" / "maxwell" / "fdtd" / "cuda" / "build.py"
305
+ for root in site.getsitepackages() + [site.getusersitepackages()]
306
+ ]
307
+ build_path = next((path for path in candidates if path.exists()), None)
308
+ assert build_path is not None, candidates
309
+ spec = importlib.util.spec_from_file_location("witwin_maxwell_fdtd_cuda_build", build_path)
310
+ module = importlib.util.module_from_spec(spec)
311
+ spec.loader.exec_module(module)
312
+
313
+ native_path = module.prebuilt_extension_path()
314
+ assert native_path.exists(), native_path
315
+ extension = module.build_extension()
316
+ assert Path(extension.__file__).resolve() == native_path.resolve()
317
+ assert extension.update_magnetic_hx_standard is not None
318
+ print(f"Loaded {native_path.name} with torch {torch.__version__} on Python {os.sys.version.split()[0]}")
319
+ PY
320
+
224
321
  build_sdist:
225
322
  name: Build source distribution
226
323
  needs: validate_release
@@ -255,6 +352,7 @@ jobs:
255
352
  if: github.event_name == 'release'
256
353
  needs:
257
354
  - build_cuda_wheels
355
+ - test_torch_compatibility
258
356
  - build_sdist
259
357
  runs-on: ubuntu-latest
260
358
  permissions:
@@ -54,6 +54,7 @@ coverage.xml
54
54
  *.py.cover
55
55
  .hypothesis/
56
56
  .pytest_cache/
57
+ .pytest_tmp/
57
58
  cover/
58
59
 
59
60
  # Translations
@@ -171,12 +172,8 @@ venv.bak/
171
172
 
172
173
  # mkdocs documentation
173
174
  /site
174
- .slangtorch_cache/
175
- .*_runtime_*.slang
176
175
  witwin/maxwell/fdtd/cuda/prebuilt/*.pyd
177
176
  witwin/maxwell/fdtd/cuda/prebuilt/*.so
178
- .fdtd_runtime_*.slang
179
- .adjoint_kernels_runtime_*.slang
180
177
  *.png
181
178
  *.npy
182
179
  *.npz
@@ -231,3 +228,9 @@ __marimo__/
231
228
 
232
229
  # Streamlit
233
230
  .streamlit/secrets.toml
231
+
232
+ # Repository-local development content and build artifacts
233
+ .bench_tmp/
234
+ docs/dev/
235
+ assets/
236
+ benchmark/
@@ -0,0 +1,51 @@
1
+ # Changelog
2
+
3
+ All notable user-visible changes to WiTwin Maxwell are documented here. The project follows semantic versioning within the `0.x` development series.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.3.0] - 2026-07-13
8
+
9
+ ### Added
10
+
11
+ - Native CUDA FDTD adjoint reverse paths for standard and CPML fields, complex Bloch fields, full electric anisotropy, electric conductivity and dispersion, Kerr nonlinearity, TFSF sources, and multi-source workflows.
12
+ - Broadband and arbitrary-normal-axis grating `TFSF.slab(...)`, including pulsed Bloch injection and mixed Bloch/CPML axis permutations.
13
+ - `Medium2D`, `Graphene`, `LossyMetalMedium`, `PerturbationMedium`, custom spatial dispersion, Sellmeier and gain media, nonlinear susceptibility, two-photon absorption, space-time modulation, magnetic conductivity/dispersion, and full `Tensor3x3` electric anisotropy.
14
+ - Composition of supported anisotropic, conductive, dispersive, nonlinear, modulated, and CPML material effects in the same compiled FDTD scene.
15
+ - Broadband, lossy, diagonal-anisotropic, and bent-waveguide mode-source/port workflows.
16
+ - Background-aware and curved-surface equivalent-current near-to-far propagation, directivity, bistatic RCS, and expanded S-parameter/modal-overlap processing.
17
+ - Tidy3D export for nonuniform grids, mixed boundaries, expanded geometry, material, source, and monitor families.
18
+ - CUDA graph capture coverage for standard, Bloch, dispersive, nonlinear, and TFSF stepping paths.
19
+ - Native CUDA SIBC updates, full-anisotropic conductive-current capture, and a device-resident modulation clock, all compatible with CUDA Graph replay.
20
+ - Python 3.10-3.14 and PyTorch 2.10-2.12 validation for the packaged LibTorch Stable ABI CUDA extension.
21
+
22
+ ### Changed
23
+
24
+ - Consolidated the public architecture around the declarative `Scene -> Simulation -> Result` workflow. FDTD is the primary full-featured runtime; FDFD uses the same public model but remains a limited/experimental CUDA-only single-frequency path.
25
+ - Moved FDTD adjoint hot paths from Python/Torch replay to native CUDA kernels while keeping PyTorch autograd as the public differentiation interface.
26
+ - Generalized automatic/custom nonuniform grids, subpixel averaging, conformal PEC placement, and source phase correction to use local physical grid spacing.
27
+ - Standardized physical-domain handling so PML cells are appended outside `Domain.bounds`; material/source/monitor validation and cross-solver comparisons use the unchanged physical bounds.
28
+ - Adopted the WiTwin dual-license model and release wheels with CUDA 12.8 fat binaries for Linux and Windows.
29
+
30
+ ### Fixed
31
+
32
+ - Aligned Maxwell and Tidy3D plane-wave and TFSF amplitudes using their physical power/field definitions instead of fitted dimensionless factors.
33
+ - Converted explicit Bloch vectors from Maxwell radians/metre to Tidy3D's dimensionless `k * period / (2*pi)` convention.
34
+ - Preserved requested field-monitor components during Tidy3D export and validation-cache loading, preventing undeclared near-zero components from being selected as scalar observables.
35
+ - Corrected external-PML SIBC half-space detection and low-side Yee surface-node placement for `LossyMetalMedium`.
36
+ - Corrected Gaussian-pulse phase/reference handling, CW export ramp bandwidth, source-spectrum normalization, flux-aperture integration, and coordinate-aligned complex-field comparison.
37
+ - Replaced invalid validation scenarios with physically supported TFSF, diffraction-monitor, cavity-probe, and closed-surface near-to-far workflows.
38
+ - Added visual slice/phase diagnostics and solver-independent scalar comparisons for resonances, diffraction orders, directivity/beamwidth, RCS, and S-parameters.
39
+ - Corrected symmetry-face PML removal, high-face grid anchoring, and Yee-control-volume point-dipole image scaling.
40
+ - Corrected singleton custom-current datasets on staggered Yee components so magnetic current samples compile to the nearest component location.
41
+ - Kept the stable-ABI CUDA extension source portable across MSVC and Linux NVCC by using explicit typed input tables in native anisotropic-current validation.
42
+
43
+ Detailed numerical conventions, pitfalls, final comparison values, and intentionally unresolved operator-level residuals are documented in [the 0.3.0 Tidy3D numerical-alignment notes](docs/validation/tidy3d-numerical-alignment-0.3.0.md).
44
+
45
+ ## [0.2.0] - 2026-07-08
46
+
47
+ - Previous public release.
48
+
49
+ [Unreleased]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.3.0...HEAD
50
+ [0.3.0]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.2.0...witwin-maxwell-v0.3.0
51
+ [0.2.0]: https://github.com/witwin-ai/witwin-maxwell/releases/tag/witwin-maxwell-v0.2.0