yamc 0.12.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.
yamc-0.12.0/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ dist/
2
+ site/
3
+ __pycache__/
4
+ # Written by the executed code blocks in the docs (results.md, models.md, ...).
5
+ *.vtkhdf
6
+ *.h5
yamc-0.12.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jonathan Shimwell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
yamc-0.12.0/PKG-INFO ADDED
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.5
2
+ Name: yamc
3
+ Version: 0.12.0
4
+ Summary: Yet Another Monte Carlo: neutron and photon transport with mesh geometry support
5
+ Project-URL: Homepage, https://github.com/fusion-neutronics/yamc
6
+ Project-URL: Documentation, https://fusion-neutronics.github.io/yamc/
7
+ Project-URL: Repository, https://github.com/fusion-neutronics/yamc
8
+ Project-URL: Issues, https://github.com/fusion-neutronics/yamc/issues
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: fusion,monte-carlo,neutronics,nuclear,shielding,transport
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Rust
16
+ Classifier: Topic :: Scientific/Engineering :: Physics
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: yamc-core==0.12.0
19
+ Description-Content-Type: text/markdown
20
+
21
+ # YAMC
22
+
23
+ **Y**et **A**nother **M**onte **C**arlo: an open-source Monte Carlo particle
24
+ transport code for neutron and photon simulations, with a focus on fusion
25
+ neutronics workflows.
26
+
27
+ [Documentation](https://fusion-neutronics.github.io/yamc/) 📝 |
28
+ [PyPI](https://pypi.org/project/yamc/) 🐍
29
+
30
+ ```bash
31
+ pip install yamc
32
+ ```
33
+
34
+ ```python
35
+ import yamc
36
+
37
+ yamc.cross_section_data = "endf-b8.1"
38
+
39
+ steel = yamc.Material({"Fe56": 1.0}, density=7.87)
40
+ sphere = yamc.Sphere(radius=10.0, boundary="vacuum")
41
+ cell = yamc.Cell(region=sphere.below, material=steel)
42
+ geometry = yamc.Geometry([cell])
43
+
44
+ source = yamc.NeutronSource(energy=yamc.sources.Discrete([14.06e6], [1.0]))
45
+ tally = yamc.Tally(scores=["flux"])
46
+
47
+ model = yamc.Model(geometry=geometry, source=source, tallies=[tally])
48
+ results = model.simulate_transport(total_particles=10_000)
49
+ print(results[tally].mean)
50
+ ```
51
+
52
+ ## What it does
53
+
54
+ Continuous-energy neutron and photon transport over CSG or unstructured mesh
55
+ geometry, on CPU or GPU, with tallies, variance reduction, transport-coupled
56
+ transmutation and shutdown dose rates. The solver is Rust; the wheel needs no
57
+ compiler and no external toolchain.
58
+
59
+
60
+ ## Transmutation without transport
61
+
62
+ If you already have a spectrum and want none of the transport stack, install
63
+ [yani](https://github.com/fusion-neutronics/yani) instead: same materials, same
64
+ schedules, same nuclear data, no geometry.
yamc-0.12.0/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # YAMC
2
+
3
+ **Y**et **A**nother **M**onte **C**arlo: an open-source Monte Carlo particle
4
+ transport code for neutron and photon simulations, with a focus on fusion
5
+ neutronics workflows.
6
+
7
+ [Documentation](https://fusion-neutronics.github.io/yamc/) 📝 |
8
+ [PyPI](https://pypi.org/project/yamc/) 🐍
9
+
10
+ ```bash
11
+ pip install yamc
12
+ ```
13
+
14
+ ```python
15
+ import yamc
16
+
17
+ yamc.cross_section_data = "endf-b8.1"
18
+
19
+ steel = yamc.Material({"Fe56": 1.0}, density=7.87)
20
+ sphere = yamc.Sphere(radius=10.0, boundary="vacuum")
21
+ cell = yamc.Cell(region=sphere.below, material=steel)
22
+ geometry = yamc.Geometry([cell])
23
+
24
+ source = yamc.NeutronSource(energy=yamc.sources.Discrete([14.06e6], [1.0]))
25
+ tally = yamc.Tally(scores=["flux"])
26
+
27
+ model = yamc.Model(geometry=geometry, source=source, tallies=[tally])
28
+ results = model.simulate_transport(total_particles=10_000)
29
+ print(results[tally].mean)
30
+ ```
31
+
32
+ ## What it does
33
+
34
+ Continuous-energy neutron and photon transport over CSG or unstructured mesh
35
+ geometry, on CPU or GPU, with tallies, variance reduction, transport-coupled
36
+ transmutation and shutdown dose rates. The solver is Rust; the wheel needs no
37
+ compiler and no external toolchain.
38
+
39
+
40
+ ## Transmutation without transport
41
+
42
+ If you already have a spectrum and want none of the transport stack, install
43
+ [yani](https://github.com/fusion-neutronics/yani) instead: same materials, same
44
+ schedules, same nuclear data, no geometry.
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "yamc"
7
+ # Kept in lockstep with yamc-core: CI rewrites both this and the pin below from
8
+ # the release tag, and refuses to publish if that version is not on PyPI yet.
9
+ version = "0.12.0"
10
+ description = "Yet Another Monte Carlo: neutron and photon transport with mesh geometry support"
11
+ readme = "README.md"
12
+ requires-python = ">=3.10"
13
+ license = "MIT"
14
+ license-files = ["LICENSE"]
15
+ keywords = ["nuclear", "monte-carlo", "neutronics", "transport", "fusion", "shielding"]
16
+ classifiers = [
17
+ "Programming Language :: Rust",
18
+ "Programming Language :: Python :: 3",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ "Topic :: Scientific/Engineering :: Physics",
22
+ ]
23
+
24
+ # The whole distribution. `yamc-core` is the compiled wheel and it provides the
25
+ # `yamc` module itself, so this package deliberately ships no code: nothing to
26
+ # re-export, nothing to keep in sync, and no second copy of the type stubs.
27
+ # (`pip install pillow` giving `import PIL` is the same arrangement.)
28
+ #
29
+ # The pin is exact. A range would let `pip install yamc==0.4.0` resolve to a
30
+ # core wheel whose API does not match the docs published for 0.4.0.
31
+ dependencies = ["yamc-core==0.12.0"]
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/fusion-neutronics/yamc"
35
+ Documentation = "https://fusion-neutronics.github.io/yamc/"
36
+ Repository = "https://github.com/fusion-neutronics/yamc"
37
+ Issues = "https://github.com/fusion-neutronics/yamc/issues"
38
+
39
+ # Hatchling expects to find a package to build; there is none, and that is the
40
+ # point. Declaring an empty file set makes the metadata-only wheel explicit
41
+ # rather than a build error.
42
+ [tool.hatch.build.targets.wheel]
43
+ bypass-selection = true
44
+
45
+ [tool.hatch.build.targets.sdist]
46
+ include = ["README.md", "LICENSE", "pyproject.toml"]