llg3d 3.0.0__tar.gz → 3.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {llg3d-3.0.0 → llg3d-3.1.1}/PKG-INFO +1 -1
  2. {llg3d-3.0.0 → llg3d-3.1.1}/pyproject.toml +0 -2
  3. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/__init__.py +1 -1
  4. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/post/extract.py +15 -8
  5. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/post/info.py +15 -1
  6. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/post/m1_vs_T.py +19 -2
  7. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/post/m1_vs_time.py +27 -2
  8. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/post/x_profiles.py +22 -2
  9. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d.egg-info/PKG-INFO +1 -1
  10. {llg3d-3.0.0 → llg3d-3.1.1}/AUTHORS +0 -0
  11. {llg3d-3.0.0 → llg3d-3.1.1}/LICENSE +0 -0
  12. {llg3d-3.0.0 → llg3d-3.1.1}/README.md +0 -0
  13. {llg3d-3.0.0 → llg3d-3.1.1}/setup.cfg +0 -0
  14. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/__main__.py +0 -0
  15. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/benchmarks/__init__.py +0 -0
  16. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/benchmarks/compare_commits.py +0 -0
  17. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/benchmarks/efficiency.py +0 -0
  18. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/benchmarks/utils.py +0 -0
  19. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/element.py +0 -0
  20. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/grid.py +0 -0
  21. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/io.py +0 -0
  22. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/main.py +0 -0
  23. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/parameters.py +0 -0
  24. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/post/__init__.py +0 -0
  25. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/post/process.py +0 -0
  26. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/post/utils.py +0 -0
  27. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/py.typed +0 -0
  28. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/solvers/__init__.py +0 -0
  29. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/solvers/base.py +0 -0
  30. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/solvers/experimental/__init__.py +0 -0
  31. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/solvers/experimental/jax.py +0 -0
  32. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/solvers/math_utils.py +0 -0
  33. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/solvers/mpi.py +0 -0
  34. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/solvers/numpy.py +0 -0
  35. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/solvers/opencl.py +0 -0
  36. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d/solvers/profiling.py +0 -0
  37. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d.egg-info/SOURCES.txt +0 -0
  38. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d.egg-info/dependency_links.txt +0 -0
  39. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d.egg-info/entry_points.txt +0 -0
  40. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d.egg-info/requires.txt +0 -0
  41. {llg3d-3.0.0 → llg3d-3.1.1}/src/llg3d.egg-info/top_level.txt +0 -0
  42. {llg3d-3.0.0 → llg3d-3.1.1}/tests/test_element.py +0 -0
  43. {llg3d-3.0.0 → llg3d-3.1.1}/tests/test_grid.py +0 -0
  44. {llg3d-3.0.0 → llg3d-3.1.1}/tests/test_io.py +0 -0
  45. {llg3d-3.0.0 → llg3d-3.1.1}/tests/test_main.py +0 -0
  46. {llg3d-3.0.0 → llg3d-3.1.1}/tests/test_parameters.py +0 -0
  47. {llg3d-3.0.0 → llg3d-3.1.1}/tests/test_profiling.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llg3d
3
- Version: 3.0.0
3
+ Version: 3.1.1
4
4
  Summary: A solver for the stochastic Landau-Lifshitz-Gilbert equation in 3D
5
5
  Author-email: Clémentine Courtès <clementine.courtes@math.unistra.fr>, Matthieu Boileau <matthieu.boileau@math.unistra.fr>
6
6
  Project-URL: Homepage, https://gitlab.math.unistra.fr/llg3d/llg3d
@@ -76,11 +76,9 @@ doc = [
76
76
  "sphinx-design",
77
77
  "myst-parser",
78
78
  "furo",
79
- "nbsphinx",
80
79
  "sphinx-copybutton",
81
80
  "sphinx-autobuild",
82
81
  "sphinx-prompt",
83
- "sphinx-last-updated-by-git",
84
82
  "sphinxcontrib-programoutput",
85
83
  "sphinxcontrib-bibtex",
86
84
  "ipython",
@@ -1,4 +1,4 @@
1
1
  """Main llg3d package."""
2
2
 
3
- __version__ = "3.0.0"
3
+ __version__ = "3.1.1"
4
4
  __all__ = ["__version__"]
@@ -1,18 +1,23 @@
1
1
  """
2
2
  Extract scalar values from .npz result files.
3
3
 
4
- The extraction paths correspond to the hierarchical structure returned by
5
- `load_results()` (see io.py), where metrics and observables are JSON-decoded
6
- and stored under the 'results' key.
4
+ Use the ``llg3d.extract`` command line tool to extract scalar values from .npz result
5
+ files:
7
6
 
8
- Usage:
7
+ .. command-output:: llg3d.extract --help
9
8
 
10
- .. code-block:: sh
11
9
 
12
- llg3d.extract run.npz params/np results/metrics/total_time
10
+ Extract the total execution time from a ``run.npz`` file:
13
11
 
14
- This will extract the number of processes and total simulation time from the run.npz file.
15
- Paths are separated by '/' and navigate through nested dictionaries and object attributes.
12
+ .. command-output:: llg3d.extract run.npz results/metrics/total_time
13
+ :cwd: ../execute
14
+
15
+
16
+ Extract both the total execution time and the time per iteration:
17
+
18
+ .. command-output:: llg3d.extract run.npz results/metrics/total_time \
19
+ results/metrics/time_per_ite
20
+ :cwd: ../execute
16
21
  """
17
22
 
18
23
  import argparse
@@ -49,8 +54,10 @@ def _navigate(value: object, levels: list[str]):
49
54
 
50
55
  return _navigate(next_value, levels[1:])
51
56
 
57
+
52
58
  ExtractedValue = float | int | str | bool | np.integer | np.floating
53
59
 
60
+
54
61
  def extract_values(npz_file: Path, *keys: str) -> list[ExtractedValue]:
55
62
  """
56
63
  Extract scalar values from a .npz file.
@@ -1,4 +1,18 @@
1
- """Dump simulation results from a .npz file."""
1
+ """
2
+ Dump simulation results from a .npz file.
3
+
4
+ To browse the content of the ``run.npz`` file, use the ``llg3d.info`` command:
5
+
6
+ .. command-output:: llg3d.info run.npz
7
+ :cwd: ../execute/
8
+
9
+ The numpy arrays cans be previewed with more detailed information using the ``--verbose``
10
+ option:
11
+
12
+ .. command-output:: llg3d.info run.npz --verbose
13
+ :cwd: ../execute/
14
+
15
+ """
2
16
 
3
17
  import argparse
4
18
  import textwrap
@@ -1,4 +1,21 @@
1
- """Plot the magnetization vs temperature and determine the Curie temperature."""
1
+ """
2
+ Plot the magnetization vs temperature and determine the Curie temperature.
3
+
4
+ Use the ``llg3d.m1_vs_T`` command line tool to plot the average magnetization versus
5
+ temperature from multiple result files:
6
+
7
+ .. command-output:: llg3d.m1_vs_T -h
8
+ :cwd: ../execute/temperatures
9
+
10
+ When calling the tool on a selection of result files:
11
+
12
+ .. command-output:: llg3d.m1_vs_T run_*.npz -i m1_vs_T.png
13
+ :cwd: ../execute/temperatures
14
+ :shell:
15
+
16
+ .. image:: ../execute/temperatures/m1_vs_T.png
17
+ :alt: Magnetization versus temperature for multiple files
18
+ """
2
19
 
3
20
  from pathlib import Path
4
21
 
@@ -82,7 +99,7 @@ def main(): # pragma: no cover
82
99
  from .utils import get_cli_args
83
100
 
84
101
  args = get_cli_args(
85
- description=__doc__,
102
+ description="Plot the magnetization vs temperature and determine the Curie temperature.",
86
103
  default_image_filepath=Path("m1_vs_T.png"),
87
104
  )
88
105
 
@@ -1,4 +1,29 @@
1
- """Plot m1 vs time from one or more result files."""
1
+ """
2
+ Plot m1 vs time from one or more result files.
3
+
4
+ Use the ``llg3d.m1_vs_time`` command line tool to plot the average magnetization versus time from multiple result files:
5
+
6
+ .. command-output:: llg3d.m1_vs_time -h
7
+ :cwd: ../execute/temperatures
8
+
9
+ When calling the tool on a result files:
10
+
11
+ .. command-output:: llg3d.m1_vs_time run_1100K.npz -i m1_vs_time.png
12
+ :cwd: ../execute/temperatures
13
+ :shell:
14
+
15
+ .. image:: ../execute/temperatures/m1_vs_time.png
16
+ :alt: Magnetization versus time for a single file
17
+
18
+ Now when calling the tool on a selection of result files:
19
+
20
+ .. command-output:: llg3d.m1_vs_time run_*.npz -i m1_vs_time_multiple.png
21
+ :cwd: ../execute/temperatures
22
+ :shell:
23
+
24
+ .. image:: ../execute/temperatures/m1_vs_time_multiple.png
25
+ :alt: Magnetization versus time for multiple files
26
+ """
2
27
 
3
28
  from pathlib import Path
4
29
 
@@ -45,7 +70,7 @@ def plot_m1_vs_time(
45
70
  def main(): # pragma: no cover
46
71
  """Parse CLI arguments and call the plot function."""
47
72
  args = get_cli_args(
48
- description=__doc__,
73
+ description="Plot m1 vs time from one or more result files.",
49
74
  default_image_filepath=Path("m1_vs_time.png"),
50
75
  )
51
76
 
@@ -1,4 +1,24 @@
1
- """Plot x-profiles of magnetization from a result file."""
1
+ """
2
+ Plot x-profiles of magnetization from a result file.
3
+
4
+ Use the ``llg3d.x_profiles`` command line tool to plot the x-profiles of magnetization
5
+ from a result file:
6
+
7
+ .. command-output:: llg3d.x_profiles -h
8
+ :cwd: ../execute/domain_wall
9
+
10
+ See :doc:`here </execute/domain_wall/index>` for how to generate the ``run.npz`` file
11
+ used in this example.
12
+
13
+ When calling the tool on a result file:
14
+
15
+ .. command-output:: llg3d.x_profiles run.npz -m 1 -t ::4 -i x_profiles_4.png
16
+ :cwd: ../execute/domain_wall
17
+ :shell:
18
+
19
+ .. image:: ../execute/domain_wall/x_profiles_4.png
20
+ :alt: Longitudinal profiles of magnetization
21
+ """
2
22
 
3
23
  import argparse
4
24
  from pathlib import Path
@@ -128,7 +148,7 @@ def get_cli_args(
128
148
  def main(): # pragma: no cover
129
149
  """Parse CLI arguments and call the plot function."""
130
150
  args = get_cli_args(
131
- description=__doc__,
151
+ description="Plot x-profiles of magnetization from a result file.",
132
152
  default_image_filepath=Path("x_profile.png"),
133
153
  )
134
154
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llg3d
3
- Version: 3.0.0
3
+ Version: 3.1.1
4
4
  Summary: A solver for the stochastic Landau-Lifshitz-Gilbert equation in 3D
5
5
  Author-email: Clémentine Courtès <clementine.courtes@math.unistra.fr>, Matthieu Boileau <matthieu.boileau@math.unistra.fr>
6
6
  Project-URL: Homepage, https://gitlab.math.unistra.fr/llg3d/llg3d
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes