spintronics 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. spintronics-0.3.0/.github/ISSUE_TEMPLATE/bug_report.md +49 -0
  2. spintronics-0.3.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  3. spintronics-0.3.0/.github/ISSUE_TEMPLATE/feature_request.md +55 -0
  4. spintronics-0.3.0/.github/ISSUE_TEMPLATE/question.md +30 -0
  5. spintronics-0.3.0/.github/workflows/ci.yml.disabled +36 -0
  6. spintronics-0.3.0/.github/workflows/npm-publish.yml +165 -0
  7. spintronics-0.3.0/.github/workflows/pypi-publish.yml +145 -0
  8. spintronics-0.3.0/.gitignore +42 -0
  9. spintronics-0.3.0/CHANGELOG.md +654 -0
  10. spintronics-0.3.0/CODE_OF_CONDUCT.md +129 -0
  11. spintronics-0.3.0/CONTRIBUTING.md +256 -0
  12. spintronics-0.3.0/Cargo.lock +3798 -0
  13. spintronics-0.3.0/Cargo.toml +219 -0
  14. spintronics-0.3.0/LICENSE +201 -0
  15. spintronics-0.3.0/PKG-INFO +117 -0
  16. spintronics-0.3.0/PYPI_README.md +82 -0
  17. spintronics-0.3.0/README.ja.md +341 -0
  18. spintronics-0.3.0/README.md +795 -0
  19. spintronics-0.3.0/WASM_QUICKSTART.md +247 -0
  20. spintronics-0.3.0/benches/llg_benchmark.rs +163 -0
  21. spintronics-0.3.0/benches/spinchain_benchmark.rs +49 -0
  22. spintronics-0.3.0/benches/vector3_benchmark.rs +57 -0
  23. spintronics-0.3.0/build-wasm.sh +63 -0
  24. spintronics-0.3.0/clippy.toml +26 -0
  25. spintronics-0.3.0/examples/2d_material_spintronics.rs +334 -0
  26. spintronics-0.3.0/examples/README.md +269 -0
  27. spintronics-0.3.0/examples/active_learning_demo.rs +133 -0
  28. spintronics-0.3.0/examples/advanced_spintronics.rs +254 -0
  29. spintronics-0.3.0/examples/altermagnet_ruo2.rs +150 -0
  30. spintronics-0.3.0/examples/autodiff_parameter_fitting.rs +311 -0
  31. spintronics-0.3.0/examples/axion_magnon_photon.rs +296 -0
  32. spintronics-0.3.0/examples/backward_volume_magnons.rs +147 -0
  33. spintronics-0.3.0/examples/bayesian_opt_materials.rs +99 -0
  34. spintronics-0.3.0/examples/bife_o3_multiferroic.rs +223 -0
  35. spintronics-0.3.0/examples/damon_eshbach_nonreciprocity.rs +184 -0
  36. spintronics-0.3.0/examples/data_export_formats.rs +435 -0
  37. spintronics-0.3.0/examples/equivariant_nn_demo.rs +171 -0
  38. spintronics-0.3.0/examples/experimental_validation_demo.rs +177 -0
  39. spintronics-0.3.0/examples/fem_micromagnetics.rs +190 -0
  40. spintronics-0.3.0/examples/fluid_barnett.rs +122 -0
  41. spintronics-0.3.0/examples/gpu_device_demo.rs +157 -0
  42. spintronics-0.3.0/examples/graph_nn_lattice.rs +101 -0
  43. spintronics-0.3.0/examples/heun_adaptive_thermal_llg.rs +77 -0
  44. spintronics-0.3.0/examples/hopfion_3d.rs +176 -0
  45. spintronics-0.3.0/examples/hoti_corner_states.rs +242 -0
  46. spintronics-0.3.0/examples/implicit_midpoint_stiff_demo.rs +174 -0
  47. spintronics-0.3.0/examples/kane_mele_qsh.rs +248 -0
  48. spintronics-0.3.0/examples/llg_dynamics_visualization.rs +175 -0
  49. spintronics-0.3.0/examples/magnetoelastic_switching.rs +243 -0
  50. spintronics-0.3.0/examples/magnon_bec.rs +192 -0
  51. spintronics-0.3.0/examples/magnon_polariton.rs +379 -0
  52. spintronics-0.3.0/examples/magnon_propagation.rs +187 -0
  53. spintronics-0.3.0/examples/magnon_zero_point.rs +376 -0
  54. spintronics-0.3.0/examples/magnonic_crystal.rs +279 -0
  55. spintronics-0.3.0/examples/magnonic_crystal_bandgap.rs +154 -0
  56. spintronics-0.3.0/examples/mech_coupling.rs +189 -0
  57. spintronics-0.3.0/examples/nanodisk_modes.rs +146 -0
  58. spintronics-0.3.0/examples/negf_transport.rs +354 -0
  59. spintronics-0.3.0/examples/neural_exchange_training.rs +186 -0
  60. spintronics-0.3.0/examples/nonlinear_magnon_suhl.rs +287 -0
  61. spintronics-0.3.0/examples/orbital_hall_effect.rs +197 -0
  62. spintronics-0.3.0/examples/parallel_magnon_dynamics.rs +279 -0
  63. spintronics-0.3.0/examples/pimc_heisenberg_chain.rs +64 -0
  64. spintronics-0.3.0/examples/pinn_llg_solver.rs +196 -0
  65. spintronics-0.3.0/examples/random_anisotropy_disorder.rs +380 -0
  66. spintronics-0.3.0/examples/reservoir_computing.rs +224 -0
  67. spintronics-0.3.0/examples/saitoh_2006_ishe.rs +171 -0
  68. spintronics-0.3.0/examples/simulation_builder.rs +210 -0
  69. spintronics-0.3.0/examples/skyrmion_dynamics.rs +197 -0
  70. spintronics-0.3.0/examples/skyrmion_visualization.rs +180 -0
  71. spintronics-0.3.0/examples/spin_ice_monopoles.rs +195 -0
  72. spintronics-0.3.0/examples/spin_spiral_tbmno3.rs +227 -0
  73. spintronics-0.3.0/examples/spin_torque_oscillator.rs +212 -0
  74. spintronics-0.3.0/examples/spin_wave_dispersion.rs +207 -0
  75. spintronics-0.3.0/examples/tavis_cummings_dicke.rs +335 -0
  76. spintronics-0.3.0/examples/thermal_magnon_transport.rs +304 -0
  77. spintronics-0.3.0/examples/topological_insulator.rs +285 -0
  78. spintronics-0.3.0/examples/topological_magnon_haldane.rs +431 -0
  79. spintronics-0.3.0/examples/validation_full_suite.rs +252 -0
  80. spintronics-0.3.0/examples/validation_landmark_suite.rs +187 -0
  81. spintronics-0.3.0/examples/yig_pt_pumping.rs +128 -0
  82. spintronics-0.3.0/py/Cargo.toml +25 -0
  83. spintronics-0.3.0/py/Makefile +66 -0
  84. spintronics-0.3.0/py/PYPI_README.md +82 -0
  85. spintronics-0.3.0/py/src/lib.rs +36 -0
  86. spintronics-0.3.0/pyproject.toml +82 -0
  87. spintronics-0.3.0/python/spintronics/__init__.py +64 -0
  88. spintronics-0.3.0/python/spintronics/__init__.pyi +469 -0
  89. spintronics-0.3.0/python/spintronics/py.typed +0 -0
  90. spintronics-0.3.0/rustfmt.toml +55 -0
  91. spintronics-0.3.0/src/afm/antiferromagnet.rs +221 -0
  92. spintronics-0.3.0/src/afm/mod.rs +39 -0
  93. spintronics-0.3.0/src/ai/mod.rs +70 -0
  94. spintronics-0.3.0/src/ai/reservoir.rs +354 -0
  95. spintronics-0.3.0/src/altermagnet/materials.rs +771 -0
  96. spintronics-0.3.0/src/altermagnet/mod.rs +84 -0
  97. spintronics-0.3.0/src/altermagnet/transport.rs +692 -0
  98. spintronics-0.3.0/src/autodiff/active_learning.rs +763 -0
  99. spintronics-0.3.0/src/autodiff/bayesian_opt.rs +1018 -0
  100. spintronics-0.3.0/src/autodiff/equivariant.rs +941 -0
  101. spintronics-0.3.0/src/autodiff/graph_nn.rs +881 -0
  102. spintronics-0.3.0/src/autodiff/mod.rs +104 -0
  103. spintronics-0.3.0/src/autodiff/neural.rs +852 -0
  104. spintronics-0.3.0/src/autodiff/optimizer.rs +798 -0
  105. spintronics-0.3.0/src/autodiff/physics_fns.rs +507 -0
  106. spintronics-0.3.0/src/autodiff/pinn.rs +578 -0
  107. spintronics-0.3.0/src/autodiff/structure_opt.rs +711 -0
  108. spintronics-0.3.0/src/autodiff/tape.rs +771 -0
  109. spintronics-0.3.0/src/benchmark.rs +290 -0
  110. spintronics-0.3.0/src/builder/mod.rs +1354 -0
  111. spintronics-0.3.0/src/builder/states.rs +51 -0
  112. spintronics-0.3.0/src/caloritronics/cross_effects.rs +448 -0
  113. spintronics-0.3.0/src/caloritronics/heat_current.rs +172 -0
  114. spintronics-0.3.0/src/caloritronics/mod.rs +61 -0
  115. spintronics-0.3.0/src/caloritronics/onsager.rs +310 -0
  116. spintronics-0.3.0/src/cavity/hybrid.rs +275 -0
  117. spintronics-0.3.0/src/cavity/mod.rs +91 -0
  118. spintronics-0.3.0/src/cavity/optomagnonic.rs +721 -0
  119. spintronics-0.3.0/src/cavity/polariton.rs +611 -0
  120. spintronics-0.3.0/src/cavity/tavis_cummings.rs +426 -0
  121. spintronics-0.3.0/src/circuit/accumulation.rs +210 -0
  122. spintronics-0.3.0/src/circuit/mod.rs +15 -0
  123. spintronics-0.3.0/src/circuit/network.rs +202 -0
  124. spintronics-0.3.0/src/circuit/resistor.rs +161 -0
  125. spintronics-0.3.0/src/constants.rs +196 -0
  126. spintronics-0.3.0/src/dynamics/integrators/adaptive.rs +162 -0
  127. spintronics-0.3.0/src/dynamics/integrators/crank_nicolson.rs +776 -0
  128. spintronics-0.3.0/src/dynamics/integrators/dormand_prince.rs +487 -0
  129. spintronics-0.3.0/src/dynamics/integrators/implicit_midpoint.rs +700 -0
  130. spintronics-0.3.0/src/dynamics/integrators/mod.rs +42 -0
  131. spintronics-0.3.0/src/dynamics/integrators/rhs_fn.rs +101 -0
  132. spintronics-0.3.0/src/dynamics/integrators/semi_implicit.rs +131 -0
  133. spintronics-0.3.0/src/dynamics/integrators/symplectic.rs +282 -0
  134. spintronics-0.3.0/src/dynamics/integrators/tests.rs +677 -0
  135. spintronics-0.3.0/src/dynamics/llb.rs +732 -0
  136. spintronics-0.3.0/src/dynamics/llg.rs +607 -0
  137. spintronics-0.3.0/src/dynamics/mod.rs +12 -0
  138. spintronics-0.3.0/src/effect/ishe.rs +295 -0
  139. spintronics-0.3.0/src/effect/mod.rs +34 -0
  140. spintronics-0.3.0/src/effect/prelude.rs +25 -0
  141. spintronics-0.3.0/src/effect/rashba.rs +531 -0
  142. spintronics-0.3.0/src/effect/sot.rs +445 -0
  143. spintronics-0.3.0/src/effect/spin_nernst.rs +403 -0
  144. spintronics-0.3.0/src/effect/sse.rs +258 -0
  145. spintronics-0.3.0/src/effect/topological_hall.rs +494 -0
  146. spintronics-0.3.0/src/error.rs +162 -0
  147. spintronics-0.3.0/src/fem/assembly.rs +327 -0
  148. spintronics-0.3.0/src/fem/element.rs +205 -0
  149. spintronics-0.3.0/src/fem/mesh.rs +264 -0
  150. spintronics-0.3.0/src/fem/micromagnetic.rs +706 -0
  151. spintronics-0.3.0/src/fem/mod.rs +66 -0
  152. spintronics-0.3.0/src/fem/solver.rs +547 -0
  153. spintronics-0.3.0/src/fluid/barnett.rs +161 -0
  154. spintronics-0.3.0/src/fluid/mod.rs +25 -0
  155. spintronics-0.3.0/src/fluid/navier_stokes.rs +210 -0
  156. spintronics-0.3.0/src/fluid/vorticity.rs +176 -0
  157. spintronics-0.3.0/src/frustrated/kagome.rs +591 -0
  158. spintronics-0.3.0/src/frustrated/lattice.rs +909 -0
  159. spintronics-0.3.0/src/frustrated/mod.rs +66 -0
  160. spintronics-0.3.0/src/frustrated/spin_ice.rs +638 -0
  161. spintronics-0.3.0/src/gpu/cpu.rs +312 -0
  162. spintronics-0.3.0/src/gpu/cuda.rs +191 -0
  163. spintronics-0.3.0/src/gpu/mod.rs +225 -0
  164. spintronics-0.3.0/src/io/mod.rs +8 -0
  165. spintronics-0.3.0/src/io/ovf.rs +528 -0
  166. spintronics-0.3.0/src/lib.rs +242 -0
  167. spintronics-0.3.0/src/llg.rs +268 -0
  168. spintronics-0.3.0/src/magnon/bec.rs +1096 -0
  169. spintronics-0.3.0/src/magnon/chain.rs +320 -0
  170. spintronics-0.3.0/src/magnon/detector.rs +221 -0
  171. spintronics-0.3.0/src/magnon/mod.rs +38 -0
  172. spintronics-0.3.0/src/magnon/nonlinear.rs +1138 -0
  173. spintronics-0.3.0/src/magnon/parallel.rs +369 -0
  174. spintronics-0.3.0/src/magnon/solver.rs +307 -0
  175. spintronics-0.3.0/src/magnon/spectral.rs +746 -0
  176. spintronics-0.3.0/src/magnon/spin_density_wave.rs +912 -0
  177. spintronics-0.3.0/src/material/antiferromagnet.rs +420 -0
  178. spintronics-0.3.0/src/material/defects.rs +702 -0
  179. spintronics-0.3.0/src/material/disorder.rs +863 -0
  180. spintronics-0.3.0/src/material/ferromagnet.rs +346 -0
  181. spintronics-0.3.0/src/material/interface.rs +277 -0
  182. spintronics-0.3.0/src/material/magnetic_2d.rs +516 -0
  183. spintronics-0.3.0/src/material/mod.rs +53 -0
  184. spintronics-0.3.0/src/material/multilayer.rs +399 -0
  185. spintronics-0.3.0/src/material/prelude.rs +33 -0
  186. spintronics-0.3.0/src/material/random_anisotropy.rs +588 -0
  187. spintronics-0.3.0/src/material/temperature.rs +381 -0
  188. spintronics-0.3.0/src/material/topological.rs +420 -0
  189. spintronics-0.3.0/src/material/traits.rs +188 -0
  190. spintronics-0.3.0/src/material/weyl.rs +483 -0
  191. spintronics-0.3.0/src/math/complex.rs +318 -0
  192. spintronics-0.3.0/src/math/matrix.rs +879 -0
  193. spintronics-0.3.0/src/math/mod.rs +47 -0
  194. spintronics-0.3.0/src/mech/barnett_effect.rs +132 -0
  195. spintronics-0.3.0/src/mech/cantilever.rs +133 -0
  196. spintronics-0.3.0/src/mech/coupled_dynamics.rs +110 -0
  197. spintronics-0.3.0/src/mech/einstein_de_haas.rs +91 -0
  198. spintronics-0.3.0/src/mech/magnetoelastic.rs +981 -0
  199. spintronics-0.3.0/src/mech/mod.rs +37 -0
  200. spintronics-0.3.0/src/mech/straintronics.rs +886 -0
  201. spintronics-0.3.0/src/memory/mod.rs +354 -0
  202. spintronics-0.3.0/src/multiferroic/magnetoelectric.rs +908 -0
  203. spintronics-0.3.0/src/multiferroic/mod.rs +125 -0
  204. spintronics-0.3.0/src/multiferroic/spin_polarization.rs +737 -0
  205. spintronics-0.3.0/src/negf/accumulation.rs +704 -0
  206. spintronics-0.3.0/src/negf/green_function.rs +849 -0
  207. spintronics-0.3.0/src/negf/keldysh.rs +407 -0
  208. spintronics-0.3.0/src/negf/mod.rs +50 -0
  209. spintronics-0.3.0/src/negf/shot_noise.rs +349 -0
  210. spintronics-0.3.0/src/noncollinear/luttinger_tisza.rs +608 -0
  211. spintronics-0.3.0/src/noncollinear/mod.rs +97 -0
  212. spintronics-0.3.0/src/noncollinear/spiral.rs +781 -0
  213. spintronics-0.3.0/src/orbitronics/mod.rs +61 -0
  214. spintronics-0.3.0/src/orbitronics/orbital_hall.rs +946 -0
  215. spintronics-0.3.0/src/orbitronics/orbital_torque.rs +1001 -0
  216. spintronics-0.3.0/src/parallel/decomposition.rs +937 -0
  217. spintronics-0.3.0/src/parallel/mod.rs +13 -0
  218. spintronics-0.3.0/src/parallel/sweep.rs +605 -0
  219. spintronics-0.3.0/src/prelude.rs +215 -0
  220. spintronics-0.3.0/src/python/batch.rs +179 -0
  221. spintronics-0.3.0/src/python/caloritronics.rs +430 -0
  222. spintronics-0.3.0/src/python/dynamics.rs +209 -0
  223. spintronics-0.3.0/src/python/effects.rs +140 -0
  224. spintronics-0.3.0/src/python/llb.rs +319 -0
  225. spintronics-0.3.0/src/python/materials.rs +271 -0
  226. spintronics-0.3.0/src/python/mod.rs +83 -0
  227. spintronics-0.3.0/src/python/simulation.rs +176 -0
  228. spintronics-0.3.0/src/python/vector.rs +183 -0
  229. spintronics-0.3.0/src/quantum/bogoliubov.rs +666 -0
  230. spintronics-0.3.0/src/quantum/holstein_primakoff.rs +433 -0
  231. spintronics-0.3.0/src/quantum/mod.rs +60 -0
  232. spintronics-0.3.0/src/quantum/zero_point.rs +487 -0
  233. spintronics-0.3.0/src/simd.rs +1065 -0
  234. spintronics-0.3.0/src/spinwave/bvmsw.rs +540 -0
  235. spintronics-0.3.0/src/spinwave/damon_eshbach.rs +620 -0
  236. spintronics-0.3.0/src/spinwave/dispersion.rs +553 -0
  237. spintronics-0.3.0/src/spinwave/magnonic_crystal.rs +913 -0
  238. spintronics-0.3.0/src/spinwave/mod.rs +63 -0
  239. spintronics-0.3.0/src/spinwave/modes.rs +666 -0
  240. spintronics-0.3.0/src/spinwave/nanodisk.rs +619 -0
  241. spintronics-0.3.0/src/spinwave/quantization.rs +692 -0
  242. spintronics-0.3.0/src/spinwave/semi_infinite_de.rs +453 -0
  243. spintronics-0.3.0/src/spinwave/surface.rs +488 -0
  244. spintronics-0.3.0/src/stochastic/heun_adaptive.rs +605 -0
  245. spintronics-0.3.0/src/stochastic/implicit_milstein.rs +772 -0
  246. spintronics-0.3.0/src/stochastic/mod.rs +49 -0
  247. spintronics-0.3.0/src/stochastic/pimc.rs +785 -0
  248. spintronics-0.3.0/src/stochastic/thermal.rs +282 -0
  249. spintronics-0.3.0/src/texture/dmi.rs +485 -0
  250. spintronics-0.3.0/src/texture/domain_wall.rs +234 -0
  251. spintronics-0.3.0/src/texture/hopfion.rs +1703 -0
  252. spintronics-0.3.0/src/texture/hopfion_dynamics.rs +981 -0
  253. spintronics-0.3.0/src/texture/mod.rs +40 -0
  254. spintronics-0.3.0/src/texture/prelude.rs +28 -0
  255. spintronics-0.3.0/src/texture/skyrmion.rs +501 -0
  256. spintronics-0.3.0/src/texture/topology.rs +141 -0
  257. spintronics-0.3.0/src/thermo/ane.rs +182 -0
  258. spintronics-0.3.0/src/thermo/magnon_thermal.rs +199 -0
  259. spintronics-0.3.0/src/thermo/mod.rs +28 -0
  260. spintronics-0.3.0/src/thermo/multilayer.rs +322 -0
  261. spintronics-0.3.0/src/thermo/peltier.rs +164 -0
  262. spintronics-0.3.0/src/thermo/prelude.rs +21 -0
  263. spintronics-0.3.0/src/topomagnon/axion.rs +764 -0
  264. spintronics-0.3.0/src/topomagnon/band_model.rs +821 -0
  265. spintronics-0.3.0/src/topomagnon/band_model_3d.rs +382 -0
  266. spintronics-0.3.0/src/topomagnon/berry_curvature.rs +321 -0
  267. spintronics-0.3.0/src/topomagnon/chern_number.rs +383 -0
  268. spintronics-0.3.0/src/topomagnon/edge_modes.rs +452 -0
  269. spintronics-0.3.0/src/topomagnon/hoti.rs +1048 -0
  270. spintronics-0.3.0/src/topomagnon/magnon_hall.rs +349 -0
  271. spintronics-0.3.0/src/topomagnon/mod.rs +88 -0
  272. spintronics-0.3.0/src/topomagnon/qsh.rs +1339 -0
  273. spintronics-0.3.0/src/topomagnon/wilson.rs +650 -0
  274. spintronics-0.3.0/src/transport/diffusion.rs +106 -0
  275. spintronics-0.3.0/src/transport/mod.rs +7 -0
  276. spintronics-0.3.0/src/transport/pumping.rs +191 -0
  277. spintronics-0.3.0/src/units.rs +232 -0
  278. spintronics-0.3.0/src/validation/experimental/boona_2014.rs +487 -0
  279. spintronics-0.3.0/src/validation/experimental/demidov_2006.rs +240 -0
  280. spintronics-0.3.0/src/validation/experimental/garello_2013.rs +473 -0
  281. spintronics-0.3.0/src/validation/experimental/liu_2012.rs +390 -0
  282. spintronics-0.3.0/src/validation/experimental/mod.rs +150 -0
  283. spintronics-0.3.0/src/validation/experimental/mosendz_2010.rs +429 -0
  284. spintronics-0.3.0/src/validation/experimental/saitoh_2006.rs +294 -0
  285. spintronics-0.3.0/src/validation/experimental/uchida_2008.rs +316 -0
  286. spintronics-0.3.0/src/validation/mod.rs +42 -0
  287. spintronics-0.3.0/src/validation/parameter_checks.rs +216 -0
  288. spintronics-0.3.0/src/vector3.rs +299 -0
  289. spintronics-0.3.0/src/visualization/csv.rs +306 -0
  290. spintronics-0.3.0/src/visualization/hdf5.rs +327 -0
  291. spintronics-0.3.0/src/visualization/json.rs +348 -0
  292. spintronics-0.3.0/src/visualization/mod.rs +79 -0
  293. spintronics-0.3.0/src/visualization/netcdf.rs +910 -0
  294. spintronics-0.3.0/src/visualization/vti.rs +523 -0
  295. spintronics-0.3.0/src/visualization/vtk.rs +489 -0
  296. spintronics-0.3.0/src/visualization/xdmf.rs +453 -0
  297. spintronics-0.3.0/src/visualization/zarr.rs +670 -0
  298. spintronics-0.3.0/src/wasm/mod.rs +519 -0
  299. spintronics-0.3.0/tests/property_conservation.proptest-regressions +8 -0
  300. spintronics-0.3.0/tests/property_conservation.rs +320 -0
  301. spintronics-0.3.0/tests/property_symmetries.proptest-regressions +7 -0
  302. spintronics-0.3.0/tests/property_symmetries.rs +362 -0
  303. spintronics-0.3.0/wasm-demo/README.md +171 -0
  304. spintronics-0.3.0/wasm-demo/index.html +577 -0
  305. spintronics-0.3.0/wasm-demo/serve.sh +20 -0
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug or unexpected behavior
4
+ title: '[BUG] '
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Bug Description
10
+ A clear and concise description of what the bug is.
11
+
12
+ ## To Reproduce
13
+ Steps to reproduce the behavior:
14
+ 1. Create/configure '...'
15
+ 2. Run '...'
16
+ 3. See error
17
+
18
+ ## Expected Behavior
19
+ A clear and concise description of what you expected to happen.
20
+
21
+ ## Actual Behavior
22
+ What actually happened.
23
+
24
+ ## Code Example
25
+ ```rust
26
+ // Minimal reproducible example
27
+ use spintronics::prelude::*;
28
+
29
+ fn main() {
30
+ // Your code here
31
+ }
32
+ ```
33
+
34
+ ## Environment
35
+ - **OS**: [e.g., Ubuntu 22.04, macOS 14, Windows 11]
36
+ - **Rust version**: [e.g., 1.75.0]
37
+ - **Spintronics version**: [e.g., 0.2.0]
38
+ - **Features enabled**: [e.g., default, serde, hdf5]
39
+
40
+ ## Physics Context (if applicable)
41
+ - **Physical system**: [e.g., YIG/Pt bilayer, CoFeB thin film]
42
+ - **Expected physical behavior**: [e.g., precession frequency should be ~5 GHz]
43
+ - **Reference paper**: [if comparing to published results]
44
+
45
+ ## Additional Context
46
+ Add any other context about the problem here.
47
+
48
+ ## Possible Solution (optional)
49
+ If you have ideas about what might be causing this or how to fix it.
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://docs.rs/spintronics
5
+ about: Check the API documentation for usage examples
6
+ - name: Security Issues
7
+ url: https://github.com/cool-japan/spintronics/security/policy
8
+ about: Report security vulnerabilities privately
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature or enhancement
4
+ title: '[FEATURE] '
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Feature Description
10
+ A clear and concise description of the feature you'd like to see.
11
+
12
+ ## Use Case
13
+ Describe the problem this feature would solve or the use case it enables.
14
+
15
+ **Example scenario:**
16
+ > "As a spintronics researcher, I want to simulate X so that I can Y."
17
+
18
+ ## Proposed Solution
19
+ Describe how you envision this feature working.
20
+
21
+ ### API Design (if applicable)
22
+ ```rust
23
+ // Suggested API usage
24
+ use spintronics::prelude::*;
25
+
26
+ // Example of how the feature might be used
27
+ let result = new_feature::calculate(...);
28
+ ```
29
+
30
+ ## Physics Background (if applicable)
31
+ - **Physical phenomenon**: [e.g., magnon-phonon coupling]
32
+ - **Key equations**: [LaTeX or description]
33
+ - **Reference papers**: [DOI or citation]
34
+
35
+ ## Alternatives Considered
36
+ Describe any alternative solutions or features you've considered.
37
+
38
+ ## Implementation Notes (optional)
39
+ If you have ideas about how this could be implemented:
40
+ - [ ] New module needed?
41
+ - [ ] Modifications to existing types?
42
+ - [ ] New dependencies required?
43
+
44
+ ## Priority/Urgency
45
+ - [ ] Critical for my research
46
+ - [ ] Would be nice to have
47
+ - [ ] Long-term improvement
48
+
49
+ ## Willingness to Contribute
50
+ - [ ] I would be willing to help implement this feature
51
+ - [ ] I can provide test cases or validation data
52
+ - [ ] I can provide physics guidance
53
+
54
+ ## Additional Context
55
+ Add any other context, screenshots, or references about the feature request here.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Question
3
+ about: Ask a question about usage or physics
4
+ title: '[QUESTION] '
5
+ labels: question
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Question
10
+ Your question here.
11
+
12
+ ## Context
13
+ What are you trying to accomplish? What have you tried so far?
14
+
15
+ ## Code (if applicable)
16
+ ```rust
17
+ // Relevant code snippet
18
+ ```
19
+
20
+ ## Physics Context (if applicable)
21
+ - **Physical system**: [e.g., spin pumping in YIG/Pt]
22
+ - **What you're calculating**: [e.g., ISHE voltage]
23
+ - **Expected result**: [e.g., ~1 μV based on Saitoh 2006]
24
+
25
+ ## Environment
26
+ - **Spintronics version**: [e.g., 0.2.0]
27
+ - **Rust version**: [e.g., 1.75.0]
28
+
29
+ ## Additional Context
30
+ Any other relevant information.
@@ -0,0 +1,36 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master, main, "0.*"]
6
+ pull_request:
7
+
8
+ env:
9
+ CARGO_TERM_COLOR: always
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: dtolnay/rust-toolchain@stable
17
+ - uses: Swatinem/rust-cache@v2
18
+ - run: cargo nextest run --features "default,parallel" --no-fail-fast
19
+
20
+ clippy:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - uses: dtolnay/rust-toolchain@stable
25
+ with:
26
+ components: clippy
27
+ - uses: Swatinem/rust-cache@v2
28
+ - run: cargo clippy --features "default,parallel" --all-targets -- -D warnings
29
+
30
+ docs:
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - uses: dtolnay/rust-toolchain@stable
35
+ - uses: Swatinem/rust-cache@v2
36
+ - run: RUSTDOCFLAGS="-D warnings" cargo doc --features "default,parallel" --no-deps
@@ -0,0 +1,165 @@
1
+ # npm Publishing Workflow for Spintronics WASM bindings
2
+ # Builds and publishes @cooljapan/spintronics to npm using wasm-pack
3
+
4
+ name: npm Publish
5
+
6
+ on:
7
+ # Manual trigger for publishing
8
+ workflow_dispatch:
9
+ inputs:
10
+ publish_target:
11
+ description: 'Publish target'
12
+ required: true
13
+ default: 'dry-run'
14
+ type: choice
15
+ options:
16
+ - dry-run
17
+ - npm
18
+ npm_tag:
19
+ description: 'npm dist-tag (e.g., latest, beta, next)'
20
+ required: false
21
+ default: 'latest'
22
+ type: string
23
+
24
+ # Trigger on release tags
25
+ push:
26
+ tags:
27
+ - 'v*'
28
+
29
+ env:
30
+ CARGO_TERM_COLOR: always
31
+ WASM_PACK_VERSION: "0.13.1"
32
+ SCOPE: "cooljapan"
33
+ NPM_PACKAGE: "@cooljapan/spintronics"
34
+
35
+ jobs:
36
+ build:
37
+ name: Build WASM packages
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+
42
+ - name: Install Rust toolchain
43
+ uses: dtolnay/rust-toolchain@stable
44
+ with:
45
+ targets: wasm32-unknown-unknown
46
+
47
+ - name: Cache cargo registry & build
48
+ uses: actions/cache@v4
49
+ with:
50
+ path: |
51
+ ~/.cargo/registry
52
+ ~/.cargo/git
53
+ target
54
+ key: wasm-build-${{ hashFiles('**/Cargo.lock') }}
55
+ restore-keys: wasm-build-
56
+
57
+ - name: Install wasm-pack
58
+ run: cargo install wasm-pack --version ${{ env.WASM_PACK_VERSION }} --locked || true
59
+
60
+ - name: Build for bundler target
61
+ run: wasm-pack build --scope ${{ env.SCOPE }} --target bundler --out-dir pkg-bundler --release -- --features wasm --no-default-features
62
+
63
+ - name: Build for web target
64
+ run: wasm-pack build --scope ${{ env.SCOPE }} --target web --out-dir pkg-web --release -- --features wasm --no-default-features
65
+
66
+ - name: Build for Node.js target
67
+ run: wasm-pack build --scope ${{ env.SCOPE }} --target nodejs --out-dir pkg-node --release -- --features wasm --no-default-features
68
+
69
+ - name: Rename packages to @cooljapan/spintronics
70
+ run: |
71
+ for dir in pkg-bundler pkg-web pkg-node; do
72
+ if [ -f "${dir}/package.json" ]; then
73
+ sed -i "s|\"@${SCOPE}/spintronics\"|\"${NPM_PACKAGE}\"|g" "${dir}/package.json"
74
+ echo "Updated ${dir}/package.json → ${NPM_PACKAGE}"
75
+ fi
76
+ done
77
+
78
+ - name: Show package info
79
+ run: |
80
+ echo "=== bundler ==="
81
+ cat pkg-bundler/package.json
82
+ echo ""
83
+ echo "=== web ==="
84
+ cat pkg-web/package.json
85
+ echo ""
86
+ echo "=== node ==="
87
+ cat pkg-node/package.json
88
+ echo ""
89
+ echo "=== WASM size ==="
90
+ ls -lh pkg-bundler/*.wasm
91
+
92
+ - name: Upload bundler package
93
+ uses: actions/upload-artifact@v4
94
+ with:
95
+ name: npm-pkg-bundler
96
+ path: pkg-bundler/
97
+
98
+ - name: Upload web package
99
+ uses: actions/upload-artifact@v4
100
+ with:
101
+ name: npm-pkg-web
102
+ path: pkg-web/
103
+
104
+ - name: Upload node package
105
+ uses: actions/upload-artifact@v4
106
+ with:
107
+ name: npm-pkg-node
108
+ path: pkg-node/
109
+
110
+ publish:
111
+ name: Publish to npm
112
+ runs-on: ubuntu-latest
113
+ needs: [build]
114
+ if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
115
+ permissions:
116
+ contents: read
117
+ steps:
118
+ - name: Setup Node.js
119
+ uses: actions/setup-node@v4
120
+ with:
121
+ node-version: '22'
122
+ registry-url: 'https://registry.npmjs.org'
123
+
124
+ - name: Download bundler package
125
+ uses: actions/download-artifact@v4
126
+ with:
127
+ name: npm-pkg-bundler
128
+ path: pkg-bundler
129
+
130
+ - name: Show package contents
131
+ run: |
132
+ echo "=== package.json ==="
133
+ cat pkg-bundler/package.json
134
+ echo ""
135
+ echo "=== Files ==="
136
+ ls -la pkg-bundler/
137
+
138
+ # Dry run (default for workflow_dispatch, or RC tags)
139
+ - name: Publish (dry-run)
140
+ if: >-
141
+ github.event.inputs.publish_target == 'dry-run' ||
142
+ (github.event_name == 'push' && contains(github.ref, 'rc'))
143
+ working-directory: pkg-bundler
144
+ run: npm publish --access public --dry-run
145
+ env:
146
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
147
+
148
+ # Publish to npm
149
+ - name: Publish to npm
150
+ if: >-
151
+ github.event.inputs.publish_target == 'npm' ||
152
+ (github.event_name == 'push' && !contains(github.ref, 'rc'))
153
+ working-directory: pkg-bundler
154
+ run: |
155
+ NPM_TAG="${{ github.event.inputs.npm_tag || 'latest' }}"
156
+ echo "Publishing ${NPM_PACKAGE} with tag: ${NPM_TAG}"
157
+ npm publish --access public --tag "${NPM_TAG}"
158
+ env:
159
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
160
+
161
+ - name: Verify published package
162
+ if: github.event.inputs.publish_target == 'npm' || (github.event_name == 'push' && !contains(github.ref, 'rc'))
163
+ run: |
164
+ sleep 10
165
+ npm view ${{ env.NPM_PACKAGE }} version
@@ -0,0 +1,145 @@
1
+ # PyPI Publishing Workflow for Spintronics
2
+ # Builds and publishes Python wheels to PyPI using maturin
3
+
4
+ name: PyPI Publish
5
+
6
+ on:
7
+ # Manual trigger for publishing
8
+ workflow_dispatch:
9
+ inputs:
10
+ publish_target:
11
+ description: 'Publish target'
12
+ required: true
13
+ default: 'none'
14
+ type: choice
15
+ options:
16
+ - pypi
17
+ - none
18
+
19
+ # Trigger on release tags
20
+ push:
21
+ tags:
22
+ - 'v*'
23
+
24
+ env:
25
+ CARGO_TERM_COLOR: always
26
+ MATURIN_VERSION: "1.8"
27
+
28
+ jobs:
29
+ # Build wheels for Linux (x86_64, aarch64)
30
+ linux:
31
+ runs-on: ubuntu-latest
32
+ strategy:
33
+ matrix:
34
+ target:
35
+ - x86_64
36
+ - aarch64
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+
40
+ - name: Build wheels
41
+ uses: PyO3/maturin-action@v1
42
+ with:
43
+ target: ${{ matrix.target }}
44
+ args: --release --out dist --find-interpreter
45
+ manylinux: auto
46
+ working-directory: py
47
+
48
+ - name: Upload wheels
49
+ uses: actions/upload-artifact@v4
50
+ with:
51
+ name: wheels-linux-${{ matrix.target }}
52
+ path: py/dist
53
+
54
+ # Build wheels for macOS (x86_64 and arm64)
55
+ macos:
56
+ runs-on: ${{ matrix.os }}
57
+ strategy:
58
+ matrix:
59
+ include:
60
+ - os: macos-15
61
+ target: x86_64-apple-darwin
62
+ - os: macos-latest
63
+ target: aarch64-apple-darwin
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+
67
+ - name: Build wheels
68
+ uses: PyO3/maturin-action@v1
69
+ with:
70
+ target: ${{ matrix.target }}
71
+ args: --release --out dist --find-interpreter
72
+ working-directory: py
73
+
74
+ - name: Upload wheels
75
+ uses: actions/upload-artifact@v4
76
+ with:
77
+ name: wheels-macos-${{ matrix.target }}
78
+ path: py/dist
79
+
80
+ # Build wheels for Windows
81
+ windows:
82
+ runs-on: windows-latest
83
+ steps:
84
+ - uses: actions/checkout@v4
85
+
86
+ - name: Build wheels
87
+ uses: PyO3/maturin-action@v1
88
+ with:
89
+ target: x64
90
+ args: --release --out dist --find-interpreter
91
+ working-directory: py
92
+
93
+ - name: Upload wheels
94
+ uses: actions/upload-artifact@v4
95
+ with:
96
+ name: wheels-windows
97
+ path: py/dist
98
+
99
+ # Build source distribution
100
+ sdist:
101
+ runs-on: ubuntu-latest
102
+ steps:
103
+ - uses: actions/checkout@v4
104
+
105
+ - name: Build sdist
106
+ uses: PyO3/maturin-action@v1
107
+ with:
108
+ command: sdist
109
+ args: --out dist
110
+ working-directory: py
111
+
112
+ - name: Upload sdist
113
+ uses: actions/upload-artifact@v4
114
+ with:
115
+ name: wheels-sdist
116
+ path: py/dist
117
+
118
+ # Publish to PyPI
119
+ publish:
120
+ name: Publish to PyPI
121
+ runs-on: ubuntu-latest
122
+ needs: [linux, macos, windows, sdist]
123
+ if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
124
+ environment:
125
+ name: pypi
126
+ url: https://pypi.org/project/spintronics/
127
+ permissions:
128
+ id-token: write
129
+ steps:
130
+ - name: Download all artifacts
131
+ uses: actions/download-artifact@v4
132
+ with:
133
+ pattern: wheels-*
134
+ merge-multiple: true
135
+ path: dist
136
+
137
+ - name: List dist contents
138
+ run: ls -la dist/
139
+
140
+ # Publish to PyPI
141
+ - name: Publish to PyPI
142
+ uses: pypa/gh-action-pypi-publish@release/v1
143
+ with:
144
+ skip-existing: true
145
+ verbose: true
@@ -0,0 +1,42 @@
1
+ # Rust
2
+ /target/
3
+ **/*.rs.bk
4
+ *.pdb
5
+ Cargo.lock
6
+
7
+ # WASM build artifacts
8
+ /pkg/
9
+ /pkg-bundler/
10
+ /pkg-web/
11
+ /pkg-node/
12
+ /wasm-demo/pkg/
13
+
14
+ # IDE
15
+ .vscode/
16
+ .idea/
17
+ *.swp
18
+ *.swo
19
+ *~
20
+
21
+ # Claude AI config
22
+ **/.claude/
23
+
24
+ # OS
25
+ .DS_Store
26
+ Thumbs.db
27
+
28
+ # Generated simulation outputs
29
+ *.csv
30
+ *.json
31
+ *.vtu
32
+ *.vtk
33
+
34
+ # Test and example binaries
35
+ test_*
36
+ performance_*
37
+ /examples/*/target/
38
+
39
+ # Rustc ICE dumps
40
+ rustc-ice-*.txt
41
+
42
+ target