pantometry 0.16.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 (217) hide show
  1. pantometry-0.16.0/Cargo.toml +77 -0
  2. pantometry-0.16.0/PKG-INFO +154 -0
  3. pantometry-0.16.0/README.md +141 -0
  4. pantometry-0.16.0/bindings/python/Cargo.lock +347 -0
  5. pantometry-0.16.0/bindings/python/Cargo.toml +39 -0
  6. pantometry-0.16.0/bindings/python/README.md +141 -0
  7. pantometry-0.16.0/bindings/python/src/lib.rs +681 -0
  8. pantometry-0.16.0/bindings/python/tests/test_pantometry.py +389 -0
  9. pantometry-0.16.0/crates/pantometry/Cargo.toml +35 -0
  10. pantometry-0.16.0/crates/pantometry/LICENSE-APACHE +201 -0
  11. pantometry-0.16.0/crates/pantometry/LICENSE-MIT +21 -0
  12. pantometry-0.16.0/crates/pantometry/README.md +835 -0
  13. pantometry-0.16.0/crates/pantometry/examples/agents_quickstart.rs +245 -0
  14. pantometry-0.16.0/crates/pantometry/examples/airy_pattern.rs +270 -0
  15. pantometry-0.16.0/crates/pantometry/examples/beam_hot_spot.rs +345 -0
  16. pantometry-0.16.0/crates/pantometry/examples/busbar_rating.rs +604 -0
  17. pantometry-0.16.0/crates/pantometry/examples/common/mod.rs +80 -0
  18. pantometry-0.16.0/crates/pantometry/examples/common/svg.rs +353 -0
  19. pantometry-0.16.0/crates/pantometry/examples/detector_snr.rs +329 -0
  20. pantometry-0.16.0/crates/pantometry/examples/espresso_shot.rs +700 -0
  21. pantometry-0.16.0/crates/pantometry/examples/heat_in_three_dimensions.rs +390 -0
  22. pantometry-0.16.0/crates/pantometry/examples/lens_spots.rs +399 -0
  23. pantometry-0.16.0/crates/pantometry/examples/melting.rs +376 -0
  24. pantometry-0.16.0/crates/pantometry/examples/optical_bench.rs +559 -0
  25. pantometry-0.16.0/crates/pantometry/examples/portafilter_flow.rs +839 -0
  26. pantometry-0.16.0/crates/pantometry/examples/room_in_three_dimensions.rs +295 -0
  27. pantometry-0.16.0/crates/pantometry/examples/room_modes.rs +363 -0
  28. pantometry-0.16.0/crates/pantometry/examples/where_the_time_goes.rs +188 -0
  29. pantometry-0.16.0/crates/pantometry/src/lib.rs +163 -0
  30. pantometry-0.16.0/crates/pantometry/tests/a_shape_from_a_file.rs +453 -0
  31. pantometry-0.16.0/crates/pantometry/tests/a_slit.rs +297 -0
  32. pantometry-0.16.0/crates/pantometry/tests/any_material.rs +409 -0
  33. pantometry-0.16.0/crates/pantometry/tests/beam_heats_where_it_lands.rs +565 -0
  34. pantometry-0.16.0/crates/pantometry/tests/documented_version.rs +140 -0
  35. pantometry-0.16.0/crates/pantometry/tests/domain_readings.rs +109 -0
  36. pantometry-0.16.0/crates/pantometry/tests/electrical_thermal.rs +119 -0
  37. pantometry-0.16.0/crates/pantometry/tests/fields_and_rays.rs +359 -0
  38. pantometry-0.16.0/crates/pantometry/tests/friction_heats.rs +263 -0
  39. pantometry-0.16.0/crates/pantometry/tests/iterative_restore.rs +190 -0
  40. pantometry-0.16.0/crates/pantometry/tests/loss_and_lumps.rs +259 -0
  41. pantometry-0.16.0/crates/pantometry/tests/monte_carlo.rs +133 -0
  42. pantometry-0.16.0/crates/pantometry/tests/multiphysics.rs +374 -0
  43. pantometry-0.16.0/crates/pantometry/tests/multirate_timing.rs +236 -0
  44. pantometry-0.16.0/crates/pantometry/tests/one_channel_many_takers.rs +279 -0
  45. pantometry-0.16.0/crates/pantometry/tests/substances_from_a_file.rs +437 -0
  46. pantometry-0.16.0/crates/pantometry/tests/two_consumers.rs +98 -0
  47. pantometry-0.16.0/crates/pantometry/tests/two_parts_on_one_grid.rs +245 -0
  48. pantometry-0.16.0/crates/pantometry/tests/two_wave_speeds.rs +237 -0
  49. pantometry-0.16.0/crates/pantometry-acoustic/Cargo.toml +16 -0
  50. pantometry-0.16.0/crates/pantometry-acoustic/LICENSE-APACHE +201 -0
  51. pantometry-0.16.0/crates/pantometry-acoustic/LICENSE-MIT +21 -0
  52. pantometry-0.16.0/crates/pantometry-acoustic/README.md +835 -0
  53. pantometry-0.16.0/crates/pantometry-acoustic/src/hall.rs +694 -0
  54. pantometry-0.16.0/crates/pantometry-acoustic/src/lib.rs +991 -0
  55. pantometry-0.16.0/crates/pantometry-acoustic/src/room.rs +1329 -0
  56. pantometry-0.16.0/crates/pantometry-acoustic/tests/hall_closed_forms.rs +325 -0
  57. pantometry-0.16.0/crates/pantometry-core/Cargo.toml +19 -0
  58. pantometry-0.16.0/crates/pantometry-core/LICENSE-APACHE +201 -0
  59. pantometry-0.16.0/crates/pantometry-core/LICENSE-MIT +21 -0
  60. pantometry-0.16.0/crates/pantometry-core/README.md +835 -0
  61. pantometry-0.16.0/crates/pantometry-core/src/bodies.rs +64 -0
  62. pantometry-0.16.0/crates/pantometry-core/src/conserved.rs +461 -0
  63. pantometry-0.16.0/crates/pantometry-core/src/ensemble.rs +482 -0
  64. pantometry-0.16.0/crates/pantometry-core/src/field.rs +228 -0
  65. pantometry-0.16.0/crates/pantometry-core/src/integrator.rs +370 -0
  66. pantometry-0.16.0/crates/pantometry-core/src/lib.rs +161 -0
  67. pantometry-0.16.0/crates/pantometry-core/src/mixture.rs +569 -0
  68. pantometry-0.16.0/crates/pantometry-core/src/motion.rs +355 -0
  69. pantometry-0.16.0/crates/pantometry-core/src/pose.rs +334 -0
  70. pantometry-0.16.0/crates/pantometry-core/src/rng.rs +429 -0
  71. pantometry-0.16.0/crates/pantometry-core/src/scene.rs +607 -0
  72. pantometry-0.16.0/crates/pantometry-core/src/sim.rs +1618 -0
  73. pantometry-0.16.0/crates/pantometry-core/src/substance.rs +1035 -0
  74. pantometry-0.16.0/crates/pantometry-core/src/transform.rs +431 -0
  75. pantometry-0.16.0/crates/pantometry-core/src/vector.rs +107 -0
  76. pantometry-0.16.0/crates/pantometry-core/tests/a_mixture.rs +641 -0
  77. pantometry-0.16.0/crates/pantometry-core/tests/per_domain_books.rs +255 -0
  78. pantometry-0.16.0/crates/pantometry-core/tests/per_quantity_tolerances.rs +202 -0
  79. pantometry-0.16.0/crates/pantometry-elastic/Cargo.toml +19 -0
  80. pantometry-0.16.0/crates/pantometry-elastic/LICENSE-APACHE +201 -0
  81. pantometry-0.16.0/crates/pantometry-elastic/LICENSE-MIT +21 -0
  82. pantometry-0.16.0/crates/pantometry-elastic/README.md +835 -0
  83. pantometry-0.16.0/crates/pantometry-elastic/src/block.rs +1000 -0
  84. pantometry-0.16.0/crates/pantometry-elastic/src/element.rs +173 -0
  85. pantometry-0.16.0/crates/pantometry-elastic/src/lib.rs +271 -0
  86. pantometry-0.16.0/crates/pantometry-elastic/src/waves.rs +725 -0
  87. pantometry-0.16.0/crates/pantometry-elastic/tests/a_body_that_wants_a_different_size.rs +285 -0
  88. pantometry-0.16.0/crates/pantometry-elastic/tests/a_checkerboard.rs +383 -0
  89. pantometry-0.16.0/crates/pantometry-elastic/tests/a_layered_block.rs +273 -0
  90. pantometry-0.16.0/crates/pantometry-elastic/tests/a_layered_wave.rs +473 -0
  91. pantometry-0.16.0/crates/pantometry-elastic/tests/against_closed_forms.rs +839 -0
  92. pantometry-0.16.0/crates/pantometry-elastic/tests/two_speeds_marched.rs +482 -0
  93. pantometry-0.16.0/crates/pantometry-electrical/Cargo.toml +17 -0
  94. pantometry-0.16.0/crates/pantometry-electrical/LICENSE-APACHE +201 -0
  95. pantometry-0.16.0/crates/pantometry-electrical/LICENSE-MIT +21 -0
  96. pantometry-0.16.0/crates/pantometry-electrical/README.md +835 -0
  97. pantometry-0.16.0/crates/pantometry-electrical/src/conductor.rs +710 -0
  98. pantometry-0.16.0/crates/pantometry-electrical/src/lib.rs +402 -0
  99. pantometry-0.16.0/crates/pantometry-electrical/tests/closed_forms.rs +254 -0
  100. pantometry-0.16.0/crates/pantometry-electrical/tests/conductor_closed_forms.rs +409 -0
  101. pantometry-0.16.0/crates/pantometry-em/Cargo.toml +16 -0
  102. pantometry-0.16.0/crates/pantometry-em/LICENSE-APACHE +201 -0
  103. pantometry-0.16.0/crates/pantometry-em/LICENSE-MIT +21 -0
  104. pantometry-0.16.0/crates/pantometry-em/README.md +835 -0
  105. pantometry-0.16.0/crates/pantometry-em/src/cavity.rs +1591 -0
  106. pantometry-0.16.0/crates/pantometry-em/src/lib.rs +179 -0
  107. pantometry-0.16.0/crates/pantometry-em/tests/a_waveguide.rs +455 -0
  108. pantometry-0.16.0/crates/pantometry-em/tests/against_closed_forms.rs +548 -0
  109. pantometry-0.16.0/crates/pantometry-fluid/Cargo.toml +19 -0
  110. pantometry-0.16.0/crates/pantometry-fluid/LICENSE-APACHE +201 -0
  111. pantometry-0.16.0/crates/pantometry-fluid/LICENSE-MIT +21 -0
  112. pantometry-0.16.0/crates/pantometry-fluid/README.md +835 -0
  113. pantometry-0.16.0/crates/pantometry-fluid/src/channel.rs +882 -0
  114. pantometry-0.16.0/crates/pantometry-fluid/src/lib.rs +198 -0
  115. pantometry-0.16.0/crates/pantometry-fluid/src/solve.rs +157 -0
  116. pantometry-0.16.0/crates/pantometry-fluid/tests/against_closed_forms.rs +442 -0
  117. pantometry-0.16.0/crates/pantometry-mechanics/Cargo.toml +16 -0
  118. pantometry-0.16.0/crates/pantometry-mechanics/LICENSE-APACHE +201 -0
  119. pantometry-0.16.0/crates/pantometry-mechanics/LICENSE-MIT +21 -0
  120. pantometry-0.16.0/crates/pantometry-mechanics/README.md +835 -0
  121. pantometry-0.16.0/crates/pantometry-mechanics/src/collision.rs +915 -0
  122. pantometry-0.16.0/crates/pantometry-mechanics/src/lib.rs +1441 -0
  123. pantometry-0.16.0/crates/pantometry-mechanics/src/rigid.rs +816 -0
  124. pantometry-0.16.0/crates/pantometry-mechanics/src/tree.rs +1127 -0
  125. pantometry-0.16.0/crates/pantometry-molecular/Cargo.toml +16 -0
  126. pantometry-0.16.0/crates/pantometry-molecular/LICENSE-APACHE +201 -0
  127. pantometry-0.16.0/crates/pantometry-molecular/LICENSE-MIT +21 -0
  128. pantometry-0.16.0/crates/pantometry-molecular/README.md +835 -0
  129. pantometry-0.16.0/crates/pantometry-molecular/src/box_.rs +451 -0
  130. pantometry-0.16.0/crates/pantometry-molecular/src/fluid.rs +1010 -0
  131. pantometry-0.16.0/crates/pantometry-molecular/src/lib.rs +56 -0
  132. pantometry-0.16.0/crates/pantometry-molecular/src/potential.rs +454 -0
  133. pantometry-0.16.0/crates/pantometry-molecular/src/rdf.rs +386 -0
  134. pantometry-0.16.0/crates/pantometry-optics/Cargo.toml +20 -0
  135. pantometry-0.16.0/crates/pantometry-optics/LICENSE-APACHE +201 -0
  136. pantometry-0.16.0/crates/pantometry-optics/LICENSE-MIT +21 -0
  137. pantometry-0.16.0/crates/pantometry-optics/README.md +835 -0
  138. pantometry-0.16.0/crates/pantometry-optics/examples/readme_check.rs +34 -0
  139. pantometry-0.16.0/crates/pantometry-optics/src/coherence.rs +416 -0
  140. pantometry-0.16.0/crates/pantometry-optics/src/detector.rs +759 -0
  141. pantometry-0.16.0/crates/pantometry-optics/src/diffraction.rs +637 -0
  142. pantometry-0.16.0/crates/pantometry-optics/src/geometry.rs +681 -0
  143. pantometry-0.16.0/crates/pantometry-optics/src/lib.rs +95 -0
  144. pantometry-0.16.0/crates/pantometry-optics/src/material.rs +473 -0
  145. pantometry-0.16.0/crates/pantometry-optics/src/optics.rs +664 -0
  146. pantometry-0.16.0/crates/pantometry-optics/src/propagation.rs +734 -0
  147. pantometry-0.16.0/crates/pantometry-optics/src/radiometry.rs +509 -0
  148. pantometry-0.16.0/crates/pantometry-optics/src/spectrum.rs +906 -0
  149. pantometry-0.16.0/crates/pantometry-optics/src/wavefront.rs +1019 -0
  150. pantometry-0.16.0/crates/pantometry-porous/Cargo.toml +16 -0
  151. pantometry-0.16.0/crates/pantometry-porous/LICENSE-APACHE +201 -0
  152. pantometry-0.16.0/crates/pantometry-porous/LICENSE-MIT +21 -0
  153. pantometry-0.16.0/crates/pantometry-porous/README.md +835 -0
  154. pantometry-0.16.0/crates/pantometry-porous/src/lib.rs +493 -0
  155. pantometry-0.16.0/crates/pantometry-porous/src/puck.rs +1571 -0
  156. pantometry-0.16.0/crates/pantometry-porous/tests/against_closed_forms.rs +874 -0
  157. pantometry-0.16.0/crates/pantometry-porous/tests/the_beds_conductivity.rs +272 -0
  158. pantometry-0.16.0/crates/pantometry-quantum/Cargo.toml +15 -0
  159. pantometry-0.16.0/crates/pantometry-quantum/LICENSE-APACHE +201 -0
  160. pantometry-0.16.0/crates/pantometry-quantum/LICENSE-MIT +21 -0
  161. pantometry-0.16.0/crates/pantometry-quantum/README.md +835 -0
  162. pantometry-0.16.0/crates/pantometry-quantum/src/lib.rs +1481 -0
  163. pantometry-0.16.0/crates/pantometry-scene/Cargo.toml +16 -0
  164. pantometry-0.16.0/crates/pantometry-scene/LICENSE-APACHE +201 -0
  165. pantometry-0.16.0/crates/pantometry-scene/LICENSE-MIT +21 -0
  166. pantometry-0.16.0/crates/pantometry-scene/README.md +835 -0
  167. pantometry-0.16.0/crates/pantometry-scene/src/lib.rs +521 -0
  168. pantometry-0.16.0/crates/pantometry-scene/tests/knows_no_physics.rs +266 -0
  169. pantometry-0.16.0/crates/pantometry-shape/Cargo.toml +16 -0
  170. pantometry-0.16.0/crates/pantometry-shape/LICENSE-APACHE +201 -0
  171. pantometry-0.16.0/crates/pantometry-shape/LICENSE-MIT +21 -0
  172. pantometry-0.16.0/crates/pantometry-shape/README.md +835 -0
  173. pantometry-0.16.0/crates/pantometry-shape/src/lib.rs +55 -0
  174. pantometry-0.16.0/crates/pantometry-shape/src/mesh.rs +252 -0
  175. pantometry-0.16.0/crates/pantometry-shape/src/voxels.rs +550 -0
  176. pantometry-0.16.0/crates/pantometry-shape/tests/a_designed_shape.rs +791 -0
  177. pantometry-0.16.0/crates/pantometry-thermal/Cargo.toml +17 -0
  178. pantometry-0.16.0/crates/pantometry-thermal/LICENSE-APACHE +201 -0
  179. pantometry-0.16.0/crates/pantometry-thermal/LICENSE-MIT +21 -0
  180. pantometry-0.16.0/crates/pantometry-thermal/README.md +835 -0
  181. pantometry-0.16.0/crates/pantometry-thermal/src/lib.rs +1656 -0
  182. pantometry-0.16.0/crates/pantometry-thermal/src/network.rs +965 -0
  183. pantometry-0.16.0/crates/pantometry-thermal/src/solid.rs +2260 -0
  184. pantometry-0.16.0/crates/pantometry-thermal/tests/a_block_that_cools.rs +375 -0
  185. pantometry-0.16.0/crates/pantometry-thermal/tests/a_block_that_generates.rs +325 -0
  186. pantometry-0.16.0/crates/pantometry-thermal/tests/a_cold_cell_and_a_bus_slug.rs +147 -0
  187. pantometry-0.16.0/crates/pantometry-thermal/tests/a_composite.rs +580 -0
  188. pantometry-0.16.0/crates/pantometry-thermal/tests/a_freezing_front.rs +697 -0
  189. pantometry-0.16.0/crates/pantometry-thermal/tests/a_gap_that_radiates.rs +222 -0
  190. pantometry-0.16.0/crates/pantometry-thermal/tests/a_grid_with_nothing_in_it.rs +226 -0
  191. pantometry-0.16.0/crates/pantometry-thermal/tests/a_layered_wall.rs +726 -0
  192. pantometry-0.16.0/crates/pantometry-thermal/tests/how_much_of_the_gap_is_an_assumption.rs +180 -0
  193. pantometry-0.16.0/crates/pantometry-thermal/tests/network_closed_forms.rs +493 -0
  194. pantometry-0.16.0/crates/pantometry-thermal/tests/nothing_is_not_a_temperature.rs +275 -0
  195. pantometry-0.16.0/crates/pantometry-thermal/tests/solid_closed_forms.rs +542 -0
  196. pantometry-0.16.0/crates/pantometry-thermal/tests/steady_state.rs +426 -0
  197. pantometry-0.16.0/crates/pantometry-thermal/tests/the_cooled_boundary_order.rs +171 -0
  198. pantometry-0.16.0/crates/pantometry-thermal/tests/two_phase_stefan.rs +332 -0
  199. pantometry-0.16.0/crates/pantometry-units/Cargo.toml +18 -0
  200. pantometry-0.16.0/crates/pantometry-units/LICENSE-APACHE +201 -0
  201. pantometry-0.16.0/crates/pantometry-units/LICENSE-MIT +21 -0
  202. pantometry-0.16.0/crates/pantometry-units/README.md +835 -0
  203. pantometry-0.16.0/crates/pantometry-units/src/lib.rs +1023 -0
  204. pantometry-0.16.0/crates/pantometry-units/src/vector.rs +461 -0
  205. pantometry-0.16.0/crates/pantometry-view/Cargo.toml +18 -0
  206. pantometry-0.16.0/crates/pantometry-view/LICENSE-APACHE +201 -0
  207. pantometry-0.16.0/crates/pantometry-view/LICENSE-MIT +21 -0
  208. pantometry-0.16.0/crates/pantometry-view/src/colour.rs +379 -0
  209. pantometry-0.16.0/crates/pantometry-view/src/data.rs +171 -0
  210. pantometry-0.16.0/crates/pantometry-view/src/filmstrip.rs +435 -0
  211. pantometry-0.16.0/crates/pantometry-view/src/gltf.rs +391 -0
  212. pantometry-0.16.0/crates/pantometry-view/src/lib.rs +56 -0
  213. pantometry-0.16.0/crates/pantometry-view/src/report.rs +697 -0
  214. pantometry-0.16.0/crates/pantometry-view/tests/absence_is_not_a_value.rs +108 -0
  215. pantometry-0.16.0/crates/pantometry-view/tests/gltf_is_gltf.rs +344 -0
  216. pantometry-0.16.0/crates/pantometry-view/tests/shapes_choose_the_view.rs +377 -0
  217. pantometry-0.16.0/pyproject.toml +23 -0
@@ -0,0 +1,77 @@
1
+ [workspace]
2
+ members = [
3
+ "crates/pantometry-units",
4
+ "crates/pantometry-core",
5
+ "crates/pantometry-optics",
6
+ "crates/pantometry-thermal",
7
+ "crates/pantometry-mechanics",
8
+ "crates/pantometry-acoustic",
9
+ "crates/pantometry-molecular",
10
+ "crates/pantometry-electrical",
11
+ "crates/pantometry-porous",
12
+ "crates/pantometry-elastic",
13
+ "crates/pantometry-em",
14
+ "crates/pantometry-fluid",
15
+ "crates/pantometry-quantum",
16
+ # Not a domain and not a layer: input preparation. It depends on `pantometry-units` and nothing else
17
+ # in the workspace, and no domain depends on it — it hands out a predicate and a domain's `fill`
18
+ # takes one, which is the whole coupling.
19
+ "crates/pantometry-shape",
20
+ "crates/pantometry-scene",
21
+ "crates/pantometry-view",
22
+ "crates/pantometry",
23
+ # The first consumer. Not published — it exists to find out where the SDK is awkward,
24
+ # which is a question no test in the library can answer about itself.
25
+ "crates/pantometry-world",
26
+ ]
27
+ exclude = [
28
+ # Its own workspace: pyo3 brings fifteen crates and a libpython link, and the library's
29
+ # lockfile, `deny.toml` allow-list and wasm jobs are promises that should not have to
30
+ # accommodate a Python extension. See its Cargo.toml.
31
+ "bindings/python",
32
+ # And its own for the same reason, measured rather than assumed: pyo3 adds seven external
33
+ # crates and that was enough to split it out. A GPU stack is far past that, and none of the
34
+ # eleven published crates may carry it. See runtime/viewer/Cargo.toml.
35
+ "runtime/viewer",
36
+ # And the GPU accelerator, which is the same argument again plus one that is not about
37
+ # dependencies at all: WGSL has no f64, so a compute kernel is a *different computation* from
38
+ # the domain it accelerates. See runtime/gpu/README.md.
39
+ "runtime/gpu",
40
+ ]
41
+ resolver = "2"
42
+
43
+ [workspace.package]
44
+ version = "0.16.0"
45
+ edition = "2021"
46
+ # Verified by the `msrv` CI job rather than guessed, and set by `Cargo.lock` being
47
+ # format version 4 rather than by anything in the source — see that job's comment.
48
+ rust-version = "1.78"
49
+ license = "MIT OR Apache-2.0"
50
+ authors = ["Younghyeon Park and pantometry contributors"]
51
+ repository = "https://github.com/YounghyeonPark/pantometry"
52
+
53
+ [workspace.dependencies]
54
+ pantometry-units = { path = "crates/pantometry-units", version = "0.16.0" }
55
+ pantometry-core = { path = "crates/pantometry-core", version = "0.16.0" }
56
+ pantometry-optics = { path = "crates/pantometry-optics", version = "0.16.0" }
57
+ pantometry-thermal = { path = "crates/pantometry-thermal", version = "0.16.0" }
58
+ pantometry-mechanics = { path = "crates/pantometry-mechanics", version = "0.16.0" }
59
+ pantometry-acoustic = { path = "crates/pantometry-acoustic", version = "0.16.0" }
60
+ pantometry = { path = "crates/pantometry", version = "0.16.0" }
61
+ pantometry-molecular = { path = "crates/pantometry-molecular", version = "0.16.0" }
62
+ pantometry-electrical = { path = "crates/pantometry-electrical", version = "0.16.0" }
63
+ pantometry-porous = { path = "crates/pantometry-porous", version = "0.16.0" }
64
+ pantometry-elastic = { path = "crates/pantometry-elastic", version = "0.16.0" }
65
+ pantometry-em = { path = "crates/pantometry-em", version = "0.16.0" }
66
+ pantometry-fluid = { path = "crates/pantometry-fluid", version = "0.16.0" }
67
+ pantometry-quantum = { path = "crates/pantometry-quantum", version = "0.16.0" }
68
+ pantometry-shape = { path = "crates/pantometry-shape", version = "0.16.0" }
69
+ pantometry-scene = { path = "crates/pantometry-scene", version = "0.16.0" }
70
+ pantometry-view = { path = "crates/pantometry-view", version = "0.16.0" }
71
+ glam = { version = "0.29", features = ["serde"] }
72
+ serde = { version = "1", features = ["derive"] }
73
+ serde_json = "1"
74
+
75
+ [profile.release]
76
+ opt-level = 3
77
+ lto = true
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.4
2
+ Name: pantometry
3
+ Version: 0.16.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Topic :: Scientific/Engineering :: Physics
7
+ Summary: Coupled physics whose conservation audit is an exception you can catch
8
+ License: MIT OR Apache-2.0
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
11
+ Project-URL: Repository, https://github.com/YounghyeonPark/pantometry
12
+
13
+ # pantometry for Python
14
+
15
+ Coupled physics whose conservation audit is an exception you can catch.
16
+
17
+ ```sh
18
+ pip install pantometry # wheels for linux, macos and windows; abi3, so 3.10 upward
19
+ ```
20
+
21
+ ```python
22
+ import pantometry
23
+
24
+ sim = pantometry.Simulation(schedule="multirate", conservation_tolerance=1e-9)
25
+ sim.add_heater("element", watts=2.0, reserve_j=6.0)
26
+ sim.add_bar("bar", length_m=0.020, cells=41, area_m2=1e-4)
27
+
28
+ for _ in range(8):
29
+ sim.advance(0.5) # raises pantometry.Violation if the books do not close
30
+
31
+ print(sim.temperature("bar")) # 294.39 K
32
+ print(sim.profile("bar")[:3]) # warmer at the fed end
33
+ ```
34
+
35
+ ## Several bodies and the drop between them
36
+
37
+ `add_lump` gives you one temperature for a whole assembly. The number that decides whether a
38
+ motor survives is the *winding*, which is hotter than the case by however much the joint
39
+ between them resists — so for that, a network:
40
+
41
+ ```python
42
+ sim = pantometry.Simulation(schedule="staggered")
43
+ sim.add_heater("losses", watts=6.0, reserve_j=5_400.0)
44
+ sim.add_network("motor",
45
+ nodes=[{"name": "winding", "material": "copper", "volume_m3": 18e-6,
46
+ "thickness_m": 2e-3, "initial_k": 298.15},
47
+ {"name": "case", "material": "aluminium", "volume_m3": 220e-6,
48
+ "thickness_m": 4e-3, "initial_k": 298.15,
49
+ "ambient_k": 298.15, "area_m2": 0.042}], # both keys, or neither
50
+ links=[{"from": "winding", "to": "case", "w_per_k": 0.9}],
51
+ absorbing="winding")
52
+
53
+ for _ in range(900):
54
+ sim.advance(1.0)
55
+
56
+ dict(sim.node_temperatures("motor")) # {'winding': 311.2, 'case': 304.9}
57
+ sim.heat_flow_w("motor", "winding", "case") # 5.585 W crossing the joint
58
+ ```
59
+
60
+ `material` is any name in the kernel's catalogue, and this line no longer lists them — it used to say
61
+ five, the binding accepted those same five against a catalogue of nine, and listing them here made a
62
+ **fourth** copy of a spelling that had already gone stale three times. The error message names them, and
63
+ it is generated from the catalogue, so it is right by construction. A node with `ambient_k` and
64
+ `area_m2` loses heat to still air; a node with neither is interior. Giving one without the other
65
+ is refused rather than quietly producing a node that looks like it is cooling and is not.
66
+
67
+ Names are resolved once, when the network is built, so a link to a node that does not exist
68
+ raises before any stepping happens and lists the nodes that do. That matters more here than it
69
+ looks: a link adds `+q` to one node and `−q` to another in the same sum, so a missing or
70
+ misdirected link passes the conservation audit at machine precision and simply reports the wrong
71
+ temperature forever.
72
+
73
+ `temperature()` refuses a network rather than averaging it — the reason to build one is that its
74
+ nodes differ, so a mean would describe no part of it.
75
+
76
+ ## Why this rather than numpy
77
+
78
+ Write physics in numpy and a wrong model runs happily, producing plausible output. There is no
79
+ signal; you find out when somebody notices the answer is silly.
80
+
81
+ Every `advance` here either moves the clock or raises, and the exception is addressable rather
82
+ than a sentence to parse:
83
+
84
+ ```python
85
+ try:
86
+ sim.advance(0.5)
87
+ except pantometry.Violation as v:
88
+ v.quantity # 'energy'
89
+ v.site # 'bus (published but not consumed)'
90
+ v.before, v.after, v.scale, v.tolerance
91
+ sim.time # unchanged — a refused step does not advance the clock
92
+ ```
93
+
94
+ **Be clear about what it catches.** Quantities appearing or vanishing, amounts left unclaimed on
95
+ the bus, and a domain refusing a step it cannot take. It does *not* catch a model that is
96
+ internally consistent and physically wrong. For that, check against something the library did not
97
+ compute — which is what `heat_capacity_j_per_k` is exported for, and what
98
+ `tests/test_pantometry.py` does throughout.
99
+
100
+ ## What crosses the boundary, and what does not
101
+
102
+ Values cross as **SI floats with the unit in the parameter name**: `length_m`, `watts`,
103
+ `initial_k`. pantometry's dimensional types are a compile-time thing — `Length + Time` does not
104
+ compile in Rust — and Python cannot have that. A runtime `Quantity` wrapper would cost an
105
+ allocation and a check per operation to catch, at run time, a class of error a Python caller
106
+ mostly does not make, because it passes values in and reads them out rather than doing algebra on
107
+ them. So the types stay on the Rust side and the units stay in the names.
108
+
109
+ What crosses instead is the audit, which is the part worth having.
110
+
111
+ ## What this cannot do
112
+
113
+ **You cannot run an ensemble from Python, and it is not an oversight.** `Ensemble` exists to run
114
+ many independent samples across threads, and a Python sample function cannot: the GIL serialises
115
+ it. A binding for it would look parallel, measure slower than a plain Python loop because of the
116
+ crossing cost, and have nothing left of the one thing it is for. Write the sampler in Rust, or
117
+ loop in Python and accept one core.
118
+
119
+ **You cannot write a domain in Python.** That means calling back into the interpreter from inside
120
+ the step loop, holding the GIL across it, and deciding what an exception raised mid-sweep does to
121
+ a half-advanced simulation. All three are answerable and none cheaply, so this binds the physics
122
+ the library has and says so rather than shipping a subtly wrong version of that.
123
+
124
+ So: enough to **run and audit** coupled physics from Python, not enough to **extend** it. The
125
+ extending lives in Rust, and [the workspace](https://github.com/YounghyeonPark/pantometry) is where.
126
+
127
+ A `Simulation` is also bound to the thread that created it. `Domain` is not `Send`, and the
128
+ binding says so rather than asking the kernel for a bound it does not offer.
129
+
130
+ **There is no scene or view binding.** The Rust side has `pantometry-scene` for capturing a run and
131
+ `pantometry-view` for drawing one; neither crosses. Nothing forbids it in principle — the reason is
132
+ that a Python caller already has matplotlib, pandas and every plotting stack there is, and what
133
+ they want from this side is the *numbers*: `profile`, `node_temperatures`, `temperature`,
134
+ `ledger`. Handing them an SVG instead would be the worse half of both worlds. If you want the
135
+ HTML report, run the scene from Rust.
136
+
137
+ ## Building
138
+
139
+ Its own cargo workspace, deliberately. This one resolves fifteen external crates where the
140
+ library resolves twelve, seven of them pyo3's and appearing nowhere in the library, plus a
141
+ libpython link — and the library's lockfile, licence allow-list and WebAssembly jobs are promises
142
+ that should not have to accommodate a Python extension.
143
+
144
+ ```sh
145
+ cd bindings/python
146
+ pip install "maturin>=1.7,<2.0"
147
+ maturin build --release # an abi3 wheel: one build serves 3.10 upward
148
+ pip install target/wheels/pantometry-*.whl
149
+ python tests/test_pantometry.py
150
+ ```
151
+
152
+ `maturin develop` works too, in a virtualenv. CI builds the wheel, installs it and runs those
153
+ tests on every commit — because "it compiles" proves neither half of "pip install then import".
154
+
@@ -0,0 +1,141 @@
1
+ # pantometry for Python
2
+
3
+ Coupled physics whose conservation audit is an exception you can catch.
4
+
5
+ ```sh
6
+ pip install pantometry # wheels for linux, macos and windows; abi3, so 3.10 upward
7
+ ```
8
+
9
+ ```python
10
+ import pantometry
11
+
12
+ sim = pantometry.Simulation(schedule="multirate", conservation_tolerance=1e-9)
13
+ sim.add_heater("element", watts=2.0, reserve_j=6.0)
14
+ sim.add_bar("bar", length_m=0.020, cells=41, area_m2=1e-4)
15
+
16
+ for _ in range(8):
17
+ sim.advance(0.5) # raises pantometry.Violation if the books do not close
18
+
19
+ print(sim.temperature("bar")) # 294.39 K
20
+ print(sim.profile("bar")[:3]) # warmer at the fed end
21
+ ```
22
+
23
+ ## Several bodies and the drop between them
24
+
25
+ `add_lump` gives you one temperature for a whole assembly. The number that decides whether a
26
+ motor survives is the *winding*, which is hotter than the case by however much the joint
27
+ between them resists — so for that, a network:
28
+
29
+ ```python
30
+ sim = pantometry.Simulation(schedule="staggered")
31
+ sim.add_heater("losses", watts=6.0, reserve_j=5_400.0)
32
+ sim.add_network("motor",
33
+ nodes=[{"name": "winding", "material": "copper", "volume_m3": 18e-6,
34
+ "thickness_m": 2e-3, "initial_k": 298.15},
35
+ {"name": "case", "material": "aluminium", "volume_m3": 220e-6,
36
+ "thickness_m": 4e-3, "initial_k": 298.15,
37
+ "ambient_k": 298.15, "area_m2": 0.042}], # both keys, or neither
38
+ links=[{"from": "winding", "to": "case", "w_per_k": 0.9}],
39
+ absorbing="winding")
40
+
41
+ for _ in range(900):
42
+ sim.advance(1.0)
43
+
44
+ dict(sim.node_temperatures("motor")) # {'winding': 311.2, 'case': 304.9}
45
+ sim.heat_flow_w("motor", "winding", "case") # 5.585 W crossing the joint
46
+ ```
47
+
48
+ `material` is any name in the kernel's catalogue, and this line no longer lists them — it used to say
49
+ five, the binding accepted those same five against a catalogue of nine, and listing them here made a
50
+ **fourth** copy of a spelling that had already gone stale three times. The error message names them, and
51
+ it is generated from the catalogue, so it is right by construction. A node with `ambient_k` and
52
+ `area_m2` loses heat to still air; a node with neither is interior. Giving one without the other
53
+ is refused rather than quietly producing a node that looks like it is cooling and is not.
54
+
55
+ Names are resolved once, when the network is built, so a link to a node that does not exist
56
+ raises before any stepping happens and lists the nodes that do. That matters more here than it
57
+ looks: a link adds `+q` to one node and `−q` to another in the same sum, so a missing or
58
+ misdirected link passes the conservation audit at machine precision and simply reports the wrong
59
+ temperature forever.
60
+
61
+ `temperature()` refuses a network rather than averaging it — the reason to build one is that its
62
+ nodes differ, so a mean would describe no part of it.
63
+
64
+ ## Why this rather than numpy
65
+
66
+ Write physics in numpy and a wrong model runs happily, producing plausible output. There is no
67
+ signal; you find out when somebody notices the answer is silly.
68
+
69
+ Every `advance` here either moves the clock or raises, and the exception is addressable rather
70
+ than a sentence to parse:
71
+
72
+ ```python
73
+ try:
74
+ sim.advance(0.5)
75
+ except pantometry.Violation as v:
76
+ v.quantity # 'energy'
77
+ v.site # 'bus (published but not consumed)'
78
+ v.before, v.after, v.scale, v.tolerance
79
+ sim.time # unchanged — a refused step does not advance the clock
80
+ ```
81
+
82
+ **Be clear about what it catches.** Quantities appearing or vanishing, amounts left unclaimed on
83
+ the bus, and a domain refusing a step it cannot take. It does *not* catch a model that is
84
+ internally consistent and physically wrong. For that, check against something the library did not
85
+ compute — which is what `heat_capacity_j_per_k` is exported for, and what
86
+ `tests/test_pantometry.py` does throughout.
87
+
88
+ ## What crosses the boundary, and what does not
89
+
90
+ Values cross as **SI floats with the unit in the parameter name**: `length_m`, `watts`,
91
+ `initial_k`. pantometry's dimensional types are a compile-time thing — `Length + Time` does not
92
+ compile in Rust — and Python cannot have that. A runtime `Quantity` wrapper would cost an
93
+ allocation and a check per operation to catch, at run time, a class of error a Python caller
94
+ mostly does not make, because it passes values in and reads them out rather than doing algebra on
95
+ them. So the types stay on the Rust side and the units stay in the names.
96
+
97
+ What crosses instead is the audit, which is the part worth having.
98
+
99
+ ## What this cannot do
100
+
101
+ **You cannot run an ensemble from Python, and it is not an oversight.** `Ensemble` exists to run
102
+ many independent samples across threads, and a Python sample function cannot: the GIL serialises
103
+ it. A binding for it would look parallel, measure slower than a plain Python loop because of the
104
+ crossing cost, and have nothing left of the one thing it is for. Write the sampler in Rust, or
105
+ loop in Python and accept one core.
106
+
107
+ **You cannot write a domain in Python.** That means calling back into the interpreter from inside
108
+ the step loop, holding the GIL across it, and deciding what an exception raised mid-sweep does to
109
+ a half-advanced simulation. All three are answerable and none cheaply, so this binds the physics
110
+ the library has and says so rather than shipping a subtly wrong version of that.
111
+
112
+ So: enough to **run and audit** coupled physics from Python, not enough to **extend** it. The
113
+ extending lives in Rust, and [the workspace](https://github.com/YounghyeonPark/pantometry) is where.
114
+
115
+ A `Simulation` is also bound to the thread that created it. `Domain` is not `Send`, and the
116
+ binding says so rather than asking the kernel for a bound it does not offer.
117
+
118
+ **There is no scene or view binding.** The Rust side has `pantometry-scene` for capturing a run and
119
+ `pantometry-view` for drawing one; neither crosses. Nothing forbids it in principle — the reason is
120
+ that a Python caller already has matplotlib, pandas and every plotting stack there is, and what
121
+ they want from this side is the *numbers*: `profile`, `node_temperatures`, `temperature`,
122
+ `ledger`. Handing them an SVG instead would be the worse half of both worlds. If you want the
123
+ HTML report, run the scene from Rust.
124
+
125
+ ## Building
126
+
127
+ Its own cargo workspace, deliberately. This one resolves fifteen external crates where the
128
+ library resolves twelve, seven of them pyo3's and appearing nowhere in the library, plus a
129
+ libpython link — and the library's lockfile, licence allow-list and WebAssembly jobs are promises
130
+ that should not have to accommodate a Python extension.
131
+
132
+ ```sh
133
+ cd bindings/python
134
+ pip install "maturin>=1.7,<2.0"
135
+ maturin build --release # an abi3 wheel: one build serves 3.10 upward
136
+ pip install target/wheels/pantometry-*.whl
137
+ python tests/test_pantometry.py
138
+ ```
139
+
140
+ `maturin develop` works too, in a virtualenv. CI builds the wheel, installs it and runs those
141
+ tests on every commit — because "it compiles" proves neither half of "pip install then import".