witwin-maxwell 0.3.0__tar.gz → 0.5.1__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 (673) hide show
  1. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/.github/workflows/publish-witwin-maxwell.yml +113 -29
  2. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/.gitignore +20 -1
  3. witwin_maxwell-0.5.1/AGENTS.md +161 -0
  4. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/CHANGELOG.md +50 -1
  5. witwin_maxwell-0.5.1/CLAUDE.md +161 -0
  6. witwin_maxwell-0.5.1/FEATURE_LIST.md +1027 -0
  7. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/PKG-INFO +14 -8
  8. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/README.md +5 -5
  9. witwin_maxwell-0.5.1/experiments/fdtd_data_generator/README.md +48 -0
  10. witwin_maxwell-0.5.1/experiments/fdtd_data_generator/REPORT.md +60 -0
  11. witwin_maxwell-0.5.1/experiments/fdtd_data_generator/generate.py +1201 -0
  12. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/pyproject.toml +8 -2
  13. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/scripts/build_fdtd_cuda_prebuilt.py +4 -1
  14. witwin_maxwell-0.5.1/scripts/dev/fdtd/multi_gpu/bench_joint.py +939 -0
  15. witwin_maxwell-0.5.1/scripts/dev/fdtd/native_cuda/bench_baseline.py +162 -0
  16. witwin_maxwell-0.5.1/scripts/dev/fdtd/native_cuda/profile_scenario.py +24 -0
  17. witwin_maxwell-0.5.1/scripts/dev/fdtd/native_cuda/snapshot_tool.py +188 -0
  18. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/scripts/verify_cuda_binary_arches.py +1 -1
  19. witwin_maxwell-0.5.1/tests/api/adapters/tidy3d/test_port_source_mapping.py +138 -0
  20. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/api/adapters/tidy3d/test_tidy3d_adapter.py +266 -9
  21. witwin_maxwell-0.5.1/tests/api/public/test_batch_audit_regressions.py +145 -0
  22. witwin_maxwell-0.5.1/tests/api/public/test_batch_execution.py +190 -0
  23. witwin_maxwell-0.5.1/tests/api/public/test_batch_simulation.py +221 -0
  24. witwin_maxwell-0.5.1/tests/api/public/test_guard_census.py +460 -0
  25. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/api/public/test_public_api.py +25 -32
  26. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/api/public/test_simulation_smoke.py +4 -5
  27. witwin_maxwell-0.5.1/tests/api/public/test_thin_wire_api.py +326 -0
  28. witwin_maxwell-0.5.1/tests/boundaries/absorbers/test_mur_state_transpose.py +78 -0
  29. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/boundaries/boundary_physics/test_fdtd_boundary_physics.py +9 -4
  30. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/boundaries/symmetry/test_symmetry_generalization.py +15 -14
  31. witwin_maxwell-0.5.1/tests/breakdown/_common.py +140 -0
  32. witwin_maxwell-0.5.1/tests/breakdown/test_breakdown_accumulator.py +235 -0
  33. witwin_maxwell-0.5.1/tests/breakdown/test_breakdown_compiler.py +149 -0
  34. witwin_maxwell-0.5.1/tests/breakdown/test_breakdown_energy.py +133 -0
  35. witwin_maxwell-0.5.1/tests/breakdown/test_breakdown_events.py +93 -0
  36. witwin_maxwell-0.5.1/tests/breakdown/test_breakdown_fdtd.py +186 -0
  37. witwin_maxwell-0.5.1/tests/breakdown/test_breakdown_guards.py +145 -0
  38. witwin_maxwell-0.5.1/tests/breakdown/test_breakdown_monitor.py +146 -0
  39. witwin_maxwell-0.5.1/tests/breakdown/test_breakdown_parity.py +126 -0
  40. witwin_maxwell-0.5.1/tests/breakdown/test_breakdown_state_machine.py +168 -0
  41. witwin_maxwell-0.5.1/tests/breakdown/test_component_stress.py +194 -0
  42. witwin_maxwell-0.5.1/tests/breakdown/test_smooth_breakdown_risk.py +326 -0
  43. witwin_maxwell-0.5.1/tests/core/constants/test_physical_constants.py +40 -0
  44. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/core/grid/test_gridspec_custom.py +9 -9
  45. witwin_maxwell-0.5.1/tests/electrostatic/oracles.py +47 -0
  46. witwin_maxwell-0.5.1/tests/electrostatic/test_analytic.py +146 -0
  47. witwin_maxwell-0.5.1/tests/electrostatic/test_api.py +227 -0
  48. witwin_maxwell-0.5.1/tests/electrostatic/test_capacitance.py +239 -0
  49. witwin_maxwell-0.5.1/tests/electrostatic/test_conservation.py +107 -0
  50. witwin_maxwell-0.5.1/tests/electrostatic/test_floating.py +157 -0
  51. witwin_maxwell-0.5.1/tests/electrostatic/test_gradients.py +238 -0
  52. witwin_maxwell-0.5.1/tests/electrostatic/test_initial_condition.py +338 -0
  53. witwin_maxwell-0.5.1/tests/electrostatic/test_open_boundary.py +312 -0
  54. witwin_maxwell-0.5.1/tests/electrostatic/test_tensor_eps.py +473 -0
  55. witwin_maxwell-0.5.1/tests/esd/test_esd_circuit.py +512 -0
  56. witwin_maxwell-0.5.1/tests/esd/test_esd_circuit_e2e.py +186 -0
  57. witwin_maxwell-0.5.1/tests/esd/test_esd_circuit_energy.py +229 -0
  58. witwin_maxwell-0.5.1/tests/esd/test_esd_injection.py +321 -0
  59. witwin_maxwell-0.5.1/tests/esd/test_esd_waveform.py +208 -0
  60. witwin_maxwell-0.5.1/tests/esd/test_prebias.py +193 -0
  61. witwin_maxwell-0.5.1/tests/fdtd/cuda/test_batch_memory_pool.py +43 -0
  62. witwin_maxwell-0.5.1/tests/fdtd/cuda/test_batch_observers.py +48 -0
  63. witwin_maxwell-0.5.1/tests/fdtd/cuda/test_batch_runtime.py +93 -0
  64. witwin_maxwell-0.5.1/tests/fdtd/cuda/test_batch_sources.py +45 -0
  65. witwin_maxwell-0.5.1/tests/fdtd/cuda/test_cuda_batch.py +127 -0
  66. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_graph.py +2 -2
  67. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_magnetic_parity.py +6 -0
  68. witwin_maxwell-0.5.1/tests/fdtd/cuda/test_cuda_prebuilt_abi.py +70 -0
  69. witwin_maxwell-0.5.1/tests/fdtd/cuda/test_cuda_toolkit_discovery.py +28 -0
  70. witwin_maxwell-0.5.1/tests/fdtd/cuda/test_cuda_wire_parity.py +368 -0
  71. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/torch_reference.py +21 -3
  72. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/_gpu_burner.py +29 -0
  73. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/_nccl_adjoint_worker.py +705 -0
  74. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/_nccl_forward_worker.py +225 -0
  75. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/_nccl_rankdeath_worker.py +84 -0
  76. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/_nccl_transport_adjoint_worker.py +266 -0
  77. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/_nccl_transport_worker.py +168 -0
  78. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/conftest.py +44 -0
  79. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_adjoint_parity.py +585 -0
  80. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_adjoint_parity_cpml.py +606 -0
  81. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_adjoint_parity_stress.py +297 -0
  82. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_adjoint_replay.py +354 -0
  83. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_bench_joint_cli.py +282 -0
  84. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_bounded_standard_dispatch.py +242 -0
  85. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_capacity_cpml_stats.py +237 -0
  86. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_circuit_owner.py +283 -0
  87. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_cuda_graph_device_binding.py +164 -0
  88. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_ensemble_executor.py +260 -0
  89. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_ensemble_network_sweep.py +110 -0
  90. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_ensemble_run_many.py +250 -0
  91. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_guard_regressions.py +577 -0
  92. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_material_region_forward.py +174 -0
  93. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_monitor_merge_ownership.py +437 -0
  94. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_monitor_numerical.py +245 -0
  95. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_nccl_transport.py +773 -0
  96. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_network_owner.py +621 -0
  97. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_numerical_matrix.py +418 -0
  98. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_parallel_public_api.py +271 -0
  99. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_partition.py +282 -0
  100. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_result_persistence.py +131 -0
  101. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_review_regressions.py +240 -0
  102. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_sharded_export.py +184 -0
  103. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_sharded_persistence.py +420 -0
  104. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_solver_acceptance.py +390 -0
  105. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_step_instrument.py +143 -0
  106. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_time_consumer_consistency.py +91 -0
  107. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_transport.py +231 -0
  108. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_transport_adjoint.py +247 -0
  109. witwin_maxwell-0.5.1/tests/fdtd/multi_gpu/test_wire_owner.py +612 -0
  110. witwin_maxwell-0.5.1/tests/fdtd/surface_impedance/test_surface_impedance_reference.py +208 -0
  111. witwin_maxwell-0.5.1/tests/fdtd/test_batch_audit_numerics.py +79 -0
  112. witwin_maxwell-0.5.1/tests/fdtd/test_batch_capacity_budget.py +73 -0
  113. witwin_maxwell-0.5.1/tests/fdtd/test_batch_coefficient_sharing.py +29 -0
  114. witwin_maxwell-0.5.1/tests/fdtd/test_batch_graph_pipeline.py +69 -0
  115. witwin_maxwell-0.5.1/tests/fdtd/test_batch_material_reuse.py +151 -0
  116. witwin_maxwell-0.5.1/tests/fdtd/test_batch_result_scene.py +44 -0
  117. witwin_maxwell-0.5.1/tests/fdtd/test_batch_selected_spectra.py +90 -0
  118. witwin_maxwell-0.5.1/tests/fdtd/test_batch_spectral_reuse.py +85 -0
  119. witwin_maxwell-0.5.1/tests/fdtd/test_batch_tuning.py +200 -0
  120. witwin_maxwell-0.5.1/tests/fdtd/test_capture_and_resume_state.py +117 -0
  121. witwin_maxwell-0.5.1/tests/fdtd/test_declared_drive_frequency.py +114 -0
  122. witwin_maxwell-0.5.1/tests/fdtd/test_observer_quadrature.py +68 -0
  123. witwin_maxwell-0.5.1/tests/fdtd/test_observer_time_stagger.py +245 -0
  124. witwin_maxwell-0.5.1/tests/fdtd/test_parallel_batch.py +237 -0
  125. witwin_maxwell-0.5.1/tests/fdtd/test_resume_configuration_identity.py +34 -0
  126. witwin_maxwell-0.5.1/tests/fdtd/test_state_composition_regressions.py +190 -0
  127. witwin_maxwell-0.5.1/tests/fdtd/test_time_consumer_consistency.py +192 -0
  128. witwin_maxwell-0.5.1/tests/fdtd/test_time_planning.py +135 -0
  129. witwin_maxwell-0.5.1/tests/fdtd/test_time_step_stability.py +192 -0
  130. witwin_maxwell-0.5.1/tests/fdtd/thin_wire/test_thin_wire_compiler.py +1024 -0
  131. witwin_maxwell-0.5.1/tests/fdtd/thin_wire/test_thin_wire_forward.py +1112 -0
  132. witwin_maxwell-0.5.1/tests/fdtd/thin_wire/test_thin_wire_lossy_forward.py +231 -0
  133. witwin_maxwell-0.5.1/tests/fdtd/thin_wire/test_thin_wire_port_binding_gpu.py +420 -0
  134. witwin_maxwell-0.5.1/tests/fdtd/thin_wire/test_thin_wire_reference.py +458 -0
  135. witwin_maxwell-0.5.1/tests/fdtd/thin_wire/test_thin_wire_rotation_acceptance.py +208 -0
  136. witwin_maxwell-0.5.1/tests/fdtd/thin_wire/test_wire_finite_conductivity.py +277 -0
  137. witwin_maxwell-0.5.1/tests/fdtd/thin_wire/test_wire_lossy_recurrence.py +295 -0
  138. witwin_maxwell-0.5.1/tests/gradients/e2e/__init__.py +0 -0
  139. witwin_maxwell-0.5.1/tests/gradients/finite_difference_gate.py +32 -0
  140. witwin_maxwell-0.5.1/tests/gradients/test_batch_adjoint.py +302 -0
  141. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/test_fdtd_adjoint_bridge.py +52 -7
  142. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/test_fdtd_adjoint_materials.py +139 -43
  143. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_anisotropic_material_pullback.py +60 -0
  144. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_circuit_adjoint.py +663 -0
  145. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_cpml_psi_active_adjoint.py +155 -0
  146. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_mixed_boundary_consistency.py +62 -0
  147. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_mur_adjoint.py +56 -0
  148. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_network_adjoint.py +502 -0
  149. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_rf_lumped_adjoint.py +797 -0
  150. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_tensor_current_adjoint.py +68 -0
  151. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_thin_wire_adjoint.py +543 -0
  152. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_thin_wire_conductivity_adjoint.py +172 -0
  153. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_thin_wire_port_adjoint.py +514 -0
  154. witwin_maxwell-0.5.1/tests/gradients/test_fdtd_waveport_adjoint.py +178 -0
  155. witwin_maxwell-0.5.1/tests/gradients/test_rf_postprocess_adjoint.py +181 -0
  156. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/anisotropic/test_fdtd_full_anisotropy.py +97 -27
  157. witwin_maxwell-0.5.1/tests/materials/anisotropic/test_fdtd_reciprocal_tensor_stability.py +117 -0
  158. witwin_maxwell-0.5.1/tests/materials/combinations/__init__.py +0 -0
  159. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_modulated_dispersive_nonlinear.py +6 -4
  160. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_rotated_birefringent_dispersive_slab.py +9 -27
  161. witwin_maxwell-0.5.1/tests/materials/compiler/test_batch_material_compiler.py +87 -0
  162. witwin_maxwell-0.5.1/tests/materials/compiler/test_batch_material_identity.py +18 -0
  163. witwin_maxwell-0.5.1/tests/materials/compiler/test_curved_subpixel_convergence.py +253 -0
  164. witwin_maxwell-0.5.1/tests/materials/compiler/test_edge_native_sampling.py +156 -0
  165. witwin_maxwell-0.5.1/tests/materials/compiler/test_inactive_material_storage.py +41 -0
  166. witwin_maxwell-0.5.1/tests/materials/compiler/test_local_material_cache.py +89 -0
  167. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_material_compiler.py +357 -0
  168. witwin_maxwell-0.5.1/tests/materials/compiler/test_pec_conformal_alignment.py +212 -0
  169. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_pec_conformal_nonuniform.py +13 -7
  170. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_subpixel_nonuniform.py +2 -1
  171. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/dispersive/test_custom_dispersive.py +41 -11
  172. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/dispersive/test_fdtd_dispersive.py +8 -4
  173. witwin_maxwell-0.5.1/tests/materials/ferrite/test_ferrite_reference.py +235 -0
  174. witwin_maxwell-0.5.1/tests/materials/ferrite/test_gyromagnetic_compiler.py +265 -0
  175. witwin_maxwell-0.5.1/tests/materials/ferrite/test_gyromagnetic_ferrite.py +262 -0
  176. witwin_maxwell-0.5.1/tests/materials/ferrite/test_gyromagnetic_forward.py +751 -0
  177. witwin_maxwell-0.5.1/tests/materials/ferrite/test_gyromagnetic_general_bias.py +628 -0
  178. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/sheet/test_lossy_metal.py +57 -62
  179. witwin_maxwell-0.5.1/tests/materials/sheet/test_surface_impedance_funnel.py +248 -0
  180. witwin_maxwell-0.5.1/tests/materials/surface_impedance/test_rational_surface_impedance.py +245 -0
  181. witwin_maxwell-0.5.1/tests/materials/surface_impedance/test_surface_impedance_ade.py +103 -0
  182. witwin_maxwell-0.5.1/tests/materials/surface_impedance/test_surface_impedance_resume.py +174 -0
  183. witwin_maxwell-0.5.1/tests/materials/surface_impedance/test_surface_impedance_runtime.py +131 -0
  184. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/monitors/observers/test_fdtd_observers.py +5 -5
  185. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/postprocess/scattering/test_mode_overlap.py +15 -9
  186. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/postprocess/scattering/test_ring_resonator_s21.py +19 -7
  187. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/postprocess/scattering/test_scattering_parameters.py +19 -4
  188. witwin_maxwell-0.5.1/tests/rational/test_core.py +213 -0
  189. witwin_maxwell-0.5.1/tests/rational/test_fit.py +83 -0
  190. witwin_maxwell-0.5.1/tests/rf/antenna/test_antenna_benchmark_e2e.py +203 -0
  191. witwin_maxwell-0.5.1/tests/rf/antenna/test_antenna_data.py +406 -0
  192. witwin_maxwell-0.5.1/tests/rf/antenna/test_antenna_matching_block.py +223 -0
  193. witwin_maxwell-0.5.1/tests/rf/antenna/test_result_antenna.py +253 -0
  194. witwin_maxwell-0.5.1/tests/rf/array/test_array_codebook.py +366 -0
  195. witwin_maxwell-0.5.1/tests/rf/array/test_array_contracts.py +696 -0
  196. witwin_maxwell-0.5.1/tests/rf/array/test_array_fullwave.py +287 -0
  197. witwin_maxwell-0.5.1/tests/rf/array/test_array_mimo.py +350 -0
  198. witwin_maxwell-0.5.1/tests/rf/array/test_array_persistence.py +262 -0
  199. witwin_maxwell-0.5.1/tests/rf/array/test_array_scene_gradient.py +605 -0
  200. witwin_maxwell-0.5.1/tests/rf/array/test_array_scene_gradient_ensemble.py +591 -0
  201. witwin_maxwell-0.5.1/tests/rf/circuits/test_circuit_conservation.py +438 -0
  202. witwin_maxwell-0.5.1/tests/rf/circuits/test_circuit_contract.py +156 -0
  203. witwin_maxwell-0.5.1/tests/rf/circuits/test_circuit_graph.py +150 -0
  204. witwin_maxwell-0.5.1/tests/rf/circuits/test_circuit_hot_path_op_count.py +163 -0
  205. witwin_maxwell-0.5.1/tests/rf/circuits/test_circuit_independent_crosscheck.py +411 -0
  206. witwin_maxwell-0.5.1/tests/rf/circuits/test_fdtd_circuit_coupling.py +449 -0
  207. witwin_maxwell-0.5.1/tests/rf/circuits/test_fdtd_circuit_resume.py +206 -0
  208. witwin_maxwell-0.5.1/tests/rf/circuits/test_mna_runtime.py +630 -0
  209. witwin_maxwell-0.5.1/tests/rf/circuits/test_phase3_multiport.py +442 -0
  210. witwin_maxwell-0.5.1/tests/rf/circuits/test_phase4_batched_mna.py +70 -0
  211. witwin_maxwell-0.5.1/tests/rf/circuits/test_phase4_circuit_cuda_graph.py +239 -0
  212. witwin_maxwell-0.5.1/tests/rf/circuits/test_result_circuit_data.py +219 -0
  213. witwin_maxwell-0.5.1/tests/rf/circuits/test_spice_parser.py +238 -0
  214. witwin_maxwell-0.5.1/tests/rf/contracts/test_network_data_contract.py +169 -0
  215. witwin_maxwell-0.5.1/tests/rf/contracts/test_port_conventions.py +144 -0
  216. witwin_maxwell-0.5.1/tests/rf/contracts/test_port_geometry_contract.py +101 -0
  217. witwin_maxwell-0.5.1/tests/rf/contracts/test_public_rf_api.py +121 -0
  218. witwin_maxwell-0.5.1/tests/rf/contracts/test_wire_port_binding_api.py +92 -0
  219. witwin_maxwell-0.5.1/tests/rf/lumped/test_fdtd_lumped_port_pec_gap.py +78 -0
  220. witwin_maxwell-0.5.1/tests/rf/lumped/test_fdtd_lumped_runtime.py +413 -0
  221. witwin_maxwell-0.5.1/tests/rf/lumped/test_fdtd_port_end_to_end.py +272 -0
  222. witwin_maxwell-0.5.1/tests/rf/lumped/test_port_data_persistence.py +106 -0
  223. witwin_maxwell-0.5.1/tests/rf/lumped/test_port_source_waveform.py +39 -0
  224. witwin_maxwell-0.5.1/tests/rf/lumped/test_result_port_data.py +146 -0
  225. witwin_maxwell-0.5.1/tests/rf/lumped/test_rlc_contract.py +101 -0
  226. witwin_maxwell-0.5.1/tests/rf/lumped/test_rlc_discretization.py +123 -0
  227. witwin_maxwell-0.5.1/tests/rf/lumped/test_scene_lumped_elements.py +141 -0
  228. witwin_maxwell-0.5.1/tests/rf/lumped/test_simulation_port_excitation.py +97 -0
  229. witwin_maxwell-0.5.1/tests/rf/network/fixtures/four_port_db.s4p +6 -0
  230. witwin_maxwell-0.5.1/tests/rf/network/fixtures/one_port_ri.s1p +4 -0
  231. witwin_maxwell-0.5.1/tests/rf/network/fixtures/two_port_ma.ts +12 -0
  232. witwin_maxwell-0.5.1/tests/rf/network/test_embedded_network_persistence.py +286 -0
  233. witwin_maxwell-0.5.1/tests/rf/network/test_finalize_state_norm_detach.py +68 -0
  234. witwin_maxwell-0.5.1/tests/rf/network/test_network_algebra.py +261 -0
  235. witwin_maxwell-0.5.1/tests/rf/network/test_network_block_contract.py +247 -0
  236. witwin_maxwell-0.5.1/tests/rf/network/test_network_cascade.py +290 -0
  237. witwin_maxwell-0.5.1/tests/rf/network/test_network_cascade_crosscheck.py +193 -0
  238. witwin_maxwell-0.5.1/tests/rf/network/test_network_conservation.py +268 -0
  239. witwin_maxwell-0.5.1/tests/rf/network/test_network_coupling_op_stream.py +74 -0
  240. witwin_maxwell-0.5.1/tests/rf/network/test_network_delay.py +384 -0
  241. witwin_maxwell-0.5.1/tests/rf/network/test_network_delay_checkpoint.py +157 -0
  242. witwin_maxwell-0.5.1/tests/rf/network/test_network_delay_integration.py +293 -0
  243. witwin_maxwell-0.5.1/tests/rf/network/test_network_multiport_fdtd.py +291 -0
  244. witwin_maxwell-0.5.1/tests/rf/network/test_network_multiport_runtime.py +380 -0
  245. witwin_maxwell-0.5.1/tests/rf/network/test_network_observer_hot_path.py +246 -0
  246. witwin_maxwell-0.5.1/tests/rf/network/test_network_persistence.py +115 -0
  247. witwin_maxwell-0.5.1/tests/rf/network/test_network_physicality.py +79 -0
  248. witwin_maxwell-0.5.1/tests/rf/network/test_network_runtime.py +457 -0
  249. witwin_maxwell-0.5.1/tests/rf/network/test_network_sweep.py +374 -0
  250. witwin_maxwell-0.5.1/tests/rf/network/test_touchstone.py +246 -0
  251. witwin_maxwell-0.5.1/tests/rf/network/test_touchstone_import.py +383 -0
  252. witwin_maxwell-0.5.1/tests/rf/nonlinear/_generate_goldens.py +104 -0
  253. witwin_maxwell-0.5.1/tests/rf/nonlinear/_rectifier_fixtures.py +130 -0
  254. witwin_maxwell-0.5.1/tests/rf/nonlinear/goldens/rectifier_goldens.pt +0 -0
  255. witwin_maxwell-0.5.1/tests/rf/nonlinear/test_newton_core.py +220 -0
  256. witwin_maxwell-0.5.1/tests/rf/nonlinear/test_nonlinear_device_contract.py +151 -0
  257. witwin_maxwell-0.5.1/tests/rf/nonlinear/test_nonlinear_device_math.py +102 -0
  258. witwin_maxwell-0.5.1/tests/rf/nonlinear/test_nonlinear_transient.py +332 -0
  259. witwin_maxwell-0.5.1/tests/rf/numerics/test_port_spectral_stagger.py +92 -0
  260. witwin_maxwell-0.5.1/tests/rf/numerics/test_tem_vi_prototype.py +88 -0
  261. witwin_maxwell-0.5.1/tests/rf/performance/measure_port_overhead_s2b.py +522 -0
  262. witwin_maxwell-0.5.1/tests/rf/performance/profile_port_hot_path.py +444 -0
  263. witwin_maxwell-0.5.1/tests/rf/performance/test_no_feature_fast_path.py +23 -0
  264. witwin_maxwell-0.5.1/tests/rf/performance/test_perf_variance_gate.py +160 -0
  265. witwin_maxwell-0.5.1/tests/rf/performance/test_port_energy_diagnostics_default_off.py +99 -0
  266. witwin_maxwell-0.5.1/tests/rf/performance/test_port_hot_path_op_count.py +128 -0
  267. witwin_maxwell-0.5.1/tests/rf/power_loss/test_power_loss_data.py +454 -0
  268. witwin_maxwell-0.5.1/tests/rf/terminal/test_terminal_port_contract.py +253 -0
  269. witwin_maxwell-0.5.1/tests/rf/wave_validation/__init__.py +0 -0
  270. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_asymmetric_reciprocity_power_balance.py +160 -0
  271. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_coax_contour_snap.py +37 -0
  272. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_interior_pec_operator.py +503 -0
  273. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_matched_s11_wave_level.py +98 -0
  274. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_microstrip_diffpair_wave_level.py +178 -0
  275. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_open_short_match_wave_level.py +154 -0
  276. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_planemonitor_waveport_passthrough.py +215 -0
  277. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_rf_reference_generation.py +158 -0
  278. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_rlc_resonance_wave_level.py +181 -0
  279. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_te10_mode_selection.py +132 -0
  280. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_transverse_operator.py +450 -0
  281. witwin_maxwell-0.5.1/tests/rf/wave_validation/test_waveguide_wave_level.py +114 -0
  282. witwin_maxwell-0.5.1/tests/rf/waveport/test_modal_port_data.py +136 -0
  283. witwin_maxwell-0.5.1/tests/rf/waveport/test_mode_tracking.py +205 -0
  284. witwin_maxwell-0.5.1/tests/rf/waveport/test_waveport_contract.py +471 -0
  285. witwin_maxwell-0.5.1/tests/rf/waveport/test_waveport_sweep.py +451 -0
  286. witwin_maxwell-0.5.1/tests/sar/test_incident_power.py +228 -0
  287. witwin_maxwell-0.5.1/tests/sar/test_mass_averaging.py +404 -0
  288. witwin_maxwell-0.5.1/tests/sar/test_mass_density.py +114 -0
  289. witwin_maxwell-0.5.1/tests/sar/test_normalization.py +123 -0
  290. witwin_maxwell-0.5.1/tests/sar/test_phantom_benchmarks.py +175 -0
  291. witwin_maxwell-0.5.1/tests/sar/test_phantom_convergence.py +122 -0
  292. witwin_maxwell-0.5.1/tests/sar/test_point_sar.py +406 -0
  293. witwin_maxwell-0.5.1/tests/sar/test_sar_combine.py +120 -0
  294. witwin_maxwell-0.5.1/tests/sar/test_sar_gradients.py +154 -0
  295. witwin_maxwell-0.5.1/tests/sar/test_sar_validation.py +85 -0
  296. witwin_maxwell-0.5.1/tests/sar/test_soft_peak.py +106 -0
  297. witwin_maxwell-0.5.1/tests/sources/current/test_full_tensor_current_contraction.py +101 -0
  298. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/mode/test_fdtd_anisotropic_aperture.py +4 -2
  299. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/mode/test_fdtd_bent_mode_source.py +11 -2
  300. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/mode/test_fdtd_broadband_mode_source.py +4 -3
  301. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/mode/test_fdtd_complex_lossy_slab_mode.py +5 -1
  302. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/mode/test_fdtd_mode_source.py +4 -3
  303. witwin_maxwell-0.5.1/tests/sources/mode/test_fdtd_pec_mode_solver.py +146 -0
  304. witwin_maxwell-0.5.1/tests/sources/mode/test_fdtd_unidirectional_launch.py +175 -0
  305. witwin_maxwell-0.5.1/tests/sources/mode/test_mode_eigensolver_physics.py +279 -0
  306. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/mode/test_mode_solver_gradients.py +67 -10
  307. witwin_maxwell-0.5.1/tests/sources/mode/test_mode_source_injection_physics.py +188 -0
  308. witwin_maxwell-0.5.1/tests/sources/mode/test_scalar_operator_layout.py +44 -0
  309. witwin_maxwell-0.5.1/tests/support/benchmark_circuit_performance.py +564 -0
  310. witwin_maxwell-0.5.1/tests/support/benchmark_ensemble_speedup.py +239 -0
  311. witwin_maxwell-0.5.1/tests/support/benchmark_network_embedding.py +260 -0
  312. witwin_maxwell-0.5.1/tests/support/benchmark_rf_no_feature.py +843 -0
  313. witwin_maxwell-0.5.1/tests/support/benchmark_thin_wire_reverse.py +159 -0
  314. witwin_maxwell-0.5.1/tests/support/compare_no_feature_op_stream.py +475 -0
  315. witwin_maxwell-0.5.1/tests/support/network_coupling_op_stream.py +280 -0
  316. witwin_maxwell-0.5.1/tests/support/perf_variance_gate.py +185 -0
  317. witwin_maxwell-0.5.1/tests/support/port_hot_path_tally.py +88 -0
  318. witwin_maxwell-0.5.1/tests/support/test_benchmark_circuit_performance.py +66 -0
  319. witwin_maxwell-0.5.1/tests/support/test_benchmark_rf_no_feature_provenance.py +232 -0
  320. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_autogrid_subpixel_thesis.py +27 -3
  321. witwin_maxwell-0.5.1/tests/validation/physics/test_fdtd_material_wave_convergence.py +46 -0
  322. witwin_maxwell-0.5.1/tests/validation/physics/test_pec_conformal.py +207 -0
  323. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_postprocess_end_to_end_validation.py +40 -8
  324. witwin_maxwell-0.5.1/tests/validation/physics/test_sibc_cylinder_convergence.py +220 -0
  325. witwin_maxwell-0.5.1/tests/validation/physics/test_sibc_orientation.py +218 -0
  326. witwin_maxwell-0.5.1/tests/validation/physics/test_sibc_staircase.py +276 -0
  327. witwin_maxwell-0.5.1/tests/validation/physics/test_sibc_zero_impact.py +124 -0
  328. witwin_maxwell-0.5.1/tests/validation/physics/test_surface_impedance_broadband.py +141 -0
  329. witwin_maxwell-0.5.1/witwin/maxwell/__init__.py +451 -0
  330. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/adapters/tidy3d.py +362 -17
  331. witwin_maxwell-0.5.1/witwin/maxwell/adjoint_inputs.py +207 -0
  332. witwin_maxwell-0.5.1/witwin/maxwell/antenna.py +307 -0
  333. witwin_maxwell-0.5.1/witwin/maxwell/array.py +1599 -0
  334. witwin_maxwell-0.5.1/witwin/maxwell/array_execution.py +67 -0
  335. witwin_maxwell-0.5.1/witwin/maxwell/array_gradient.py +375 -0
  336. witwin_maxwell-0.5.1/witwin/maxwell/breakdown.py +104 -0
  337. witwin_maxwell-0.5.1/witwin/maxwell/breakdown_risk.py +310 -0
  338. witwin_maxwell-0.5.1/witwin/maxwell/breakdown_stress.py +542 -0
  339. witwin_maxwell-0.5.1/witwin/maxwell/circuit_devices.py +292 -0
  340. witwin_maxwell-0.5.1/witwin/maxwell/circuits.py +1481 -0
  341. witwin_maxwell-0.5.1/witwin/maxwell/compiler/__init__.py +104 -0
  342. witwin_maxwell-0.5.1/witwin/maxwell/compiler/array.py +369 -0
  343. witwin_maxwell-0.5.1/witwin/maxwell/compiler/breakdown.py +151 -0
  344. witwin_maxwell-0.5.1/witwin/maxwell/compiler/circuits.py +320 -0
  345. witwin_maxwell-0.5.1/witwin/maxwell/compiler/delay.py +374 -0
  346. witwin_maxwell-0.5.1/witwin/maxwell/compiler/electrostatic.py +379 -0
  347. witwin_maxwell-0.5.1/witwin/maxwell/compiler/gyromagnetic.py +356 -0
  348. witwin_maxwell-0.5.1/witwin/maxwell/compiler/lumped.py +100 -0
  349. witwin_maxwell-0.5.1/witwin/maxwell/compiler/mass_density.py +139 -0
  350. witwin_maxwell-0.5.1/witwin/maxwell/compiler/materials.py +2879 -0
  351. witwin_maxwell-0.5.1/witwin/maxwell/compiler/mna.py +1085 -0
  352. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/compiler/monitors.py +80 -4
  353. witwin_maxwell-0.5.1/witwin/maxwell/compiler/networks.py +318 -0
  354. witwin_maxwell-0.5.1/witwin/maxwell/compiler/nonlinear_devices.py +916 -0
  355. witwin_maxwell-0.5.1/witwin/maxwell/compiler/ports.py +391 -0
  356. witwin_maxwell-0.5.1/witwin/maxwell/compiler/power_loss.py +175 -0
  357. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/compiler/sources.py +1 -0
  358. witwin_maxwell-0.5.1/witwin/maxwell/compiler/structures.py +21 -0
  359. witwin_maxwell-0.5.1/witwin/maxwell/compiler/subpixel.py +107 -0
  360. witwin_maxwell-0.5.1/witwin/maxwell/compiler/surface_impedance.py +275 -0
  361. witwin_maxwell-0.5.1/witwin/maxwell/compiler/thin_wire.py +2201 -0
  362. witwin_maxwell-0.5.1/witwin/maxwell/compiler/waveports.py +435 -0
  363. witwin_maxwell-0.5.1/witwin/maxwell/compiler/wire_impedance.py +426 -0
  364. witwin_maxwell-0.5.1/witwin/maxwell/constants.py +92 -0
  365. witwin_maxwell-0.5.1/witwin/maxwell/electrostatic/__init__.py +39 -0
  366. witwin_maxwell-0.5.1/witwin/maxwell/electrostatic/api.py +224 -0
  367. witwin_maxwell-0.5.1/witwin/maxwell/electrostatic/capacitance.py +433 -0
  368. witwin_maxwell-0.5.1/witwin/maxwell/electrostatic/initial_condition.py +305 -0
  369. witwin_maxwell-0.5.1/witwin/maxwell/electrostatic/runtime.py +878 -0
  370. witwin_maxwell-0.5.1/witwin/maxwell/esd.py +854 -0
  371. witwin_maxwell-0.5.1/witwin/maxwell/execution/__init__.py +45 -0
  372. witwin_maxwell-0.5.1/witwin/maxwell/execution/adjoint.py +143 -0
  373. witwin_maxwell-0.5.1/witwin/maxwell/execution/batch.py +336 -0
  374. witwin_maxwell-0.5.1/witwin/maxwell/execution/batch_runtime.py +1156 -0
  375. witwin_maxwell-0.5.1/witwin/maxwell/execution/capacity.py +166 -0
  376. witwin_maxwell-0.5.1/witwin/maxwell/execution/ensemble.py +187 -0
  377. witwin_maxwell-0.5.1/witwin/maxwell/execution/executor.py +230 -0
  378. witwin_maxwell-0.5.1/witwin/maxwell/execution/plan.py +264 -0
  379. witwin_maxwell-0.5.1/witwin/maxwell/execution/pool.py +262 -0
  380. witwin_maxwell-0.5.1/witwin/maxwell/execution/records.py +244 -0
  381. witwin_maxwell-0.5.1/witwin/maxwell/execution/tuning.py +197 -0
  382. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdfd/solver.py +12 -0
  383. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/__init__.py +10 -0
  384. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/adjoint/bridge.py +1516 -0
  385. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/adjoint/capabilities.py +2 -0
  386. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/adjoint/circuits.py +708 -0
  387. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/adjoint/core.py +712 -684
  388. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/adjoint/dispatch.py +87 -22
  389. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/adjoint/native.py +383 -124
  390. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/adjoint/profiler.py +3 -0
  391. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/adjoint/reverse_common.py +155 -7
  392. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/adjoint/seeds.py +441 -9
  393. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/boundary/cpml.py +0 -22
  394. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/boundary/mur.py +60 -0
  395. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/boundary/runtime.py +22 -20
  396. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/checkpoint.py +632 -0
  397. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/circuits.py +1209 -0
  398. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/backend.py +204 -9
  399. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/build.py +50 -12
  400. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/extension.cpp +238 -28
  401. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/adjoint.cu +862 -1541
  402. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/aniso.cu +68 -71
  403. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/boundary.cu +10 -16
  404. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/cuda/kernels/common.cu +166 -0
  405. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/cuda/kernels/common.cuh +243 -0
  406. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/electric.cu +1113 -876
  407. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/magnetic.cu +388 -117
  408. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/observers.cu +131 -0
  409. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/sources.cu +83 -0
  410. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/spectral.cu +30 -21
  411. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/cuda/kernels/wire.cu +493 -0
  412. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/cuda/runtime/graph.py +176 -0
  413. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/tensors.h +20 -0
  414. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/delay.py +269 -0
  415. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/__init__.py +10 -0
  416. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/_shared.py +65 -0
  417. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/adjoint.py +1661 -0
  418. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/capacity.py +87 -0
  419. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/circuits.py +609 -0
  420. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/counts.py +25 -0
  421. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/frequency_counts.py +24 -0
  422. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/instrumentation.py +199 -0
  423. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/interpolation.py +35 -0
  424. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/monitor_merge.py +421 -0
  425. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/nccl_transport.py +841 -0
  426. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/networks.py +640 -0
  427. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/output.py +49 -0
  428. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/persistence.py +880 -0
  429. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/shard_engine.py +468 -0
  430. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/solver.py +1326 -0
  431. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/source_corrections.py +51 -0
  432. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/source_rebuild.py +76 -0
  433. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/sources.py +77 -0
  434. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/transport.py +532 -0
  435. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/distributed/wire.py +625 -0
  436. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/excitation/injection.py +138 -8
  437. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/excitation/modes/__init__.py +963 -0
  438. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/excitation/modes/common.py +592 -0
  439. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/excitation/modes/eigensolvers.py +310 -0
  440. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/excitation/modes/tem.py +354 -0
  441. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/excitation/modes/vector.py +1113 -0
  442. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/excitation/modes/yee.py +958 -0
  443. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/excitation/temporal.py +75 -32
  444. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/ferrite_reference.py +403 -0
  445. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/lumped.py +915 -0
  446. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/material_pullback.py +58 -18
  447. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/networks.py +1264 -0
  448. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/observers.py +328 -197
  449. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/ports.py +2082 -0
  450. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/postprocess.py +6 -9
  451. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/quadrature.py +233 -0
  452. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/resume.py +738 -0
  453. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/runtime/__init__.py +14 -0
  454. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/runtime/batch.py +216 -0
  455. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/runtime/breakdown.py +533 -0
  456. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/runtime/gyromagnetic.py +469 -0
  457. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/runtime/initialization.py +51 -11
  458. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/runtime/materials.py +669 -430
  459. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/runtime/module_cache.py +5 -1
  460. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/runtime/spectral.py +168 -153
  461. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/runtime/stepping.py +529 -110
  462. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/runtime/timeplan.py +109 -0
  463. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/runtime/timestep.py +186 -0
  464. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/solver.py +48 -6
  465. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/surface_impedance_reference.py +349 -0
  466. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/thin_wire_reference.py +388 -0
  467. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/wire.py +1377 -0
  468. witwin_maxwell-0.5.1/witwin/maxwell/fdtd/wire_lossy.py +627 -0
  469. witwin_maxwell-0.5.1/witwin/maxwell/fdtd_parallel.py +699 -0
  470. witwin_maxwell-0.5.1/witwin/maxwell/lumped.py +534 -0
  471. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/media.py +945 -19
  472. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/monitors.py +357 -1
  473. witwin_maxwell-0.5.1/witwin/maxwell/network.py +1613 -0
  474. witwin_maxwell-0.5.1/witwin/maxwell/network_math.py +339 -0
  475. witwin_maxwell-0.5.1/witwin/maxwell/network_sweep.py +324 -0
  476. witwin_maxwell-0.5.1/witwin/maxwell/ports.py +932 -0
  477. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/postprocess/RCS.py +4 -3
  478. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/postprocess/__init__.py +9 -0
  479. witwin_maxwell-0.5.1/witwin/maxwell/postprocess/antenna.py +712 -0
  480. witwin_maxwell-0.5.1/witwin/maxwell/postprocess/array.py +439 -0
  481. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/postprocess/diffraction.py +4 -6
  482. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/postprocess/directivity.py +3 -2
  483. witwin_maxwell-0.5.1/witwin/maxwell/postprocess/incident_power.py +200 -0
  484. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/postprocess/modal.py +14 -8
  485. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/postprocess/nfft.py +4 -5
  486. witwin_maxwell-0.5.1/witwin/maxwell/postprocess/power_loss.py +498 -0
  487. witwin_maxwell-0.5.1/witwin/maxwell/postprocess/sar.py +371 -0
  488. witwin_maxwell-0.5.1/witwin/maxwell/postprocess/sar_averaging.py +295 -0
  489. witwin_maxwell-0.5.1/witwin/maxwell/postprocess/sar_combine.py +289 -0
  490. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/postprocess/scattering_parameters.py +15 -3
  491. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/postprocess/stratton_chu.py +108 -32
  492. witwin_maxwell-0.5.1/witwin/maxwell/postprocess/waveports.py +432 -0
  493. witwin_maxwell-0.5.1/witwin/maxwell/power_loss.py +451 -0
  494. witwin_maxwell-0.5.1/witwin/maxwell/rational.py +1409 -0
  495. witwin_maxwell-0.5.1/witwin/maxwell/result.py +2241 -0
  496. witwin_maxwell-0.5.1/witwin/maxwell/sar.py +524 -0
  497. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/scene.py +413 -25
  498. witwin_maxwell-0.5.1/witwin/maxwell/simulation.py +1981 -0
  499. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/sources.py +40 -44
  500. witwin_maxwell-0.5.1/witwin/maxwell/thin_wire.py +491 -0
  501. witwin_maxwell-0.5.1/witwin/maxwell/touchstone.py +918 -0
  502. witwin_maxwell-0.5.1/witwin/maxwell/waveforms.py +107 -0
  503. witwin_maxwell-0.5.1/witwin/maxwell/waveport_sweep.py +937 -0
  504. witwin_maxwell-0.3.0/FEATURE_LIST.md +0 -432
  505. witwin_maxwell-0.3.0/docs/releases/0.3.0.md +0 -27
  506. witwin_maxwell-0.3.0/docs/validation/tidy3d-numerical-alignment-0.3.0.md +0 -130
  507. witwin_maxwell-0.3.0/tests/api/public/test_guard_census.py +0 -184
  508. witwin_maxwell-0.3.0/tests/validation/physics/test_pec_conformal.py +0 -90
  509. witwin_maxwell-0.3.0/witwin/maxwell/__init__.py +0 -164
  510. witwin_maxwell-0.3.0/witwin/maxwell/adjoint_inputs.py +0 -70
  511. witwin_maxwell-0.3.0/witwin/maxwell/compiler/__init__.py +0 -11
  512. witwin_maxwell-0.3.0/witwin/maxwell/compiler/materials.py +0 -1355
  513. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/__init__.py +0 -4
  514. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/adjoint/bridge.py +0 -746
  515. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/checkpoint.py +0 -227
  516. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/kernels/common.cu +0 -74
  517. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/kernels/common.cuh +0 -82
  518. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/runtime/graph.py +0 -33
  519. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/excitation/modes.py +0 -1675
  520. witwin_maxwell-0.3.0/witwin/maxwell/ports.py +0 -113
  521. witwin_maxwell-0.3.0/witwin/maxwell/result.py +0 -967
  522. witwin_maxwell-0.3.0/witwin/maxwell/simulation.py +0 -659
  523. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/LICENSE +0 -0
  524. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/hatch_build.py +0 -0
  525. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/scripts/perf_cuda_graph_dispersive.py +0 -0
  526. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/TEST_LAYOUT.md +0 -0
  527. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/__init__.py +0 -0
  528. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/api/adapters/gds/test_gds_adapter.py +0 -0
  529. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/api/public/test_dependency_contract.py +0 -0
  530. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/boundaries/absorbers/test_boundary_variants.py +0 -0
  531. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/boundaries/boundary_physics/test_fdtd_pec_material.py +0 -0
  532. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/boundaries/boundary_specs/test_fdtd_boundaries.py +0 -0
  533. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/boundaries/cpml/test_fdtd_cpml.py +0 -0
  534. {witwin_maxwell-0.3.0/tests/fdtd → witwin_maxwell-0.5.1/tests/breakdown}/__init__.py +0 -0
  535. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/conftest.py +0 -0
  536. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/core/geometry/test_mesh_geometry.py +0 -0
  537. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/core/grid/test_autogrid.py +0 -0
  538. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/core/grid/test_fdtd_coords.py +0 -0
  539. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/core/grid/test_nonuniform_placement.py +0 -0
  540. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/core/grid/test_nonuniform_uniform_equivalence.py +0 -0
  541. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/core/scene/test_scene.py +0 -0
  542. {witwin_maxwell-0.3.0/tests/fdtd/cuda → witwin_maxwell-0.5.1/tests/electrostatic}/__init__.py +0 -0
  543. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdfd/test_ams.py +0 -0
  544. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdfd/test_direct_solver.py +0 -0
  545. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdfd/test_krylov.py +0 -0
  546. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdfd/test_matrix_cache.py +0 -0
  547. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdfd/test_preconditioners.py +0 -0
  548. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdfd/test_symmetric_formulation.py +0 -0
  549. {witwin_maxwell-0.3.0/tests/gradients/e2e → witwin_maxwell-0.5.1/tests/fdtd}/__init__.py +0 -0
  550. {witwin_maxwell-0.3.0/tests/materials/combinations → witwin_maxwell-0.5.1/tests/fdtd/cuda}/__init__.py +0 -0
  551. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/_parity_backend.py +0 -0
  552. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_adjoint_native.py +0 -0
  553. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_common_parity.py +0 -0
  554. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_cpml_extension_parity.py +0 -0
  555. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_dispersive_parity.py +0 -0
  556. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_electric_boundary_parity.py +0 -0
  557. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_extension_load.py +0 -0
  558. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_sources_parity.py +0 -0
  559. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/cuda/test_cuda_spectral_observer_parity.py +0 -0
  560. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/test_cuda_graph.py +0 -0
  561. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/test_cuda_graph_capture_coverage.py +0 -0
  562. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/test_cuda_graph_complex_bloch.py +0 -0
  563. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/test_cuda_graph_dispersive.py +0 -0
  564. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/test_cuda_graph_nonlinear.py +0 -0
  565. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/test_cuda_graph_tfsf.py +0 -0
  566. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/test_cuda_graph_tfsf_slab.py +0 -0
  567. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/fdtd/test_fdtd_autoshutoff.py +0 -0
  568. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/README.md +0 -0
  569. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/__init__.py +0 -0
  570. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/e2e/test_fdtd_two_port_sparam_optimization.py +0 -0
  571. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/fdtd_adjoint_baselines.py +0 -0
  572. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/test_fdfd_adjoint.py +0 -0
  573. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/test_fdtd_adjoint_p6_acceptance.py +0 -0
  574. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/test_fdtd_adjoint_rigorous.py +0 -0
  575. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/test_fdtd_custom_source_adjoint.py +0 -0
  576. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/test_fdtd_mode_source_adjoint.py +0 -0
  577. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/gradients/test_fdtd_multisource_adjoint.py +0 -0
  578. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/__init__.py +0 -0
  579. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_aniso_pml_overlap_reflection.py +0 -0
  580. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_bloch_dispersive_forward.py +0 -0
  581. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_combination_matrix.py +0 -0
  582. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_diagonal_aniso_dispersive.py +0 -0
  583. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_lossy_anisotropic_slab.py +0 -0
  584. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_modulated_slab_cpml.py +0 -0
  585. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_mu_tensor_dispersion.py +0 -0
  586. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_multi_frequency_modulation.py +0 -0
  587. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/combinations/test_shg_dispersive_phase_matching.py +0 -0
  588. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_fdfd_material_support.py +0 -0
  589. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_pec_material.py +0 -0
  590. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_polarized_averaging.py +0 -0
  591. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_polyslab.py +0 -0
  592. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_subpixel_gradients.py +0 -0
  593. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_subpixel_normals.py +0 -0
  594. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/compiler/test_subpixel_spec.py +0 -0
  595. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/conductive/test_fdtd_conductive.py +0 -0
  596. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/conductive/test_fdtd_magnetic_conductive.py +0 -0
  597. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/dispersive/test_fdtd_gain.py +0 -0
  598. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/dispersive/test_fdtd_sellmeier.py +0 -0
  599. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/modulation/test_fdtd_modulation.py +0 -0
  600. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/nonlinear/test_fdtd_nonlinear.py +0 -0
  601. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/perturbation/test_perturbation_medium.py +0 -0
  602. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/sheet/__init__.py +0 -0
  603. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/sheet/sheet_measurement.py +0 -0
  604. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/sheet/test_fdtd_graphene.py +0 -0
  605. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/materials/sheet/test_fdtd_medium2d.py +0 -0
  606. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/monitors/diffraction/test_diffraction_monitor.py +0 -0
  607. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/monitors/emission/test_dipole_emission_monitor.py +0 -0
  608. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/monitors/material/test_permittivity_monitor.py +0 -0
  609. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/monitors/time/test_fdtd_time_monitors.py +0 -0
  610. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/postprocess/directivity/test_directivity.py +0 -0
  611. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/postprocess/evaluation/test_fdtd_evaluation.py +0 -0
  612. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/postprocess/rcs/test_postprocess.py +0 -0
  613. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/definitions/test_astigmatic_gaussian_beam.py +0 -0
  614. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/definitions/test_custom_source_time.py +0 -0
  615. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/definitions/test_custom_uniform_sources.py +0 -0
  616. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/definitions/test_sources.py +0 -0
  617. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/incident/test_fdtd_incident.py +0 -0
  618. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/incident/test_soft_planewave_absolute_power.py +0 -0
  619. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/point/test_fdtd_source_normalization.py +0 -0
  620. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/point/test_fdtd_sources.py +0 -0
  621. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/tfsf/test_fdtd_grating_pulsed_bloch.py +0 -0
  622. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/tfsf/test_fdtd_grating_tfsf.py +0 -0
  623. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/sources/tfsf/test_fdtd_tfsf.py +0 -0
  624. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/cross_solver/test_fdfd_vs_fdtd.py +0 -0
  625. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_autogrid_physics.py +0 -0
  626. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_bloch_broadband_vs_cw.py +0 -0
  627. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_dispersive_metasurface_bloch.py +0 -0
  628. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_fdtd_boundary_tfsf_validation.py +0 -0
  629. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_fdtd_physics_correctness.py +0 -0
  630. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_layered_exterior_huygens_validation.py +0 -0
  631. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_lossy_metal_sibc.py +0 -0
  632. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_nonuniform_grid_physics.py +0 -0
  633. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_soft_planewave_graded.py +0 -0
  634. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/tests/validation/physics/test_tfsf_nonuniform.py +0 -0
  635. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/adapters/__init__.py +0 -0
  636. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/adapters/gds.py +0 -0
  637. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdfd/__init__.py +0 -0
  638. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdfd/adjoint/__init__.py +0 -0
  639. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdfd/adjoint/bridge.py +0 -0
  640. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdfd/ams.py +0 -0
  641. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdfd/krylov.py +0 -0
  642. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdfd/plotting.py +0 -0
  643. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdfd/postprocess.py +0 -0
  644. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/adjoint/__init__.py +0 -0
  645. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/boundary/__init__.py +0 -0
  646. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/boundary/bloch.py +0 -0
  647. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/boundary/common.py +0 -0
  648. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/coords.py +0 -0
  649. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/__init__.py +0 -0
  650. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/dispersive.cu +0 -0
  651. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/kernels/projection.cu +0 -0
  652. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/launch.h +0 -0
  653. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/runtime/__init__.py +0 -0
  654. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/cuda/runtime/dispatcher.py +0 -0
  655. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/dispersion.py +0 -0
  656. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/evaluation.py +0 -0
  657. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/excitation/__init__.py +0 -0
  658. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/excitation/spatial.py +0 -0
  659. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/excitation/tfsf_apply.py +0 -0
  660. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/excitation/tfsf_common.py +0 -0
  661. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/excitation/tfsf_specs.py +0 -0
  662. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/excitation/tfsf_state.py +0 -0
  663. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/io.py +0 -0
  664. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/meshing/__init__.py +0 -0
  665. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/meshing/autogrid.py +0 -0
  666. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/fdtd/plotting.py +0 -0
  667. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/geometry/__init__.py +0 -0
  668. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/geometry/polyslab.py +0 -0
  669. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/materials.py +0 -0
  670. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/postprocess/emission.py +0 -0
  671. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/visualization/__init__.py +0 -0
  672. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/visualization/interactive.py +0 -0
  673. {witwin_maxwell-0.3.0 → witwin_maxwell-0.5.1}/witwin/maxwell/visualization/plots.py +0 -0
@@ -5,14 +5,13 @@ on:
5
5
  branches:
6
6
  - master
7
7
  - "codex/**"
8
+ tags:
9
+ - "witwin-maxwell-v*"
8
10
  pull_request:
9
- release:
10
- types: [published]
11
11
  workflow_dispatch:
12
12
 
13
13
  jobs:
14
14
  validate_release:
15
- if: github.event_name != 'release' || (startsWith(github.event.release.tag_name, 'witwin-maxwell-v') && !github.event.release.prerelease)
16
15
  name: Validate release
17
16
  runs-on: ubuntu-latest
18
17
  outputs:
@@ -41,11 +40,11 @@ jobs:
41
40
  fi
42
41
 
43
42
  - name: Validate release tag and package version
44
- if: github.event_name == 'release'
43
+ if: startsWith(github.ref, 'refs/tags/witwin-maxwell-v')
45
44
  shell: bash
46
45
  env:
47
46
  PACKAGE_DIR: ${{ steps.package_dir.outputs.path }}
48
- RELEASE_TAG: ${{ github.event.release.tag_name }}
47
+ RELEASE_TAG: ${{ github.ref_name }}
49
48
  run: |
50
49
  python - <<'PY'
51
50
  import os
@@ -112,6 +111,7 @@ jobs:
112
111
  echo "Disk after cleanup:"; df -h /
113
112
 
114
113
  - name: Install CUDA Toolkit
114
+ if: runner.os == 'Windows'
115
115
  uses: Jimver/cuda-toolkit@v0.2.35
116
116
  with:
117
117
  cuda: "12.8.1"
@@ -139,6 +139,7 @@ jobs:
139
139
  "CUDA_BIN_PATH=$cudaRoot" >> $env:GITHUB_ENV
140
140
 
141
141
  - name: Show toolchain
142
+ if: runner.os == 'Windows'
142
143
  shell: bash
143
144
  run: |
144
145
  python --version
@@ -152,16 +153,62 @@ jobs:
152
153
  python -m pip install build
153
154
 
154
155
  - name: Build packaged stable FDTD CUDA extension
156
+ if: runner.os == 'Windows'
155
157
  shell: bash
156
158
  env:
157
159
  MAX_JOBS: "2"
158
- WITWIN_CUDA_GENCODE_ARCHES: "7.0;7.5;8.0;8.6;8.9;9.0;10.0;10.1;12.0+PTX"
160
+ WITWIN_CUDA_GENCODE_ARCHES: "7.0;7.5;8.0;8.6;8.7;8.9;9.0;10.0;10.1;12.0+PTX"
159
161
  PACKAGE_DIR: ${{ needs.validate_release.outputs.package_dir }}
160
162
  WITWIN_MAXWELL_FDTD_CUDA_BUILD_DIR: ${{ runner.temp }}/witwin_maxwell_fdtd_cuda/stable_abi_v1
161
163
  run: |
162
164
  python "$PACKAGE_DIR"/scripts/build_fdtd_cuda_prebuilt.py --verbose
163
165
 
166
+ - name: Build manylinux_2_28 wheel
167
+ if: runner.os == 'Linux'
168
+ uses: pypa/cibuildwheel@v3.3.0
169
+ env:
170
+ CIBW_BUILD: cp310-manylinux_x86_64
171
+ CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
172
+ CIBW_BEFORE_ALL_LINUX: >-
173
+ dnf install -y dnf-plugins-core gcc-toolset-12 &&
174
+ rpm --import https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/D42D0685.pub &&
175
+ dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo &&
176
+ dnf clean expire-cache &&
177
+ dnf install -y cuda-toolkit-12-8 &&
178
+ ln -sfn /usr/local/cuda-12.8 /usr/local/cuda &&
179
+ /usr/local/cuda/bin/nvcc --version
180
+ CIBW_ENVIRONMENT_LINUX: >-
181
+ CUDA_HOME=/usr/local/cuda
182
+ CUDA_PATH=/usr/local/cuda
183
+ CUDA_ROOT=/usr/local/cuda
184
+ CUDA_BIN_PATH=/usr/local/cuda
185
+ CUDACXX=/usr/local/cuda/bin/nvcc
186
+ CUDAHOSTCXX=/opt/rh/gcc-toolset-12/root/usr/bin/g++
187
+ PATH=/usr/local/cuda/bin:$PATH
188
+ LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
189
+ MAX_JOBS=2
190
+ WITWIN_CUDA_GENCODE_ARCHES="7.0;7.5;8.0;8.6;8.7;8.9;9.0;10.0;10.1;12.0+PTX"
191
+ CIBW_BEFORE_BUILD_LINUX: >-
192
+ pip install --upgrade pip setuptools wheel ninja numpy build &&
193
+ pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cu128 &&
194
+ python {project}/scripts/build_fdtd_cuda_prebuilt.py --verbose &&
195
+ python {project}/scripts/verify_cuda_binary_arches.py
196
+ --stem witwin_maxwell_fdtd_cuda
197
+ {project}/witwin/maxwell/fdtd/cuda/prebuilt
198
+ CIBW_REPAIR_WHEEL_COMMAND_LINUX: >-
199
+ auditwheel repair --plat manylinux_2_28_x86_64
200
+ --wheel-dir {dest_dir}
201
+ --exclude libc10.so --exclude libc10_cuda.so
202
+ --exclude libtorch.so --exclude libtorch_cpu.so
203
+ --exclude libtorch_cuda.so --exclude libtorch_python.so
204
+ --exclude libcudart.so.12 --exclude libcuda.so.1
205
+ {wheel}
206
+ with:
207
+ package-dir: ${{ needs.validate_release.outputs.package_dir }}
208
+ output-dir: ${{ needs.validate_release.outputs.package_dir }}/dist
209
+
164
210
  - name: Verify compiled CUDA architectures
211
+ if: runner.os == 'Windows'
165
212
  shell: bash
166
213
  env:
167
214
  PACKAGE_DIR: ${{ needs.validate_release.outputs.package_dir }}
@@ -171,33 +218,13 @@ jobs:
171
218
  "$PACKAGE_DIR"/witwin/maxwell/fdtd/cuda/prebuilt
172
219
 
173
220
  - name: Build platform wheel
221
+ if: runner.os == 'Windows'
174
222
  shell: bash
175
223
  env:
176
224
  PACKAGE_DIR: ${{ needs.validate_release.outputs.package_dir }}
177
225
  run: |
178
226
  python -m build --wheel "$PACKAGE_DIR"
179
227
 
180
- - name: Repair Linux wheel platform tag
181
- if: runner.os == 'Linux'
182
- shell: bash
183
- env:
184
- PACKAGE_DIR: ${{ needs.validate_release.outputs.package_dir }}
185
- run: |
186
- python -m pip install auditwheel patchelf
187
- mkdir -p "$PACKAGE_DIR"/wheelhouse
188
- for whl in "$PACKAGE_DIR"/dist/*-linux_x86_64.whl; do
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
196
- done
197
- rm -f "$PACKAGE_DIR"/dist/*-linux_x86_64.whl
198
- mv "$PACKAGE_DIR"/wheelhouse/*.whl "$PACKAGE_DIR"/dist/
199
- ls -l "$PACKAGE_DIR"/dist
200
-
201
228
  - name: Smoke install prebuilt wheel
202
229
  shell: bash
203
230
  env:
@@ -206,7 +233,7 @@ jobs:
206
233
  WITWIN_MAXWELL_FDTD_CUDA_BUILD_DIR: ${{ runner.temp }}/missing_prebuilt_build_dir
207
234
  run: |
208
235
  python -m pip uninstall -y witwin-maxwell || true
209
- python -m pip install --no-deps "$PACKAGE_DIR"/dist/*.whl
236
+ python -m pip install "$PACKAGE_DIR"/dist/*.whl
210
237
  python - <<'PY'
211
238
  import importlib.util
212
239
  import os
@@ -236,6 +263,17 @@ jobs:
236
263
  assert path.parent.name == "prebuilt"
237
264
  extension = module.build_extension()
238
265
  print(f"Loaded packaged FDTD CUDA extension from {extension.__file__}")
266
+
267
+ # Import outside the checkout so missing runtime dependencies cannot
268
+ # be hidden by source-tree imports or the build-only ABI smoke test.
269
+ import subprocess
270
+ import tempfile
271
+ subprocess.run([
272
+ os.sys.executable, "-c",
273
+ "import witwin.maxwell as mw; from importlib.metadata import version; "
274
+ "assert mw.BatchExecution and mw.Scene and mw.Simulation; "
275
+ "print('Installed package:', version('witwin-maxwell'))",
276
+ ], cwd=tempfile.gettempdir(), check=True)
239
277
  PY
240
278
 
241
279
  - name: Upload wheel artifact
@@ -263,6 +301,7 @@ jobs:
263
301
  - {python_version: "3.14", torch_version: "2.10.0", cuda_index: "cu128"}
264
302
  - {python_version: "3.14", torch_version: "2.11.0", cuda_index: "cu128"}
265
303
  - {python_version: "3.14", torch_version: "2.12.0", cuda_index: "cu126"}
304
+ - {python_version: "3.14", torch_version: "2.13.0", cuda_index: "cu126"}
266
305
 
267
306
  steps:
268
307
  - name: Set up Python
@@ -315,6 +354,12 @@ jobs:
315
354
  extension = module.build_extension()
316
355
  assert Path(extension.__file__).resolve() == native_path.resolve()
317
356
  assert extension.update_magnetic_hx_standard is not None
357
+ import ctypes
358
+ library = ctypes.CDLL(str(native_path))
359
+ for name in ("mw_batch_budget_create", "mw_batch_budget_exchange",
360
+ "mw_batch_budget_bytes", "mw_batch_budget_close",
361
+ "mw_batch_malloc", "mw_batch_free"):
362
+ assert getattr(library, name) is not None, name
318
363
  print(f"Loaded {native_path.name} with torch {torch.__version__} on Python {os.sys.version.split()[0]}")
319
364
  PY
320
365
 
@@ -349,7 +394,7 @@ jobs:
349
394
 
350
395
  publish:
351
396
  name: Publish to PyPI
352
- if: github.event_name == 'release'
397
+ if: startsWith(github.ref, 'refs/tags/witwin-maxwell-v')
353
398
  needs:
354
399
  - build_cuda_wheels
355
400
  - test_torch_compatibility
@@ -381,3 +426,42 @@ jobs:
381
426
  with:
382
427
  packages-dir: dist
383
428
  skip-existing: true
429
+
430
+ create_release:
431
+ name: Create release
432
+ if: startsWith(github.ref, 'refs/tags/witwin-maxwell-v')
433
+ needs: publish
434
+ runs-on: ubuntu-latest
435
+ permissions:
436
+ contents: write
437
+
438
+ steps:
439
+ - name: Check out repository
440
+ uses: actions/checkout@v4
441
+
442
+ - name: Download wheel artifacts
443
+ uses: actions/download-artifact@v4
444
+ with:
445
+ pattern: wheel-*
446
+ path: dist
447
+ merge-multiple: true
448
+
449
+ - name: Download source distribution artifact
450
+ uses: actions/download-artifact@v4
451
+ with:
452
+ name: sdist
453
+ path: dist
454
+
455
+ - name: Create release with distribution artifacts
456
+ shell: bash
457
+ env:
458
+ GH_TOKEN: ${{ github.token }}
459
+ run: |
460
+ version="${GITHUB_REF_NAME#witwin-maxwell-v}"
461
+ notes="docs/reference/release-notes-${version}.md"
462
+ test -f "$notes"
463
+ gh release create "$GITHUB_REF_NAME" \
464
+ --verify-tag \
465
+ --title "witwin-maxwell ${version}" \
466
+ --notes-file "$notes" \
467
+ dist/*
@@ -10,6 +10,7 @@ __pycache__/
10
10
  # Distribution / packaging
11
11
  .Python
12
12
  build/
13
+ .build/
13
14
  develop-eggs/
14
15
  dist/
15
16
  downloads/
@@ -231,6 +232,24 @@ __marimo__/
231
232
 
232
233
  # Repository-local development content and build artifacts
233
234
  .bench_tmp/
234
- docs/dev/
235
+ docs/
235
236
  assets/
236
237
  benchmark/
238
+
239
+ # Repository-local agent and test scratch directories
240
+ .codex_tmp/
241
+ .codex-tmp/
242
+ .test-tmp/
243
+ .tmp/
244
+ # Experiment outputs are enormous (90+ GB of generated datasets) and stay local. The generator
245
+ # *source* is not an output: it defines the dataset contract that downstream consumers depend on,
246
+ # so it is tracked explicitly. Add a file here rather than relaxing the rule -- `experiments/*`
247
+ # keeps every other directory excluded while still letting git descend far enough for these
248
+ # negations to apply.
249
+ experiments/*
250
+ !experiments/fdtd_data_generator/
251
+ experiments/fdtd_data_generator/*
252
+ !experiments/fdtd_data_generator/generate.py
253
+ !experiments/fdtd_data_generator/README.md
254
+ !experiments/fdtd_data_generator/REPORT.md
255
+ .worktrees/
@@ -0,0 +1,161 @@
1
+ # Repository Agent Guide
2
+
3
+ This document defines the working rules for coding agents in this repository. Keep `AGENTS.md` and `CLAUDE.md` identical.
4
+
5
+ ## Core Rules
6
+
7
+ - Use the `maxwell` conda environment for all Python commands, tests, and scripts.
8
+ - Keep the codebase clean. Do not preserve legacy code, compatibility shims, or backward-support paths unless explicitly requested.
9
+ - Write all code comments and commit messages in English.
10
+ - Never add AI or agent attribution to git history. Commit messages must not contain
11
+ `Co-Authored-By` trailers naming an assistant, `Claude-Session` or similar session
12
+ links, or "generated with" banners, and the author/committer identity is always the
13
+ human owner. This applies to commits, tags, PR titles and PR bodies.
14
+ - Keep third-party commercial product, service, and solver names out of commit messages, branch names, PR titles, general development documents, comments, and feature descriptions. Describe the behavior with neutral terms such as `external reference solver`, `reference backend`, or `third-party adapter` so commercial brands do not spread through the repository or GitHub history.
15
+ - Use an exact commercial product name only where technically required for an interoperability API, adapter module, executable command, dependency declaration, legal attribution, or a narrowly scoped adapter test/document. Do not repeat that name in unrelated implementation, validation, or numerical-method changes unless the user explicitly requests it.
16
+ - Maintain `FEATURE_LIST.md` as the user-facing feature inventory. Every new user-visible feature, public API capability, or meaningful workflow addition must update that file in the same change.
17
+ - Store active development documents by type under `docs/plans/`, `docs/memory/`, `docs/assessments/`, and `docs/reference/`. Keep solver and feature areas together in each type directory; use descriptive filenames instead of extra `fdtd`, `fdfd`, or similar directory layers. Move completed or superseded development documents to the matching type under `docs/archive/`. Keep `FEATURE_LIST.md` at the repository root as the user-facing feature inventory.
18
+ - Prioritize correctness and efficiency over convenience.
19
+ - Core computation is GPU-first. Minimize GPU-CPU transfers and do not introduce new CPU fallback paths unless explicitly requested.
20
+ - PyTorch-native integration is a hard requirement. New differentiable or optimization-facing APIs must be designed as native PyTorch workflows, not thin wrappers around non-PyTorch side paths.
21
+ - The stable public architecture is `Scene + Simulation + Result`. New user-facing code must follow this model.
22
+ - `Scene` must support both direct declarative construction (`mw.Scene(...)`) and a PyTorch-native module-style scene definition that ultimately materializes into the same public `Scene` object model.
23
+ - Do not reintroduce old public convenience paths such as `Scene.set_*`, `Scene.with_*`, `mw.FDFD`, or `mw.FDTD`.
24
+ - Preserve the compile-layer naming convention: scene-facing helpers use `compile_*` names such as `Scene.compile_materials(...)`, `Scene.compile_relative_materials(...)`, and `Scene.compile_material_tensors(...)`.
25
+ - Shared core geometry constructors default to `device=None`; `Scene(...)` owns device placement and defaults to CUDA.
26
+
27
+ ## Project Overview
28
+
29
+ This repository is a PyTorch-native differentiable full-wave electromagnetic simulation framework for Maxwell's equations with two internal solver runtimes:
30
+
31
+ - `FDFD`: frequency-domain finite-difference solver using sparse linear algebra.
32
+ - `FDTD`: time-domain Yee-grid solver with native CUDA kernels, CPML support, and differentiable adjoint workflows.
33
+
34
+ The public API is declarative:
35
+
36
+ - `Scene`: physical problem definition
37
+ - `Simulation`: execution configuration and backend selection
38
+ - `Result`: fields, monitors, metadata, plotting, and persistence
39
+
40
+ For differentiable and optimization workflows, the public API must also remain PyTorch-native:
41
+
42
+ - trainable scene definitions may be implemented as `torch.nn.Module` via `SceneModule`
43
+ - module-style scenes must compile or materialize to the same `Scene` public contract
44
+ - solver entry remains `Scene -> Simulation -> Result`, even when the `Scene` is produced by a PyTorch module
45
+
46
+ Supporting first-class Maxwell scene objects include:
47
+
48
+ - `Domain`
49
+ - `GridSpec`
50
+ - `BoundarySpec`
51
+ - `BoundaryKind`
52
+ - `MaterialRegion`
53
+ - `Structure`
54
+ - `Material`
55
+ - `PointDipole`
56
+ - `PlaneWave`
57
+ - `GaussianBeam`
58
+ - `ModeSource`
59
+ - `PointMonitor`
60
+ - `PlaneMonitor`
61
+ - `FluxMonitor`
62
+ - `ModeMonitor`
63
+ - `ModePort`
64
+
65
+ The current codebase is organized as a Python package under `witwin/maxwell/`, with tests under `tests/`. Shared geometry and structure primitives are re-exported through `witwin.maxwell` but originate from the shared `witwin.core` dependency.
66
+
67
+ ## Repository Layout
68
+
69
+ - `witwin/maxwell/__init__.py`: public package exports.
70
+ - `witwin/maxwell/scene.py`: declarative scene model, domain/grid/boundary handling, `MaterialRegion`, and `SceneModule`.
71
+ - `witwin/maxwell/media.py`: public Maxwell material models, dispersion poles, and diagonal anisotropy descriptors.
72
+ - `witwin/maxwell/sources.py`: public source definitions and source-time waveforms.
73
+ - `witwin/maxwell/monitors.py`: point, plane, flux, and modal monitors.
74
+ - `witwin/maxwell/ports.py`: first-class modal port definitions.
75
+ - `witwin/maxwell/simulation.py`: public simulation entrypoint, runtime preparation, and backend dispatch.
76
+ - `witwin/maxwell/result.py`: unified simulation result container.
77
+ - `witwin/maxwell/compiler/`: scene compilers for materials, sources, ports, and monitors.
78
+ - `witwin/maxwell/fdfd/`: internal FDFD runtime and postprocessing helpers.
79
+ - `witwin/maxwell/fdtd/`: internal FDTD runtime, CPML logic, source injection, observers, and adjoint support.
80
+ - `witwin/maxwell/postprocess/`: near/far-field, directivity, RCS, scattering-parameter, and modal postprocessing.
81
+ - `witwin/maxwell/adapters/`: interoperability adapters such as Tidy3D export.
82
+ - `witwin/maxwell/visualization/`: shared visualization utilities.
83
+ - `docs/plans/`: active implementation plans and functional roadmaps.
84
+ - `docs/memory/`: current implementation notes and durable engineering context.
85
+ - `docs/assessments/`: current audits and capability assessments.
86
+ - `docs/reference/`: maintained technical reference material.
87
+ - `docs/archive/`: completed or superseded plans, assessments, design records, and status snapshots.
88
+ - `tests/`: pytest-based coverage for public API behavior, numerics, gradients, and validation workflows.
89
+
90
+ ## Working Expectations
91
+
92
+ - Prefer package-style imports from `witwin.maxwell`, typically `import witwin.maxwell as mw`.
93
+ - New public examples, tests, and scripts should look like `Scene -> Simulation -> Result`, not direct backend construction.
94
+ - Build scenes with `Domain`, `GridSpec`, `BoundarySpec`, `Structure`, `Material`, source objects, monitor objects, `ModePort`, and `MaterialRegion` as appropriate.
95
+ - Use the declarative `BoundaryKind` / `BoundarySpec` vocabulary consistently; do not introduce new raw boundary-mode strings outside validated APIs.
96
+ - Use `Scene.add_structure(...)`, `Scene.add_source(...)`, `Scene.add_monitor(...)`, `Scene.add_port(...)`, and `Scene.add_material_region(...)` for scene assembly.
97
+ - For PyTorch-native scene definitions, prefer `SceneModule` subclasses that expose `to_scene()` and return a standard `Scene`; do not create a second incompatible simulation entrypoint.
98
+ - When behavior changes in a way a user would notice, update `FEATURE_LIST.md` to keep the documented feature inventory current.
99
+ - If backend internals must be inspected, prefer `Simulation.prepare()` and then inspect `prepared.solver` rather than importing or constructing backend classes through the public path.
100
+ - Keep new implementations aligned with the current declarative 3D API and compiler/runtime split.
101
+ - If a design choice would add extra abstraction, data copies, or compatibility branches, prefer the simpler and faster path.
102
+ - When changing numerics, preserve Yee-grid consistency, PML behavior, Bloch/periodic boundary semantics, and GPU execution flow.
103
+ - Avoid adding duplicate implementations in parallel files. Update the primary module instead.
104
+
105
+ ## Running Code
106
+
107
+ Activate the environment first:
108
+
109
+ ```bash
110
+ conda activate maxwell
111
+ ```
112
+
113
+ Common commands:
114
+
115
+ ```bash
116
+ python -m pytest tests
117
+ python -m pytest tests/api/public/test_public_api.py tests/api/public/test_simulation_smoke.py
118
+ python -m pytest tests/core/scene/test_scene.py tests/materials/compiler/test_material_compiler.py
119
+ python -m pytest tests/boundaries/cpml/test_fdtd_cpml.py tests/monitors/observers/test_fdtd_observers.py
120
+ python -m pytest tests/gradients/test_fdtd_adjoint_bridge.py
121
+ python -m pytest tests/validation/benchmark/test_benchmark_system.py
122
+ python -m benchmark
123
+ python -m benchmark dipole_vacuum
124
+ python -m benchmark planewave_vacuum
125
+ ```
126
+
127
+ Benchmark / validation workflow:
128
+
129
+ - Use `python -m benchmark` as the unified Maxwell-vs-Tidy3D validation entrypoint.
130
+ - Scenario definitions live under `benchmark/scenes/`, grouped by family under directories such as `dipole/` and `planewave/`.
131
+ - Tidy3D reference caches are stored under `benchmark/cache/`.
132
+ - Generated comparison plots are stored under `benchmark/plots/`.
133
+ - Benchmark metrics are aggregated into `benchmark/RESULTS.md` and should be updated by rerunning the benchmark command after benchmark-related changes.
134
+
135
+ If you add or modify Python code, prefer validating with targeted pytest coverage first, then broader tests if needed.
136
+
137
+ ## Windows / Codex Execution Notes
138
+
139
+ - In this environment, `rg` may exist but fail with `Access is denied`. If that happens, switch immediately to PowerShell-native search with `Get-ChildItem` + `Select-String` instead of retrying `rg`.
140
+ - `conda run -n maxwell` may fail to pass stdin through to `python -` reliably in this Codex/PowerShell setup. Prefer `conda run -n maxwell python -c ...` for short snippets, or invoke the environment interpreter directly with `C:\Users\Asixa\miniconda3\envs\maxwell\python.exe`.
141
+ - Windows command-line length limits are easy to hit with `python -c` and large inline scripts. For long scripts, pass the code through an environment variable such as `PYCODE` and execute `python -c "import os; exec(os.environ['PYCODE'])"`, or use the environment interpreter with stdin if that path is reliable.
142
+ - Large single-shot `apply_patch` updates can also hit Windows path/command length limits. If a full-file replacement fails for size reasons, rewrite it in smaller patch chunks instead of retrying the same oversized patch.
143
+ - When checking whether `AGENTS.md` and `CLAUDE.md` match, do not use bare `fc` in PowerShell because it resolves to `Format-Custom`. Call `fc.exe` explicitly if you want the file-compare tool.
144
+
145
+ ## Dependencies
146
+
147
+ Primary dependencies include:
148
+
149
+ - PyTorch
150
+ - NumPy
151
+ - SciPy
152
+ - Matplotlib
153
+ - tqdm
154
+ - CuPy
155
+ - witwin
156
+
157
+ Optional dependencies:
158
+
159
+ - `tidy3d` for adapter export and benchmark cross-validation workflows
160
+
161
+ An NVIDIA GPU with CUDA is expected for core solver workflows.
@@ -4,6 +4,53 @@ All notable user-visible changes to WiTwin Maxwell are documented here. The proj
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.5.1] - 2026-09-08
8
+
9
+ ### Added
10
+
11
+ - Experimental `Simulation.batch(...)` execution with reusable capacity-limited CUDA slots, batched field/CPML/source/observer updates, and ordinary owned `Result` objects.
12
+ - Local material compilation reuse, automatic resident capacity, private per-device CUDA allocation budgets, multi-GPU and dual-slot scheduling, and opt-in measured throughput tuning.
13
+ - PyTorch-native Batch checkpoint adjoints for supported density, dielectric geometry, and named source-scale inputs, including delayed backward after slot reuse or close.
14
+ - Reproducible Batch performance, memory, material-compilation, and device-scaling audits with numerical controls and process-contention records.
15
+
16
+ ### Fixed
17
+
18
+ - Material-aware time-step stability, source timing, complex CPML and Mur boundary histories, and capture/resume state consistency in FDTD.
19
+ - Batch parameter cache identity, iterator ownership, result scene snapshots, selected electric spectra, and redundant spectral allocations in retained adjoint state.
20
+ - Automatic worker capacity distribution and isolation of tuning RNG, module state, and cross-device tensor copies.
21
+ - Corrected the base dependency range to `witwin>=0.4,<0.5`, matching the published `PhysicalMaterial` contract instead of an unavailable version range.
22
+ - Preserved local compilation reuse when declared design replacements acquire new base-package structure/material identity tokens.
23
+ - Declared plotting/progress/notebook display import dependencies and extended release checks to installed-package imports and native Batch allocator exports.
24
+
25
+ ### Limitations
26
+
27
+ - Batch remains experimental with a narrower capability set than ordinary FDTD. Fused batch reverse kernels, exact preplanning of all retained outputs, and exclusive multi-GPU throughput acceptance remain pending.
28
+ - See [0.5.1 release notes](docs/reference/release-notes-0.5.1.md) for validation evidence and the supported execution contract.
29
+
30
+ ## [0.5.0] - Unpublished
31
+
32
+ - The version tag built CUDA wheels but failed the installed-package import gate because `IPython` was undeclared. No distributions were uploaded to PyPI.
33
+
34
+ ## [0.4.0] - 2026-07-23
35
+
36
+ ### Added
37
+
38
+ - RF port, network, antenna, phased-array, thin-wire, electrostatic, capacitance, SAR, exposure, ESD, dielectric-breakdown, gyromagnetic, and generalized surface-impedance workflows.
39
+ - Distributed forward and adjoint execution, including CPML-trainable reverse paths and deterministic multi-device scene-gradient aggregation.
40
+
41
+ ### Changed
42
+
43
+ - Moved material sampling to native Yee-component locations, improving the geometry validation cluster while changing geometry-resolved numerical baselines.
44
+ - Published one PyTorch Stable ABI CUDA binary per platform for PyTorch 2.10 and newer, load-tested through PyTorch 2.13 and CPython 3.10-3.14.
45
+ - Built Linux wheels against `manylinux_2_28`; Linux and Windows CUDA fat binaries include native SM87 SASS.
46
+ - Made version tags drive the gated package publication and release-artifact workflow.
47
+
48
+ ### Fixed
49
+
50
+ - Closed release-blocking CUDA graph, distributed checkpoint, conformal PEC, observer staggering, near-to-far quadrature, modal selection, and surface-impedance correctness gaps.
51
+
52
+ Complete capability boundaries, validation evidence, behavior changes, and known limitations are documented in the [0.4.0 release notes](docs/reference/release-notes-0.4.0.md).
53
+
7
54
  ## [0.3.0] - 2026-07-13
8
55
 
9
56
  ### Added
@@ -46,6 +93,8 @@ Detailed numerical conventions, pitfalls, final comparison values, and intention
46
93
 
47
94
  - Previous public release.
48
95
 
49
- [Unreleased]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.3.0...HEAD
96
+ [Unreleased]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.5.1...HEAD
97
+ [0.5.1]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.4.0...witwin-maxwell-v0.5.1
98
+ [0.4.0]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.3.0...witwin-maxwell-v0.4.0
50
99
  [0.3.0]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.2.0...witwin-maxwell-v0.3.0
51
100
  [0.2.0]: https://github.com/witwin-ai/witwin-maxwell/releases/tag/witwin-maxwell-v0.2.0
@@ -0,0 +1,161 @@
1
+ # Repository Agent Guide
2
+
3
+ This document defines the working rules for coding agents in this repository. Keep `AGENTS.md` and `CLAUDE.md` identical.
4
+
5
+ ## Core Rules
6
+
7
+ - Use the `maxwell` conda environment for all Python commands, tests, and scripts.
8
+ - Keep the codebase clean. Do not preserve legacy code, compatibility shims, or backward-support paths unless explicitly requested.
9
+ - Write all code comments and commit messages in English.
10
+ - Never add AI or agent attribution to git history. Commit messages must not contain
11
+ `Co-Authored-By` trailers naming an assistant, `Claude-Session` or similar session
12
+ links, or "generated with" banners, and the author/committer identity is always the
13
+ human owner. This applies to commits, tags, PR titles and PR bodies.
14
+ - Keep third-party commercial product, service, and solver names out of commit messages, branch names, PR titles, general development documents, comments, and feature descriptions. Describe the behavior with neutral terms such as `external reference solver`, `reference backend`, or `third-party adapter` so commercial brands do not spread through the repository or GitHub history.
15
+ - Use an exact commercial product name only where technically required for an interoperability API, adapter module, executable command, dependency declaration, legal attribution, or a narrowly scoped adapter test/document. Do not repeat that name in unrelated implementation, validation, or numerical-method changes unless the user explicitly requests it.
16
+ - Maintain `FEATURE_LIST.md` as the user-facing feature inventory. Every new user-visible feature, public API capability, or meaningful workflow addition must update that file in the same change.
17
+ - Store active development documents by type under `docs/plans/`, `docs/memory/`, `docs/assessments/`, and `docs/reference/`. Keep solver and feature areas together in each type directory; use descriptive filenames instead of extra `fdtd`, `fdfd`, or similar directory layers. Move completed or superseded development documents to the matching type under `docs/archive/`. Keep `FEATURE_LIST.md` at the repository root as the user-facing feature inventory.
18
+ - Prioritize correctness and efficiency over convenience.
19
+ - Core computation is GPU-first. Minimize GPU-CPU transfers and do not introduce new CPU fallback paths unless explicitly requested.
20
+ - PyTorch-native integration is a hard requirement. New differentiable or optimization-facing APIs must be designed as native PyTorch workflows, not thin wrappers around non-PyTorch side paths.
21
+ - The stable public architecture is `Scene + Simulation + Result`. New user-facing code must follow this model.
22
+ - `Scene` must support both direct declarative construction (`mw.Scene(...)`) and a PyTorch-native module-style scene definition that ultimately materializes into the same public `Scene` object model.
23
+ - Do not reintroduce old public convenience paths such as `Scene.set_*`, `Scene.with_*`, `mw.FDFD`, or `mw.FDTD`.
24
+ - Preserve the compile-layer naming convention: scene-facing helpers use `compile_*` names such as `Scene.compile_materials(...)`, `Scene.compile_relative_materials(...)`, and `Scene.compile_material_tensors(...)`.
25
+ - Shared core geometry constructors default to `device=None`; `Scene(...)` owns device placement and defaults to CUDA.
26
+
27
+ ## Project Overview
28
+
29
+ This repository is a PyTorch-native differentiable full-wave electromagnetic simulation framework for Maxwell's equations with two internal solver runtimes:
30
+
31
+ - `FDFD`: frequency-domain finite-difference solver using sparse linear algebra.
32
+ - `FDTD`: time-domain Yee-grid solver with native CUDA kernels, CPML support, and differentiable adjoint workflows.
33
+
34
+ The public API is declarative:
35
+
36
+ - `Scene`: physical problem definition
37
+ - `Simulation`: execution configuration and backend selection
38
+ - `Result`: fields, monitors, metadata, plotting, and persistence
39
+
40
+ For differentiable and optimization workflows, the public API must also remain PyTorch-native:
41
+
42
+ - trainable scene definitions may be implemented as `torch.nn.Module` via `SceneModule`
43
+ - module-style scenes must compile or materialize to the same `Scene` public contract
44
+ - solver entry remains `Scene -> Simulation -> Result`, even when the `Scene` is produced by a PyTorch module
45
+
46
+ Supporting first-class Maxwell scene objects include:
47
+
48
+ - `Domain`
49
+ - `GridSpec`
50
+ - `BoundarySpec`
51
+ - `BoundaryKind`
52
+ - `MaterialRegion`
53
+ - `Structure`
54
+ - `Material`
55
+ - `PointDipole`
56
+ - `PlaneWave`
57
+ - `GaussianBeam`
58
+ - `ModeSource`
59
+ - `PointMonitor`
60
+ - `PlaneMonitor`
61
+ - `FluxMonitor`
62
+ - `ModeMonitor`
63
+ - `ModePort`
64
+
65
+ The current codebase is organized as a Python package under `witwin/maxwell/`, with tests under `tests/`. Shared geometry and structure primitives are re-exported through `witwin.maxwell` but originate from the shared `witwin.core` dependency.
66
+
67
+ ## Repository Layout
68
+
69
+ - `witwin/maxwell/__init__.py`: public package exports.
70
+ - `witwin/maxwell/scene.py`: declarative scene model, domain/grid/boundary handling, `MaterialRegion`, and `SceneModule`.
71
+ - `witwin/maxwell/media.py`: public Maxwell material models, dispersion poles, and diagonal anisotropy descriptors.
72
+ - `witwin/maxwell/sources.py`: public source definitions and source-time waveforms.
73
+ - `witwin/maxwell/monitors.py`: point, plane, flux, and modal monitors.
74
+ - `witwin/maxwell/ports.py`: first-class modal port definitions.
75
+ - `witwin/maxwell/simulation.py`: public simulation entrypoint, runtime preparation, and backend dispatch.
76
+ - `witwin/maxwell/result.py`: unified simulation result container.
77
+ - `witwin/maxwell/compiler/`: scene compilers for materials, sources, ports, and monitors.
78
+ - `witwin/maxwell/fdfd/`: internal FDFD runtime and postprocessing helpers.
79
+ - `witwin/maxwell/fdtd/`: internal FDTD runtime, CPML logic, source injection, observers, and adjoint support.
80
+ - `witwin/maxwell/postprocess/`: near/far-field, directivity, RCS, scattering-parameter, and modal postprocessing.
81
+ - `witwin/maxwell/adapters/`: interoperability adapters such as Tidy3D export.
82
+ - `witwin/maxwell/visualization/`: shared visualization utilities.
83
+ - `docs/plans/`: active implementation plans and functional roadmaps.
84
+ - `docs/memory/`: current implementation notes and durable engineering context.
85
+ - `docs/assessments/`: current audits and capability assessments.
86
+ - `docs/reference/`: maintained technical reference material.
87
+ - `docs/archive/`: completed or superseded plans, assessments, design records, and status snapshots.
88
+ - `tests/`: pytest-based coverage for public API behavior, numerics, gradients, and validation workflows.
89
+
90
+ ## Working Expectations
91
+
92
+ - Prefer package-style imports from `witwin.maxwell`, typically `import witwin.maxwell as mw`.
93
+ - New public examples, tests, and scripts should look like `Scene -> Simulation -> Result`, not direct backend construction.
94
+ - Build scenes with `Domain`, `GridSpec`, `BoundarySpec`, `Structure`, `Material`, source objects, monitor objects, `ModePort`, and `MaterialRegion` as appropriate.
95
+ - Use the declarative `BoundaryKind` / `BoundarySpec` vocabulary consistently; do not introduce new raw boundary-mode strings outside validated APIs.
96
+ - Use `Scene.add_structure(...)`, `Scene.add_source(...)`, `Scene.add_monitor(...)`, `Scene.add_port(...)`, and `Scene.add_material_region(...)` for scene assembly.
97
+ - For PyTorch-native scene definitions, prefer `SceneModule` subclasses that expose `to_scene()` and return a standard `Scene`; do not create a second incompatible simulation entrypoint.
98
+ - When behavior changes in a way a user would notice, update `FEATURE_LIST.md` to keep the documented feature inventory current.
99
+ - If backend internals must be inspected, prefer `Simulation.prepare()` and then inspect `prepared.solver` rather than importing or constructing backend classes through the public path.
100
+ - Keep new implementations aligned with the current declarative 3D API and compiler/runtime split.
101
+ - If a design choice would add extra abstraction, data copies, or compatibility branches, prefer the simpler and faster path.
102
+ - When changing numerics, preserve Yee-grid consistency, PML behavior, Bloch/periodic boundary semantics, and GPU execution flow.
103
+ - Avoid adding duplicate implementations in parallel files. Update the primary module instead.
104
+
105
+ ## Running Code
106
+
107
+ Activate the environment first:
108
+
109
+ ```bash
110
+ conda activate maxwell
111
+ ```
112
+
113
+ Common commands:
114
+
115
+ ```bash
116
+ python -m pytest tests
117
+ python -m pytest tests/api/public/test_public_api.py tests/api/public/test_simulation_smoke.py
118
+ python -m pytest tests/core/scene/test_scene.py tests/materials/compiler/test_material_compiler.py
119
+ python -m pytest tests/boundaries/cpml/test_fdtd_cpml.py tests/monitors/observers/test_fdtd_observers.py
120
+ python -m pytest tests/gradients/test_fdtd_adjoint_bridge.py
121
+ python -m pytest tests/validation/benchmark/test_benchmark_system.py
122
+ python -m benchmark
123
+ python -m benchmark dipole_vacuum
124
+ python -m benchmark planewave_vacuum
125
+ ```
126
+
127
+ Benchmark / validation workflow:
128
+
129
+ - Use `python -m benchmark` as the unified Maxwell-vs-Tidy3D validation entrypoint.
130
+ - Scenario definitions live under `benchmark/scenes/`, grouped by family under directories such as `dipole/` and `planewave/`.
131
+ - Tidy3D reference caches are stored under `benchmark/cache/`.
132
+ - Generated comparison plots are stored under `benchmark/plots/`.
133
+ - Benchmark metrics are aggregated into `benchmark/RESULTS.md` and should be updated by rerunning the benchmark command after benchmark-related changes.
134
+
135
+ If you add or modify Python code, prefer validating with targeted pytest coverage first, then broader tests if needed.
136
+
137
+ ## Windows / Codex Execution Notes
138
+
139
+ - In this environment, `rg` may exist but fail with `Access is denied`. If that happens, switch immediately to PowerShell-native search with `Get-ChildItem` + `Select-String` instead of retrying `rg`.
140
+ - `conda run -n maxwell` may fail to pass stdin through to `python -` reliably in this Codex/PowerShell setup. Prefer `conda run -n maxwell python -c ...` for short snippets, or invoke the environment interpreter directly with `C:\Users\Asixa\miniconda3\envs\maxwell\python.exe`.
141
+ - Windows command-line length limits are easy to hit with `python -c` and large inline scripts. For long scripts, pass the code through an environment variable such as `PYCODE` and execute `python -c "import os; exec(os.environ['PYCODE'])"`, or use the environment interpreter with stdin if that path is reliable.
142
+ - Large single-shot `apply_patch` updates can also hit Windows path/command length limits. If a full-file replacement fails for size reasons, rewrite it in smaller patch chunks instead of retrying the same oversized patch.
143
+ - When checking whether `AGENTS.md` and `CLAUDE.md` match, do not use bare `fc` in PowerShell because it resolves to `Format-Custom`. Call `fc.exe` explicitly if you want the file-compare tool.
144
+
145
+ ## Dependencies
146
+
147
+ Primary dependencies include:
148
+
149
+ - PyTorch
150
+ - NumPy
151
+ - SciPy
152
+ - Matplotlib
153
+ - tqdm
154
+ - CuPy
155
+ - witwin
156
+
157
+ Optional dependencies:
158
+
159
+ - `tidy3d` for adapter export and benchmark cross-validation workflows
160
+
161
+ An NVIDIA GPU with CUDA is expected for core solver workflows.