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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (619) hide show
  1. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/.github/workflows/publish-witwin-maxwell.yml +95 -28
  2. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/.gitignore +10 -1
  3. witwin_maxwell-0.4.0/AGENTS.md +161 -0
  4. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/CHANGELOG.md +22 -1
  5. witwin_maxwell-0.4.0/CLAUDE.md +161 -0
  6. witwin_maxwell-0.4.0/FEATURE_LIST.md +975 -0
  7. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/PKG-INFO +9 -6
  8. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/README.md +5 -5
  9. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/pyproject.toml +4 -1
  10. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/scripts/build_fdtd_cuda_prebuilt.py +4 -1
  11. witwin_maxwell-0.4.0/scripts/dev/fdtd/multi_gpu/bench_joint.py +939 -0
  12. witwin_maxwell-0.4.0/scripts/dev/fdtd/native_cuda/bench_baseline.py +162 -0
  13. witwin_maxwell-0.4.0/scripts/dev/fdtd/native_cuda/profile_scenario.py +24 -0
  14. witwin_maxwell-0.4.0/scripts/dev/fdtd/native_cuda/snapshot_tool.py +188 -0
  15. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/scripts/verify_cuda_binary_arches.py +1 -1
  16. witwin_maxwell-0.4.0/tests/api/adapters/tidy3d/test_port_source_mapping.py +138 -0
  17. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/api/adapters/tidy3d/test_tidy3d_adapter.py +266 -9
  18. witwin_maxwell-0.4.0/tests/api/public/test_guard_census.py +456 -0
  19. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/api/public/test_public_api.py +17 -10
  20. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/api/public/test_simulation_smoke.py +1 -1
  21. witwin_maxwell-0.4.0/tests/api/public/test_thin_wire_api.py +326 -0
  22. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/boundaries/boundary_physics/test_fdtd_boundary_physics.py +9 -4
  23. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/boundaries/symmetry/test_symmetry_generalization.py +15 -14
  24. witwin_maxwell-0.4.0/tests/breakdown/_common.py +140 -0
  25. witwin_maxwell-0.4.0/tests/breakdown/test_breakdown_accumulator.py +235 -0
  26. witwin_maxwell-0.4.0/tests/breakdown/test_breakdown_compiler.py +149 -0
  27. witwin_maxwell-0.4.0/tests/breakdown/test_breakdown_energy.py +133 -0
  28. witwin_maxwell-0.4.0/tests/breakdown/test_breakdown_events.py +93 -0
  29. witwin_maxwell-0.4.0/tests/breakdown/test_breakdown_fdtd.py +186 -0
  30. witwin_maxwell-0.4.0/tests/breakdown/test_breakdown_guards.py +145 -0
  31. witwin_maxwell-0.4.0/tests/breakdown/test_breakdown_monitor.py +146 -0
  32. witwin_maxwell-0.4.0/tests/breakdown/test_breakdown_parity.py +126 -0
  33. witwin_maxwell-0.4.0/tests/breakdown/test_breakdown_state_machine.py +168 -0
  34. witwin_maxwell-0.4.0/tests/breakdown/test_component_stress.py +194 -0
  35. witwin_maxwell-0.4.0/tests/breakdown/test_smooth_breakdown_risk.py +326 -0
  36. witwin_maxwell-0.4.0/tests/core/constants/test_physical_constants.py +40 -0
  37. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/core/grid/test_gridspec_custom.py +9 -9
  38. witwin_maxwell-0.4.0/tests/electrostatic/oracles.py +47 -0
  39. witwin_maxwell-0.4.0/tests/electrostatic/test_analytic.py +146 -0
  40. witwin_maxwell-0.4.0/tests/electrostatic/test_api.py +227 -0
  41. witwin_maxwell-0.4.0/tests/electrostatic/test_capacitance.py +239 -0
  42. witwin_maxwell-0.4.0/tests/electrostatic/test_conservation.py +107 -0
  43. witwin_maxwell-0.4.0/tests/electrostatic/test_floating.py +157 -0
  44. witwin_maxwell-0.4.0/tests/electrostatic/test_gradients.py +238 -0
  45. witwin_maxwell-0.4.0/tests/electrostatic/test_initial_condition.py +338 -0
  46. witwin_maxwell-0.4.0/tests/electrostatic/test_open_boundary.py +312 -0
  47. witwin_maxwell-0.4.0/tests/electrostatic/test_tensor_eps.py +473 -0
  48. witwin_maxwell-0.4.0/tests/esd/test_esd_circuit.py +512 -0
  49. witwin_maxwell-0.4.0/tests/esd/test_esd_circuit_e2e.py +186 -0
  50. witwin_maxwell-0.4.0/tests/esd/test_esd_circuit_energy.py +229 -0
  51. witwin_maxwell-0.4.0/tests/esd/test_esd_injection.py +321 -0
  52. witwin_maxwell-0.4.0/tests/esd/test_esd_waveform.py +208 -0
  53. witwin_maxwell-0.4.0/tests/esd/test_prebias.py +193 -0
  54. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_graph.py +2 -2
  55. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_magnetic_parity.py +6 -0
  56. witwin_maxwell-0.4.0/tests/fdtd/cuda/test_cuda_prebuilt_abi.py +70 -0
  57. witwin_maxwell-0.4.0/tests/fdtd/cuda/test_cuda_wire_parity.py +368 -0
  58. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/torch_reference.py +21 -3
  59. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/_gpu_burner.py +29 -0
  60. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/_nccl_adjoint_worker.py +672 -0
  61. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/_nccl_forward_worker.py +225 -0
  62. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/_nccl_rankdeath_worker.py +84 -0
  63. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/_nccl_transport_adjoint_worker.py +266 -0
  64. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/_nccl_transport_worker.py +168 -0
  65. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/conftest.py +44 -0
  66. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_adjoint_parity.py +585 -0
  67. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_adjoint_parity_cpml.py +606 -0
  68. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_adjoint_parity_stress.py +297 -0
  69. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_adjoint_replay.py +354 -0
  70. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_bench_joint_cli.py +282 -0
  71. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_bounded_standard_dispatch.py +242 -0
  72. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_capacity_cpml_stats.py +237 -0
  73. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_circuit_owner.py +283 -0
  74. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_cuda_graph_device_binding.py +164 -0
  75. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_ensemble_executor.py +260 -0
  76. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_ensemble_network_sweep.py +110 -0
  77. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_ensemble_run_many.py +250 -0
  78. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_guard_regressions.py +577 -0
  79. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_material_region_forward.py +174 -0
  80. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_monitor_merge_ownership.py +437 -0
  81. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_monitor_numerical.py +245 -0
  82. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_nccl_transport.py +772 -0
  83. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_network_owner.py +621 -0
  84. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_numerical_matrix.py +418 -0
  85. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_parallel_public_api.py +265 -0
  86. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_partition.py +282 -0
  87. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_result_persistence.py +131 -0
  88. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_review_regressions.py +240 -0
  89. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_sharded_export.py +184 -0
  90. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_sharded_persistence.py +420 -0
  91. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_solver_acceptance.py +390 -0
  92. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_step_instrument.py +143 -0
  93. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_transport.py +231 -0
  94. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_transport_adjoint.py +247 -0
  95. witwin_maxwell-0.4.0/tests/fdtd/multi_gpu/test_wire_owner.py +612 -0
  96. witwin_maxwell-0.4.0/tests/fdtd/surface_impedance/test_surface_impedance_reference.py +208 -0
  97. witwin_maxwell-0.4.0/tests/fdtd/test_observer_quadrature.py +68 -0
  98. witwin_maxwell-0.4.0/tests/fdtd/test_observer_time_stagger.py +245 -0
  99. witwin_maxwell-0.4.0/tests/fdtd/thin_wire/test_thin_wire_compiler.py +1024 -0
  100. witwin_maxwell-0.4.0/tests/fdtd/thin_wire/test_thin_wire_forward.py +1112 -0
  101. witwin_maxwell-0.4.0/tests/fdtd/thin_wire/test_thin_wire_lossy_forward.py +231 -0
  102. witwin_maxwell-0.4.0/tests/fdtd/thin_wire/test_thin_wire_port_binding_gpu.py +420 -0
  103. witwin_maxwell-0.4.0/tests/fdtd/thin_wire/test_thin_wire_reference.py +458 -0
  104. witwin_maxwell-0.4.0/tests/fdtd/thin_wire/test_thin_wire_rotation_acceptance.py +208 -0
  105. witwin_maxwell-0.4.0/tests/fdtd/thin_wire/test_wire_finite_conductivity.py +277 -0
  106. witwin_maxwell-0.4.0/tests/fdtd/thin_wire/test_wire_lossy_recurrence.py +295 -0
  107. witwin_maxwell-0.4.0/tests/gradients/e2e/__init__.py +0 -0
  108. witwin_maxwell-0.4.0/tests/gradients/finite_difference_gate.py +32 -0
  109. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/test_fdtd_adjoint_bridge.py +46 -1
  110. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/test_fdtd_adjoint_materials.py +123 -28
  111. witwin_maxwell-0.4.0/tests/gradients/test_fdtd_circuit_adjoint.py +663 -0
  112. witwin_maxwell-0.4.0/tests/gradients/test_fdtd_cpml_psi_active_adjoint.py +155 -0
  113. witwin_maxwell-0.4.0/tests/gradients/test_fdtd_network_adjoint.py +502 -0
  114. witwin_maxwell-0.4.0/tests/gradients/test_fdtd_rf_lumped_adjoint.py +792 -0
  115. witwin_maxwell-0.4.0/tests/gradients/test_fdtd_thin_wire_adjoint.py +543 -0
  116. witwin_maxwell-0.4.0/tests/gradients/test_fdtd_thin_wire_conductivity_adjoint.py +172 -0
  117. witwin_maxwell-0.4.0/tests/gradients/test_fdtd_thin_wire_port_adjoint.py +514 -0
  118. witwin_maxwell-0.4.0/tests/gradients/test_fdtd_waveport_adjoint.py +174 -0
  119. witwin_maxwell-0.4.0/tests/gradients/test_rf_postprocess_adjoint.py +181 -0
  120. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/anisotropic/test_fdtd_full_anisotropy.py +88 -0
  121. witwin_maxwell-0.4.0/tests/materials/combinations/__init__.py +0 -0
  122. witwin_maxwell-0.4.0/tests/materials/compiler/test_curved_subpixel_convergence.py +253 -0
  123. witwin_maxwell-0.4.0/tests/materials/compiler/test_edge_native_sampling.py +156 -0
  124. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_material_compiler.py +357 -0
  125. witwin_maxwell-0.4.0/tests/materials/compiler/test_pec_conformal_alignment.py +212 -0
  126. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_pec_conformal_nonuniform.py +13 -7
  127. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_subpixel_nonuniform.py +2 -1
  128. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/dispersive/test_custom_dispersive.py +33 -5
  129. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/dispersive/test_fdtd_dispersive.py +8 -4
  130. witwin_maxwell-0.4.0/tests/materials/ferrite/test_ferrite_reference.py +235 -0
  131. witwin_maxwell-0.4.0/tests/materials/ferrite/test_gyromagnetic_compiler.py +265 -0
  132. witwin_maxwell-0.4.0/tests/materials/ferrite/test_gyromagnetic_ferrite.py +262 -0
  133. witwin_maxwell-0.4.0/tests/materials/ferrite/test_gyromagnetic_forward.py +751 -0
  134. witwin_maxwell-0.4.0/tests/materials/ferrite/test_gyromagnetic_general_bias.py +628 -0
  135. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/sheet/test_lossy_metal.py +57 -62
  136. witwin_maxwell-0.4.0/tests/materials/sheet/test_surface_impedance_funnel.py +248 -0
  137. witwin_maxwell-0.4.0/tests/materials/surface_impedance/test_rational_surface_impedance.py +245 -0
  138. witwin_maxwell-0.4.0/tests/materials/surface_impedance/test_surface_impedance_ade.py +103 -0
  139. witwin_maxwell-0.4.0/tests/materials/surface_impedance/test_surface_impedance_resume.py +174 -0
  140. witwin_maxwell-0.4.0/tests/materials/surface_impedance/test_surface_impedance_runtime.py +131 -0
  141. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/monitors/observers/test_fdtd_observers.py +5 -5
  142. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/postprocess/scattering/test_mode_overlap.py +3 -0
  143. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/postprocess/scattering/test_ring_resonator_s21.py +11 -3
  144. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/postprocess/scattering/test_scattering_parameters.py +19 -4
  145. witwin_maxwell-0.4.0/tests/rational/test_core.py +213 -0
  146. witwin_maxwell-0.4.0/tests/rational/test_fit.py +83 -0
  147. witwin_maxwell-0.4.0/tests/rf/antenna/test_antenna_benchmark_e2e.py +203 -0
  148. witwin_maxwell-0.4.0/tests/rf/antenna/test_antenna_data.py +406 -0
  149. witwin_maxwell-0.4.0/tests/rf/antenna/test_antenna_matching_block.py +223 -0
  150. witwin_maxwell-0.4.0/tests/rf/antenna/test_result_antenna.py +253 -0
  151. witwin_maxwell-0.4.0/tests/rf/array/test_array_codebook.py +366 -0
  152. witwin_maxwell-0.4.0/tests/rf/array/test_array_contracts.py +696 -0
  153. witwin_maxwell-0.4.0/tests/rf/array/test_array_fullwave.py +287 -0
  154. witwin_maxwell-0.4.0/tests/rf/array/test_array_mimo.py +350 -0
  155. witwin_maxwell-0.4.0/tests/rf/array/test_array_persistence.py +262 -0
  156. witwin_maxwell-0.4.0/tests/rf/array/test_array_scene_gradient.py +605 -0
  157. witwin_maxwell-0.4.0/tests/rf/array/test_array_scene_gradient_ensemble.py +591 -0
  158. witwin_maxwell-0.4.0/tests/rf/circuits/test_circuit_conservation.py +438 -0
  159. witwin_maxwell-0.4.0/tests/rf/circuits/test_circuit_contract.py +156 -0
  160. witwin_maxwell-0.4.0/tests/rf/circuits/test_circuit_graph.py +150 -0
  161. witwin_maxwell-0.4.0/tests/rf/circuits/test_circuit_hot_path_op_count.py +163 -0
  162. witwin_maxwell-0.4.0/tests/rf/circuits/test_circuit_independent_crosscheck.py +409 -0
  163. witwin_maxwell-0.4.0/tests/rf/circuits/test_fdtd_circuit_coupling.py +449 -0
  164. witwin_maxwell-0.4.0/tests/rf/circuits/test_fdtd_circuit_resume.py +204 -0
  165. witwin_maxwell-0.4.0/tests/rf/circuits/test_mna_runtime.py +630 -0
  166. witwin_maxwell-0.4.0/tests/rf/circuits/test_phase3_multiport.py +437 -0
  167. witwin_maxwell-0.4.0/tests/rf/circuits/test_phase4_batched_mna.py +70 -0
  168. witwin_maxwell-0.4.0/tests/rf/circuits/test_phase4_circuit_cuda_graph.py +239 -0
  169. witwin_maxwell-0.4.0/tests/rf/circuits/test_result_circuit_data.py +219 -0
  170. witwin_maxwell-0.4.0/tests/rf/circuits/test_spice_parser.py +238 -0
  171. witwin_maxwell-0.4.0/tests/rf/contracts/test_network_data_contract.py +169 -0
  172. witwin_maxwell-0.4.0/tests/rf/contracts/test_port_conventions.py +144 -0
  173. witwin_maxwell-0.4.0/tests/rf/contracts/test_port_geometry_contract.py +101 -0
  174. witwin_maxwell-0.4.0/tests/rf/contracts/test_public_rf_api.py +121 -0
  175. witwin_maxwell-0.4.0/tests/rf/contracts/test_wire_port_binding_api.py +92 -0
  176. witwin_maxwell-0.4.0/tests/rf/lumped/test_fdtd_lumped_port_pec_gap.py +78 -0
  177. witwin_maxwell-0.4.0/tests/rf/lumped/test_fdtd_lumped_runtime.py +413 -0
  178. witwin_maxwell-0.4.0/tests/rf/lumped/test_fdtd_port_end_to_end.py +272 -0
  179. witwin_maxwell-0.4.0/tests/rf/lumped/test_port_data_persistence.py +106 -0
  180. witwin_maxwell-0.4.0/tests/rf/lumped/test_port_source_waveform.py +39 -0
  181. witwin_maxwell-0.4.0/tests/rf/lumped/test_result_port_data.py +146 -0
  182. witwin_maxwell-0.4.0/tests/rf/lumped/test_rlc_contract.py +101 -0
  183. witwin_maxwell-0.4.0/tests/rf/lumped/test_rlc_discretization.py +123 -0
  184. witwin_maxwell-0.4.0/tests/rf/lumped/test_scene_lumped_elements.py +141 -0
  185. witwin_maxwell-0.4.0/tests/rf/lumped/test_simulation_port_excitation.py +97 -0
  186. witwin_maxwell-0.4.0/tests/rf/network/fixtures/four_port_db.s4p +6 -0
  187. witwin_maxwell-0.4.0/tests/rf/network/fixtures/one_port_ri.s1p +4 -0
  188. witwin_maxwell-0.4.0/tests/rf/network/fixtures/two_port_ma.ts +12 -0
  189. witwin_maxwell-0.4.0/tests/rf/network/test_embedded_network_persistence.py +286 -0
  190. witwin_maxwell-0.4.0/tests/rf/network/test_finalize_state_norm_detach.py +68 -0
  191. witwin_maxwell-0.4.0/tests/rf/network/test_network_algebra.py +261 -0
  192. witwin_maxwell-0.4.0/tests/rf/network/test_network_block_contract.py +247 -0
  193. witwin_maxwell-0.4.0/tests/rf/network/test_network_cascade.py +290 -0
  194. witwin_maxwell-0.4.0/tests/rf/network/test_network_cascade_crosscheck.py +193 -0
  195. witwin_maxwell-0.4.0/tests/rf/network/test_network_conservation.py +268 -0
  196. witwin_maxwell-0.4.0/tests/rf/network/test_network_coupling_op_stream.py +74 -0
  197. witwin_maxwell-0.4.0/tests/rf/network/test_network_delay.py +384 -0
  198. witwin_maxwell-0.4.0/tests/rf/network/test_network_delay_checkpoint.py +154 -0
  199. witwin_maxwell-0.4.0/tests/rf/network/test_network_delay_integration.py +293 -0
  200. witwin_maxwell-0.4.0/tests/rf/network/test_network_multiport_fdtd.py +291 -0
  201. witwin_maxwell-0.4.0/tests/rf/network/test_network_multiport_runtime.py +380 -0
  202. witwin_maxwell-0.4.0/tests/rf/network/test_network_observer_hot_path.py +246 -0
  203. witwin_maxwell-0.4.0/tests/rf/network/test_network_persistence.py +115 -0
  204. witwin_maxwell-0.4.0/tests/rf/network/test_network_physicality.py +79 -0
  205. witwin_maxwell-0.4.0/tests/rf/network/test_network_runtime.py +457 -0
  206. witwin_maxwell-0.4.0/tests/rf/network/test_network_sweep.py +374 -0
  207. witwin_maxwell-0.4.0/tests/rf/network/test_touchstone.py +246 -0
  208. witwin_maxwell-0.4.0/tests/rf/network/test_touchstone_import.py +383 -0
  209. witwin_maxwell-0.4.0/tests/rf/nonlinear/_generate_goldens.py +104 -0
  210. witwin_maxwell-0.4.0/tests/rf/nonlinear/_rectifier_fixtures.py +130 -0
  211. witwin_maxwell-0.4.0/tests/rf/nonlinear/goldens/rectifier_goldens.pt +0 -0
  212. witwin_maxwell-0.4.0/tests/rf/nonlinear/test_newton_core.py +220 -0
  213. witwin_maxwell-0.4.0/tests/rf/nonlinear/test_nonlinear_device_contract.py +151 -0
  214. witwin_maxwell-0.4.0/tests/rf/nonlinear/test_nonlinear_device_math.py +102 -0
  215. witwin_maxwell-0.4.0/tests/rf/nonlinear/test_nonlinear_transient.py +332 -0
  216. witwin_maxwell-0.4.0/tests/rf/numerics/test_port_spectral_stagger.py +93 -0
  217. witwin_maxwell-0.4.0/tests/rf/numerics/test_tem_vi_prototype.py +88 -0
  218. witwin_maxwell-0.4.0/tests/rf/performance/measure_port_overhead_s2b.py +522 -0
  219. witwin_maxwell-0.4.0/tests/rf/performance/profile_port_hot_path.py +444 -0
  220. witwin_maxwell-0.4.0/tests/rf/performance/test_no_feature_fast_path.py +23 -0
  221. witwin_maxwell-0.4.0/tests/rf/performance/test_perf_variance_gate.py +160 -0
  222. witwin_maxwell-0.4.0/tests/rf/performance/test_port_energy_diagnostics_default_off.py +99 -0
  223. witwin_maxwell-0.4.0/tests/rf/performance/test_port_hot_path_op_count.py +128 -0
  224. witwin_maxwell-0.4.0/tests/rf/power_loss/test_power_loss_data.py +454 -0
  225. witwin_maxwell-0.4.0/tests/rf/terminal/test_terminal_port_contract.py +253 -0
  226. witwin_maxwell-0.4.0/tests/rf/wave_validation/__init__.py +0 -0
  227. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_asymmetric_reciprocity_power_balance.py +158 -0
  228. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_coax_contour_snap.py +37 -0
  229. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_interior_pec_operator.py +503 -0
  230. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_matched_s11_wave_level.py +98 -0
  231. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_microstrip_diffpair_wave_level.py +178 -0
  232. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_open_short_match_wave_level.py +154 -0
  233. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_planemonitor_waveport_passthrough.py +215 -0
  234. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_rf_reference_generation.py +158 -0
  235. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_rlc_resonance_wave_level.py +181 -0
  236. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_te10_mode_selection.py +132 -0
  237. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_transverse_operator.py +450 -0
  238. witwin_maxwell-0.4.0/tests/rf/wave_validation/test_waveguide_wave_level.py +114 -0
  239. witwin_maxwell-0.4.0/tests/rf/waveport/test_modal_port_data.py +136 -0
  240. witwin_maxwell-0.4.0/tests/rf/waveport/test_mode_tracking.py +205 -0
  241. witwin_maxwell-0.4.0/tests/rf/waveport/test_waveport_contract.py +471 -0
  242. witwin_maxwell-0.4.0/tests/rf/waveport/test_waveport_sweep.py +452 -0
  243. witwin_maxwell-0.4.0/tests/sar/test_incident_power.py +228 -0
  244. witwin_maxwell-0.4.0/tests/sar/test_mass_averaging.py +404 -0
  245. witwin_maxwell-0.4.0/tests/sar/test_mass_density.py +114 -0
  246. witwin_maxwell-0.4.0/tests/sar/test_normalization.py +123 -0
  247. witwin_maxwell-0.4.0/tests/sar/test_phantom_benchmarks.py +175 -0
  248. witwin_maxwell-0.4.0/tests/sar/test_phantom_convergence.py +122 -0
  249. witwin_maxwell-0.4.0/tests/sar/test_point_sar.py +406 -0
  250. witwin_maxwell-0.4.0/tests/sar/test_sar_combine.py +120 -0
  251. witwin_maxwell-0.4.0/tests/sar/test_sar_gradients.py +154 -0
  252. witwin_maxwell-0.4.0/tests/sar/test_sar_validation.py +85 -0
  253. witwin_maxwell-0.4.0/tests/sar/test_soft_peak.py +106 -0
  254. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/mode/test_fdtd_bent_mode_source.py +7 -0
  255. witwin_maxwell-0.4.0/tests/sources/mode/test_fdtd_pec_mode_solver.py +147 -0
  256. witwin_maxwell-0.4.0/tests/sources/mode/test_fdtd_unidirectional_launch.py +175 -0
  257. witwin_maxwell-0.4.0/tests/sources/mode/test_mode_eigensolver_physics.py +279 -0
  258. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/mode/test_mode_solver_gradients.py +55 -1
  259. witwin_maxwell-0.4.0/tests/sources/mode/test_mode_source_injection_physics.py +188 -0
  260. witwin_maxwell-0.4.0/tests/support/benchmark_circuit_performance.py +564 -0
  261. witwin_maxwell-0.4.0/tests/support/benchmark_ensemble_speedup.py +239 -0
  262. witwin_maxwell-0.4.0/tests/support/benchmark_network_embedding.py +260 -0
  263. witwin_maxwell-0.4.0/tests/support/benchmark_rf_no_feature.py +843 -0
  264. witwin_maxwell-0.4.0/tests/support/benchmark_thin_wire_reverse.py +159 -0
  265. witwin_maxwell-0.4.0/tests/support/compare_no_feature_op_stream.py +475 -0
  266. witwin_maxwell-0.4.0/tests/support/network_coupling_op_stream.py +280 -0
  267. witwin_maxwell-0.4.0/tests/support/perf_variance_gate.py +185 -0
  268. witwin_maxwell-0.4.0/tests/support/port_hot_path_tally.py +88 -0
  269. witwin_maxwell-0.4.0/tests/support/test_benchmark_circuit_performance.py +66 -0
  270. witwin_maxwell-0.4.0/tests/support/test_benchmark_rf_no_feature_provenance.py +232 -0
  271. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_autogrid_subpixel_thesis.py +27 -3
  272. witwin_maxwell-0.4.0/tests/validation/physics/test_pec_conformal.py +207 -0
  273. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_postprocess_end_to_end_validation.py +40 -8
  274. witwin_maxwell-0.4.0/tests/validation/physics/test_sibc_cylinder_convergence.py +220 -0
  275. witwin_maxwell-0.4.0/tests/validation/physics/test_sibc_orientation.py +218 -0
  276. witwin_maxwell-0.4.0/tests/validation/physics/test_sibc_staircase.py +276 -0
  277. witwin_maxwell-0.4.0/tests/validation/physics/test_sibc_zero_impact.py +124 -0
  278. witwin_maxwell-0.4.0/tests/validation/physics/test_surface_impedance_broadband.py +141 -0
  279. witwin_maxwell-0.4.0/witwin/maxwell/__init__.py +437 -0
  280. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/adapters/tidy3d.py +362 -17
  281. witwin_maxwell-0.4.0/witwin/maxwell/adjoint_inputs.py +207 -0
  282. witwin_maxwell-0.4.0/witwin/maxwell/antenna.py +307 -0
  283. witwin_maxwell-0.4.0/witwin/maxwell/array.py +1599 -0
  284. witwin_maxwell-0.4.0/witwin/maxwell/array_execution.py +67 -0
  285. witwin_maxwell-0.4.0/witwin/maxwell/array_gradient.py +375 -0
  286. witwin_maxwell-0.4.0/witwin/maxwell/breakdown.py +104 -0
  287. witwin_maxwell-0.4.0/witwin/maxwell/breakdown_risk.py +310 -0
  288. witwin_maxwell-0.4.0/witwin/maxwell/breakdown_stress.py +542 -0
  289. witwin_maxwell-0.4.0/witwin/maxwell/circuit_devices.py +292 -0
  290. witwin_maxwell-0.4.0/witwin/maxwell/circuits.py +1481 -0
  291. witwin_maxwell-0.4.0/witwin/maxwell/compiler/__init__.py +104 -0
  292. witwin_maxwell-0.4.0/witwin/maxwell/compiler/array.py +369 -0
  293. witwin_maxwell-0.4.0/witwin/maxwell/compiler/breakdown.py +151 -0
  294. witwin_maxwell-0.4.0/witwin/maxwell/compiler/circuits.py +320 -0
  295. witwin_maxwell-0.4.0/witwin/maxwell/compiler/delay.py +374 -0
  296. witwin_maxwell-0.4.0/witwin/maxwell/compiler/electrostatic.py +379 -0
  297. witwin_maxwell-0.4.0/witwin/maxwell/compiler/gyromagnetic.py +356 -0
  298. witwin_maxwell-0.4.0/witwin/maxwell/compiler/lumped.py +100 -0
  299. witwin_maxwell-0.4.0/witwin/maxwell/compiler/mass_density.py +139 -0
  300. witwin_maxwell-0.4.0/witwin/maxwell/compiler/materials.py +2623 -0
  301. witwin_maxwell-0.4.0/witwin/maxwell/compiler/mna.py +1085 -0
  302. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/compiler/monitors.py +80 -4
  303. witwin_maxwell-0.4.0/witwin/maxwell/compiler/networks.py +318 -0
  304. witwin_maxwell-0.4.0/witwin/maxwell/compiler/nonlinear_devices.py +916 -0
  305. witwin_maxwell-0.4.0/witwin/maxwell/compiler/ports.py +391 -0
  306. witwin_maxwell-0.4.0/witwin/maxwell/compiler/power_loss.py +175 -0
  307. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/compiler/sources.py +1 -0
  308. witwin_maxwell-0.4.0/witwin/maxwell/compiler/structures.py +21 -0
  309. witwin_maxwell-0.4.0/witwin/maxwell/compiler/subpixel.py +107 -0
  310. witwin_maxwell-0.4.0/witwin/maxwell/compiler/surface_impedance.py +275 -0
  311. witwin_maxwell-0.4.0/witwin/maxwell/compiler/thin_wire.py +2201 -0
  312. witwin_maxwell-0.4.0/witwin/maxwell/compiler/waveports.py +435 -0
  313. witwin_maxwell-0.4.0/witwin/maxwell/compiler/wire_impedance.py +426 -0
  314. witwin_maxwell-0.4.0/witwin/maxwell/constants.py +92 -0
  315. witwin_maxwell-0.4.0/witwin/maxwell/electrostatic/__init__.py +39 -0
  316. witwin_maxwell-0.4.0/witwin/maxwell/electrostatic/api.py +224 -0
  317. witwin_maxwell-0.4.0/witwin/maxwell/electrostatic/capacitance.py +433 -0
  318. witwin_maxwell-0.4.0/witwin/maxwell/electrostatic/initial_condition.py +305 -0
  319. witwin_maxwell-0.4.0/witwin/maxwell/electrostatic/runtime.py +878 -0
  320. witwin_maxwell-0.4.0/witwin/maxwell/esd.py +854 -0
  321. witwin_maxwell-0.4.0/witwin/maxwell/execution/__init__.py +45 -0
  322. witwin_maxwell-0.4.0/witwin/maxwell/execution/capacity.py +84 -0
  323. witwin_maxwell-0.4.0/witwin/maxwell/execution/ensemble.py +187 -0
  324. witwin_maxwell-0.4.0/witwin/maxwell/execution/executor.py +230 -0
  325. witwin_maxwell-0.4.0/witwin/maxwell/execution/plan.py +55 -0
  326. witwin_maxwell-0.4.0/witwin/maxwell/execution/pool.py +182 -0
  327. witwin_maxwell-0.4.0/witwin/maxwell/execution/records.py +144 -0
  328. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdfd/solver.py +12 -0
  329. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/__init__.py +10 -0
  330. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/adjoint/bridge.py +1481 -0
  331. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/adjoint/capabilities.py +2 -0
  332. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/adjoint/circuits.py +708 -0
  333. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/adjoint/core.py +576 -625
  334. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/adjoint/dispatch.py +59 -16
  335. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/adjoint/native.py +383 -124
  336. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/adjoint/profiler.py +3 -0
  337. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/adjoint/reverse_common.py +155 -7
  338. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/adjoint/seeds.py +477 -7
  339. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/boundary/cpml.py +0 -22
  340. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/checkpoint.py +573 -0
  341. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/circuits.py +1209 -0
  342. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/backend.py +204 -9
  343. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/build.py +33 -6
  344. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/extension.cpp +187 -28
  345. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/adjoint.cu +818 -1427
  346. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/boundary.cu +10 -16
  347. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/common.cuh +14 -0
  348. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/electric.cu +839 -826
  349. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/magnetic.cu +245 -105
  350. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/cuda/kernels/wire.cu +493 -0
  351. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/cuda/runtime/graph.py +123 -0
  352. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/tensors.h +20 -0
  353. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/delay.py +269 -0
  354. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/__init__.py +10 -0
  355. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/_shared.py +65 -0
  356. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/adjoint.py +1643 -0
  357. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/capacity.py +87 -0
  358. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/circuits.py +609 -0
  359. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/counts.py +25 -0
  360. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/frequency_counts.py +24 -0
  361. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/instrumentation.py +199 -0
  362. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/interpolation.py +35 -0
  363. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/monitor_merge.py +421 -0
  364. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/nccl_transport.py +841 -0
  365. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/networks.py +640 -0
  366. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/output.py +49 -0
  367. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/persistence.py +880 -0
  368. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/shard_engine.py +467 -0
  369. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/solver.py +1317 -0
  370. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/source_corrections.py +51 -0
  371. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/source_rebuild.py +76 -0
  372. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/sources.py +77 -0
  373. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/transport.py +532 -0
  374. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/distributed/wire.py +625 -0
  375. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/excitation/injection.py +46 -8
  376. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/excitation/modes/__init__.py +963 -0
  377. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/excitation/modes/common.py +592 -0
  378. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/excitation/modes/eigensolvers.py +310 -0
  379. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/excitation/modes/tem.py +354 -0
  380. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/excitation/modes/vector.py +1113 -0
  381. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/excitation/modes/yee.py +958 -0
  382. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/excitation/temporal.py +11 -30
  383. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/ferrite_reference.py +403 -0
  384. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/lumped.py +915 -0
  385. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/material_pullback.py +40 -18
  386. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/networks.py +1264 -0
  387. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/observers.py +168 -187
  388. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/ports.py +2088 -0
  389. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/quadrature.py +233 -0
  390. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/resume.py +714 -0
  391. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/runtime/__init__.py +14 -0
  392. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/runtime/breakdown.py +521 -0
  393. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/runtime/gyromagnetic.py +469 -0
  394. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/runtime/initialization.py +12 -6
  395. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/runtime/materials.py +571 -365
  396. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/runtime/spectral.py +76 -5
  397. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/runtime/stepping.py +494 -65
  398. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/solver.py +43 -2
  399. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/surface_impedance_reference.py +349 -0
  400. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/thin_wire_reference.py +388 -0
  401. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/wire.py +1371 -0
  402. witwin_maxwell-0.4.0/witwin/maxwell/fdtd/wire_lossy.py +627 -0
  403. witwin_maxwell-0.4.0/witwin/maxwell/fdtd_parallel.py +699 -0
  404. witwin_maxwell-0.4.0/witwin/maxwell/lumped.py +534 -0
  405. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/media.py +942 -14
  406. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/monitors.py +355 -1
  407. witwin_maxwell-0.4.0/witwin/maxwell/network.py +1613 -0
  408. witwin_maxwell-0.4.0/witwin/maxwell/network_math.py +339 -0
  409. witwin_maxwell-0.4.0/witwin/maxwell/network_sweep.py +324 -0
  410. witwin_maxwell-0.4.0/witwin/maxwell/ports.py +932 -0
  411. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/postprocess/RCS.py +4 -3
  412. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/postprocess/__init__.py +9 -0
  413. witwin_maxwell-0.4.0/witwin/maxwell/postprocess/antenna.py +712 -0
  414. witwin_maxwell-0.4.0/witwin/maxwell/postprocess/array.py +439 -0
  415. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/postprocess/diffraction.py +4 -6
  416. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/postprocess/directivity.py +3 -2
  417. witwin_maxwell-0.4.0/witwin/maxwell/postprocess/incident_power.py +200 -0
  418. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/postprocess/modal.py +14 -8
  419. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/postprocess/nfft.py +4 -5
  420. witwin_maxwell-0.4.0/witwin/maxwell/postprocess/power_loss.py +498 -0
  421. witwin_maxwell-0.4.0/witwin/maxwell/postprocess/sar.py +371 -0
  422. witwin_maxwell-0.4.0/witwin/maxwell/postprocess/sar_averaging.py +295 -0
  423. witwin_maxwell-0.4.0/witwin/maxwell/postprocess/sar_combine.py +289 -0
  424. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/postprocess/scattering_parameters.py +15 -3
  425. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/postprocess/stratton_chu.py +108 -32
  426. witwin_maxwell-0.4.0/witwin/maxwell/postprocess/waveports.py +432 -0
  427. witwin_maxwell-0.4.0/witwin/maxwell/power_loss.py +451 -0
  428. witwin_maxwell-0.4.0/witwin/maxwell/rational.py +1409 -0
  429. witwin_maxwell-0.4.0/witwin/maxwell/result.py +2236 -0
  430. witwin_maxwell-0.4.0/witwin/maxwell/sar.py +524 -0
  431. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/scene.py +375 -25
  432. witwin_maxwell-0.4.0/witwin/maxwell/simulation.py +1956 -0
  433. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/sources.py +40 -44
  434. witwin_maxwell-0.4.0/witwin/maxwell/thin_wire.py +491 -0
  435. witwin_maxwell-0.4.0/witwin/maxwell/touchstone.py +918 -0
  436. witwin_maxwell-0.4.0/witwin/maxwell/waveforms.py +107 -0
  437. witwin_maxwell-0.4.0/witwin/maxwell/waveport_sweep.py +937 -0
  438. witwin_maxwell-0.3.0/FEATURE_LIST.md +0 -432
  439. witwin_maxwell-0.3.0/docs/releases/0.3.0.md +0 -27
  440. witwin_maxwell-0.3.0/docs/validation/tidy3d-numerical-alignment-0.3.0.md +0 -130
  441. witwin_maxwell-0.3.0/tests/api/public/test_guard_census.py +0 -184
  442. witwin_maxwell-0.3.0/tests/validation/physics/test_pec_conformal.py +0 -90
  443. witwin_maxwell-0.3.0/witwin/maxwell/__init__.py +0 -164
  444. witwin_maxwell-0.3.0/witwin/maxwell/adjoint_inputs.py +0 -70
  445. witwin_maxwell-0.3.0/witwin/maxwell/compiler/__init__.py +0 -11
  446. witwin_maxwell-0.3.0/witwin/maxwell/compiler/materials.py +0 -1355
  447. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/__init__.py +0 -4
  448. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/adjoint/bridge.py +0 -746
  449. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/checkpoint.py +0 -227
  450. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/cuda/runtime/graph.py +0 -33
  451. witwin_maxwell-0.3.0/witwin/maxwell/fdtd/excitation/modes.py +0 -1675
  452. witwin_maxwell-0.3.0/witwin/maxwell/ports.py +0 -113
  453. witwin_maxwell-0.3.0/witwin/maxwell/result.py +0 -967
  454. witwin_maxwell-0.3.0/witwin/maxwell/simulation.py +0 -659
  455. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/LICENSE +0 -0
  456. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/hatch_build.py +0 -0
  457. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/scripts/perf_cuda_graph_dispersive.py +0 -0
  458. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/TEST_LAYOUT.md +0 -0
  459. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/__init__.py +0 -0
  460. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/api/adapters/gds/test_gds_adapter.py +0 -0
  461. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/api/public/test_dependency_contract.py +0 -0
  462. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/boundaries/absorbers/test_boundary_variants.py +0 -0
  463. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/boundaries/boundary_physics/test_fdtd_pec_material.py +0 -0
  464. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/boundaries/boundary_specs/test_fdtd_boundaries.py +0 -0
  465. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/boundaries/cpml/test_fdtd_cpml.py +0 -0
  466. {witwin_maxwell-0.3.0/tests/fdtd → witwin_maxwell-0.4.0/tests/breakdown}/__init__.py +0 -0
  467. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/conftest.py +0 -0
  468. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/core/geometry/test_mesh_geometry.py +0 -0
  469. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/core/grid/test_autogrid.py +0 -0
  470. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/core/grid/test_fdtd_coords.py +0 -0
  471. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/core/grid/test_nonuniform_placement.py +0 -0
  472. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/core/grid/test_nonuniform_uniform_equivalence.py +0 -0
  473. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/core/scene/test_scene.py +0 -0
  474. {witwin_maxwell-0.3.0/tests/fdtd/cuda → witwin_maxwell-0.4.0/tests/electrostatic}/__init__.py +0 -0
  475. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdfd/test_ams.py +0 -0
  476. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdfd/test_direct_solver.py +0 -0
  477. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdfd/test_krylov.py +0 -0
  478. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdfd/test_matrix_cache.py +0 -0
  479. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdfd/test_preconditioners.py +0 -0
  480. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdfd/test_symmetric_formulation.py +0 -0
  481. {witwin_maxwell-0.3.0/tests/gradients/e2e → witwin_maxwell-0.4.0/tests/fdtd}/__init__.py +0 -0
  482. {witwin_maxwell-0.3.0/tests/materials/combinations → witwin_maxwell-0.4.0/tests/fdtd/cuda}/__init__.py +0 -0
  483. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/_parity_backend.py +0 -0
  484. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_adjoint_native.py +0 -0
  485. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_common_parity.py +0 -0
  486. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_cpml_extension_parity.py +0 -0
  487. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_dispersive_parity.py +0 -0
  488. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_electric_boundary_parity.py +0 -0
  489. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_extension_load.py +0 -0
  490. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_sources_parity.py +0 -0
  491. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/cuda/test_cuda_spectral_observer_parity.py +0 -0
  492. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/test_cuda_graph.py +0 -0
  493. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/test_cuda_graph_capture_coverage.py +0 -0
  494. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/test_cuda_graph_complex_bloch.py +0 -0
  495. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/test_cuda_graph_dispersive.py +0 -0
  496. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/test_cuda_graph_nonlinear.py +0 -0
  497. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/test_cuda_graph_tfsf.py +0 -0
  498. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/test_cuda_graph_tfsf_slab.py +0 -0
  499. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/fdtd/test_fdtd_autoshutoff.py +0 -0
  500. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/README.md +0 -0
  501. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/__init__.py +0 -0
  502. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/e2e/test_fdtd_two_port_sparam_optimization.py +0 -0
  503. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/fdtd_adjoint_baselines.py +0 -0
  504. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/test_fdfd_adjoint.py +0 -0
  505. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/test_fdtd_adjoint_p6_acceptance.py +0 -0
  506. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/test_fdtd_adjoint_rigorous.py +0 -0
  507. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/test_fdtd_custom_source_adjoint.py +0 -0
  508. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/test_fdtd_mode_source_adjoint.py +0 -0
  509. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/gradients/test_fdtd_multisource_adjoint.py +0 -0
  510. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/__init__.py +0 -0
  511. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_aniso_pml_overlap_reflection.py +0 -0
  512. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_bloch_dispersive_forward.py +0 -0
  513. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_combination_matrix.py +0 -0
  514. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_diagonal_aniso_dispersive.py +0 -0
  515. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_lossy_anisotropic_slab.py +0 -0
  516. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_modulated_dispersive_nonlinear.py +0 -0
  517. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_modulated_slab_cpml.py +0 -0
  518. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_mu_tensor_dispersion.py +0 -0
  519. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_multi_frequency_modulation.py +0 -0
  520. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_rotated_birefringent_dispersive_slab.py +0 -0
  521. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/combinations/test_shg_dispersive_phase_matching.py +0 -0
  522. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_fdfd_material_support.py +0 -0
  523. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_pec_material.py +0 -0
  524. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_polarized_averaging.py +0 -0
  525. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_polyslab.py +0 -0
  526. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_subpixel_gradients.py +0 -0
  527. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_subpixel_normals.py +0 -0
  528. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/compiler/test_subpixel_spec.py +0 -0
  529. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/conductive/test_fdtd_conductive.py +0 -0
  530. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/conductive/test_fdtd_magnetic_conductive.py +0 -0
  531. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/dispersive/test_fdtd_gain.py +0 -0
  532. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/dispersive/test_fdtd_sellmeier.py +0 -0
  533. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/modulation/test_fdtd_modulation.py +0 -0
  534. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/nonlinear/test_fdtd_nonlinear.py +0 -0
  535. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/perturbation/test_perturbation_medium.py +0 -0
  536. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/sheet/__init__.py +0 -0
  537. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/sheet/sheet_measurement.py +0 -0
  538. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/sheet/test_fdtd_graphene.py +0 -0
  539. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/materials/sheet/test_fdtd_medium2d.py +0 -0
  540. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/monitors/diffraction/test_diffraction_monitor.py +0 -0
  541. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/monitors/emission/test_dipole_emission_monitor.py +0 -0
  542. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/monitors/material/test_permittivity_monitor.py +0 -0
  543. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/monitors/time/test_fdtd_time_monitors.py +0 -0
  544. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/postprocess/directivity/test_directivity.py +0 -0
  545. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/postprocess/evaluation/test_fdtd_evaluation.py +0 -0
  546. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/postprocess/rcs/test_postprocess.py +0 -0
  547. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/definitions/test_astigmatic_gaussian_beam.py +0 -0
  548. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/definitions/test_custom_source_time.py +0 -0
  549. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/definitions/test_custom_uniform_sources.py +0 -0
  550. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/definitions/test_sources.py +0 -0
  551. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/incident/test_fdtd_incident.py +0 -0
  552. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/incident/test_soft_planewave_absolute_power.py +0 -0
  553. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/mode/test_fdtd_anisotropic_aperture.py +0 -0
  554. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/mode/test_fdtd_broadband_mode_source.py +0 -0
  555. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/mode/test_fdtd_complex_lossy_slab_mode.py +0 -0
  556. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/mode/test_fdtd_mode_source.py +0 -0
  557. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/point/test_fdtd_source_normalization.py +0 -0
  558. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/point/test_fdtd_sources.py +0 -0
  559. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/tfsf/test_fdtd_grating_pulsed_bloch.py +0 -0
  560. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/tfsf/test_fdtd_grating_tfsf.py +0 -0
  561. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/sources/tfsf/test_fdtd_tfsf.py +0 -0
  562. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/cross_solver/test_fdfd_vs_fdtd.py +0 -0
  563. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_autogrid_physics.py +0 -0
  564. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_bloch_broadband_vs_cw.py +0 -0
  565. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_dispersive_metasurface_bloch.py +0 -0
  566. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_fdtd_boundary_tfsf_validation.py +0 -0
  567. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_fdtd_physics_correctness.py +0 -0
  568. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_layered_exterior_huygens_validation.py +0 -0
  569. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_lossy_metal_sibc.py +0 -0
  570. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_nonuniform_grid_physics.py +0 -0
  571. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_soft_planewave_graded.py +0 -0
  572. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/tests/validation/physics/test_tfsf_nonuniform.py +0 -0
  573. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/adapters/__init__.py +0 -0
  574. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/adapters/gds.py +0 -0
  575. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdfd/__init__.py +0 -0
  576. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdfd/adjoint/__init__.py +0 -0
  577. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdfd/adjoint/bridge.py +0 -0
  578. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdfd/ams.py +0 -0
  579. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdfd/krylov.py +0 -0
  580. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdfd/plotting.py +0 -0
  581. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdfd/postprocess.py +0 -0
  582. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/adjoint/__init__.py +0 -0
  583. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/boundary/__init__.py +0 -0
  584. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/boundary/bloch.py +0 -0
  585. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/boundary/common.py +0 -0
  586. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/boundary/runtime.py +0 -0
  587. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/coords.py +0 -0
  588. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/__init__.py +0 -0
  589. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/aniso.cu +0 -0
  590. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/common.cu +0 -0
  591. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/dispersive.cu +0 -0
  592. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/observers.cu +0 -0
  593. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/projection.cu +0 -0
  594. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/sources.cu +0 -0
  595. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/kernels/spectral.cu +0 -0
  596. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/launch.h +0 -0
  597. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/runtime/__init__.py +0 -0
  598. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/cuda/runtime/dispatcher.py +0 -0
  599. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/dispersion.py +0 -0
  600. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/evaluation.py +0 -0
  601. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/excitation/__init__.py +0 -0
  602. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/excitation/spatial.py +0 -0
  603. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/excitation/tfsf_apply.py +0 -0
  604. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/excitation/tfsf_common.py +0 -0
  605. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/excitation/tfsf_specs.py +0 -0
  606. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/excitation/tfsf_state.py +0 -0
  607. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/io.py +0 -0
  608. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/meshing/__init__.py +0 -0
  609. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/meshing/autogrid.py +0 -0
  610. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/plotting.py +0 -0
  611. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/postprocess.py +0 -0
  612. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/fdtd/runtime/module_cache.py +0 -0
  613. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/geometry/__init__.py +0 -0
  614. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/geometry/polyslab.py +0 -0
  615. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/materials.py +0 -0
  616. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/postprocess/emission.py +0 -0
  617. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/visualization/__init__.py +0 -0
  618. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/witwin/maxwell/visualization/interactive.py +0 -0
  619. {witwin_maxwell-0.3.0 → witwin_maxwell-0.4.0}/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:
@@ -263,6 +290,7 @@ jobs:
263
290
  - {python_version: "3.14", torch_version: "2.10.0", cuda_index: "cu128"}
264
291
  - {python_version: "3.14", torch_version: "2.11.0", cuda_index: "cu128"}
265
292
  - {python_version: "3.14", torch_version: "2.12.0", cuda_index: "cu126"}
293
+ - {python_version: "3.14", torch_version: "2.13.0", cuda_index: "cu126"}
266
294
 
267
295
  steps:
268
296
  - name: Set up Python
@@ -349,7 +377,7 @@ jobs:
349
377
 
350
378
  publish:
351
379
  name: Publish to PyPI
352
- if: github.event_name == 'release'
380
+ if: startsWith(github.ref, 'refs/tags/witwin-maxwell-v')
353
381
  needs:
354
382
  - build_cuda_wheels
355
383
  - test_torch_compatibility
@@ -381,3 +409,42 @@ jobs:
381
409
  with:
382
410
  packages-dir: dist
383
411
  skip-existing: true
412
+
413
+ create_release:
414
+ name: Create release
415
+ if: startsWith(github.ref, 'refs/tags/witwin-maxwell-v')
416
+ needs: publish
417
+ runs-on: ubuntu-latest
418
+ permissions:
419
+ contents: write
420
+
421
+ steps:
422
+ - name: Check out repository
423
+ uses: actions/checkout@v4
424
+
425
+ - name: Download wheel artifacts
426
+ uses: actions/download-artifact@v4
427
+ with:
428
+ pattern: wheel-*
429
+ path: dist
430
+ merge-multiple: true
431
+
432
+ - name: Download source distribution artifact
433
+ uses: actions/download-artifact@v4
434
+ with:
435
+ name: sdist
436
+ path: dist
437
+
438
+ - name: Create release with distribution artifacts
439
+ shell: bash
440
+ env:
441
+ GH_TOKEN: ${{ github.token }}
442
+ run: |
443
+ version="${GITHUB_REF_NAME#witwin-maxwell-v}"
444
+ notes="docs/reference/release-notes-${version}.md"
445
+ test -f "$notes"
446
+ gh release create "$GITHUB_REF_NAME" \
447
+ --verify-tag \
448
+ --title "witwin-maxwell ${version}" \
449
+ --notes-file "$notes" \
450
+ 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,14 @@ __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
+ experiments/
245
+ .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,26 @@ All notable user-visible changes to WiTwin Maxwell are documented here. The proj
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.0] - 2026-07-23
8
+
9
+ ### Added
10
+
11
+ - RF port, network, antenna, phased-array, thin-wire, electrostatic, capacitance, SAR, exposure, ESD, dielectric-breakdown, gyromagnetic, and generalized surface-impedance workflows.
12
+ - Distributed forward and adjoint execution, including CPML-trainable reverse paths and deterministic multi-device scene-gradient aggregation.
13
+
14
+ ### Changed
15
+
16
+ - Moved material sampling to native Yee-component locations, improving the geometry validation cluster while changing geometry-resolved numerical baselines.
17
+ - 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.
18
+ - Built Linux wheels against `manylinux_2_28`; Linux and Windows CUDA fat binaries include native SM87 SASS.
19
+ - Made version tags drive the gated package publication and release-artifact workflow.
20
+
21
+ ### Fixed
22
+
23
+ - Closed release-blocking CUDA graph, distributed checkpoint, conformal PEC, observer staggering, near-to-far quadrature, modal selection, and surface-impedance correctness gaps.
24
+
25
+ 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).
26
+
7
27
  ## [0.3.0] - 2026-07-13
8
28
 
9
29
  ### Added
@@ -46,6 +66,7 @@ Detailed numerical conventions, pitfalls, final comparison values, and intention
46
66
 
47
67
  - Previous public release.
48
68
 
49
- [Unreleased]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.3.0...HEAD
69
+ [Unreleased]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.4.0...HEAD
70
+ [0.4.0]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.3.0...witwin-maxwell-v0.4.0
50
71
  [0.3.0]: https://github.com/witwin-ai/witwin-maxwell/compare/witwin-maxwell-v0.2.0...witwin-maxwell-v0.3.0
51
72
  [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.