bijective-gamut 2.2.0__tar.gz → 2.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 (149) hide show
  1. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/CHANGELOG.md +68 -0
  2. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/CITATION.cff +2 -2
  3. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/CMakeLists.txt +2 -1
  4. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/CONTRIBUTING.md +3 -2
  5. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/PKG-INFO +44 -144
  6. bijective_gamut-2.3.0/README.md +119 -0
  7. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/SPEC.md +143 -58
  8. bijective_gamut-2.3.0/examples/00_readme.py +19 -0
  9. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/07_models.py +19 -4
  10. bijective_gamut-2.3.0/examples/README.md +16 -0
  11. bijective_gamut-2.3.0/examples/cpp/sweep.cpp +26 -0
  12. bijective_gamut-2.3.0/examples/rust/sweep.rs +25 -0
  13. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/include/gamut/gamut.h +51 -18
  14. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/include/gamut/gamut.hpp +90 -16
  15. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/llms.txt +6 -4
  16. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/mkdocs.yml +2 -1
  17. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/pyproject.toml +1 -1
  18. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/_files.py +17 -9
  19. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/_lib.py +7 -2
  20. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/_models.py +38 -10
  21. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/_study.py +57 -15
  22. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/cli.py +98 -31
  23. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/_pages.py +2 -0
  24. bijective_gamut-2.3.0/python/tests/test_append_many.py +116 -0
  25. bijective_gamut-2.3.0/python/tests/test_append_sessions.py +118 -0
  26. bijective_gamut-2.3.0/python/tests/test_arrays.py +222 -0
  27. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_cli.py +68 -0
  28. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_docs.py +11 -4
  29. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_edges.py +20 -0
  30. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_examples.py +3 -2
  31. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_models.py +17 -1
  32. bijective_gamut-2.3.0/python/tests/test_readme.py +33 -0
  33. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_validate.py +16 -2
  34. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/Cargo.toml +1 -1
  35. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/gamut/Cargo.toml +1 -1
  36. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/gamut/src/lib.rs +126 -14
  37. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/gamut/tests/corpus.rs +5 -0
  38. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/gamut/tests/study.rs +57 -0
  39. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/gamut-sys/src/lib.rs +3 -0
  40. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/capi.cpp +73 -5
  41. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/codec.cpp +0 -3
  42. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/copy.cpp +103 -24
  43. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/copy.hpp +10 -1
  44. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/evaluate.cpp +69 -20
  45. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/evaluate.hpp +11 -7
  46. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/h5.cpp +6 -1
  47. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/names.cpp +49 -0
  48. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/names.hpp +27 -1
  49. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/nearest.cpp +50 -10
  50. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/nearest.hpp +7 -3
  51. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/reader.cpp +62 -18
  52. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/reader.hpp +4 -0
  53. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/schema.cpp +8 -1
  54. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/schema.hpp +13 -0
  55. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/select.cpp +4 -0
  56. bijective_gamut-2.3.0/src/session.cpp +278 -0
  57. bijective_gamut-2.3.0/src/session.hpp +49 -0
  58. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/validate.cpp +85 -39
  59. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/writer.cpp +129 -41
  60. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/writer.hpp +9 -3
  61. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/tests/header_tests.cpp +87 -0
  62. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/tests/writer_reader_tests.cpp +657 -1
  63. bijective_gamut-2.2.0/README.md +0 -219
  64. bijective_gamut-2.2.0/examples/00_readme.py +0 -29
  65. bijective_gamut-2.2.0/examples/cpp/sweep.cpp +0 -36
  66. bijective_gamut-2.2.0/examples/rust/sweep.rs +0 -28
  67. bijective_gamut-2.2.0/python/tests/test_readme.py +0 -84
  68. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/.gitignore +0 -0
  69. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/LICENSE +0 -0
  70. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/01_run_table.py +0 -0
  71. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/02_one_mesh.py +0 -0
  72. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/03_geometry_family.py +0 -0
  73. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/04_changing_mesh.py +0 -0
  74. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/05_time_series.py +0 -0
  75. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/06_uncertainty_gradients.py +0 -0
  76. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/08_selecting_parts.py +0 -0
  77. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/09_combining_files.py +0 -0
  78. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/10_vtk.py +0 -0
  79. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/_cylinder.py +0 -0
  80. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/c/one_mesh.c +0 -0
  81. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cli/second_entry.json +0 -0
  82. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cli/second_entry_runs.csv +0 -0
  83. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cli/sweep.json +0 -0
  84. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cli/sweep_runs.csv +0 -0
  85. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/combining.cpp +0 -0
  86. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/cylinder.hpp +0 -0
  87. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/family.cpp +0 -0
  88. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/nearest.cpp +0 -0
  89. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/one_mesh.cpp +0 -0
  90. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/parts.cpp +0 -0
  91. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/refinement.cpp +0 -0
  92. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/run_table.cpp +0 -0
  93. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/transient.cpp +0 -0
  94. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/cpp/uncertain.cpp +0 -0
  95. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/combining.rs +0 -0
  96. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/cylinder.rs +0 -0
  97. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/family.rs +0 -0
  98. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/nearest.rs +0 -0
  99. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/one_mesh.rs +0 -0
  100. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/parts.rs +0 -0
  101. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/refinement.rs +0 -0
  102. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/run_table.rs +0 -0
  103. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/transient.rs +0 -0
  104. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/examples/rust/uncertain.rs +0 -0
  105. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/exports.map +0 -0
  106. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/exports.txt +0 -0
  107. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/licenses/hdf5-lbnl.txt +0 -0
  108. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/licenses/hdf5.txt +0 -0
  109. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/licenses/zlib.txt +0 -0
  110. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/overrides/partials/logo.html +0 -0
  111. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/__init__.py +0 -0
  112. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/__main__.py +0 -0
  113. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/_notice.py +0 -0
  114. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/_units.py +0 -0
  115. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/_validate.py +0 -0
  116. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/gamut/vtk.py +0 -0
  117. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_binding.py +0 -0
  118. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_existing_destinations.py +0 -0
  119. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_files.py +0 -0
  120. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_guide_cli.py +0 -0
  121. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_guide_languages.py +0 -0
  122. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_layouts.py +0 -0
  123. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/python/tests/test_vtk.py +0 -0
  124. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/.gitignore +0 -0
  125. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/gamut/build.rs +0 -0
  126. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/gamut-sys/Cargo.toml +0 -0
  127. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/gamut-sys/build.rs +0 -0
  128. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/rust/gamut-sys/generate.py +0 -0
  129. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/chunk.cpp +0 -0
  130. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/chunk.hpp +0 -0
  131. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/chunks.cpp +0 -0
  132. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/codec.hpp +0 -0
  133. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/h5.hpp +0 -0
  134. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/notice.cpp +0 -0
  135. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/notice.hpp +0 -0
  136. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/select.hpp +0 -0
  137. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/sha256.cpp +0 -0
  138. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/sha256.hpp +0 -0
  139. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/types.cpp +0 -0
  140. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/types.hpp +0 -0
  141. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/units.cpp +0 -0
  142. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/units.hpp +0 -0
  143. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/validate.hpp +0 -0
  144. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/value.cpp +0 -0
  145. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/src/value.hpp +0 -0
  146. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/tests/unit_tests.cpp +0 -0
  147. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/tools/build_core.sh +0 -0
  148. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/tools/build_deps.sh +0 -0
  149. {bijective_gamut-2.2.0 → bijective_gamut-2.3.0}/tools/damaged_files.py +0 -0
@@ -1,5 +1,73 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.3.0 (2026-11-18)
4
+
5
+ The file format (`gamut/1`) is unchanged: arrays are an addition within
6
+ it (specification §17). The C interface only adds calls.
7
+
8
+ - Arrays: an input with a fixed number of values per run, such as a wall
9
+ temperature at 200 stations or 40 shape coefficients, with no mesh
10
+ (specification §3.9). One unit, a role (design or condition) and, in a
11
+ model file, one pair of bounds hold for all its values. Declared with
12
+ `arrays={"wall_t": {"units": "K", "length": 200}}` in Python (and the
13
+ same in MATLAB, Julia, C++, Rust and C, `gamut_declare_array`), given as
14
+ runs × length and read with `get_array`. A model's `inputs` may name
15
+ one, and reads it as rows × length; the built-in nearest model takes
16
+ arrays, each input's number of values given in its new `widths`.
17
+ Evaluation takes an array rows first (`gamut_evaluation_array` refuses
18
+ one given length × rows) and writes it into the answer; `outside`, the
19
+ W4 findings and `gamut info` go value by value. The format stays
20
+ `gamut/1`: an array is stored as a dataset whose role is
21
+ `design_array` or `condition_array`, which earlier readers ignore.
22
+ Earlier releases still read a data file that has arrays, without them
23
+ (their validator reports W5); they cannot validate a model file whose
24
+ models read one (E17) or evaluate it, and appending to or copying a file
25
+ that has arrays needs this release: an earlier one leaves the array
26
+ short of the new rows, or out of the copy. This release refuses to read
27
+ or append to an array left short that way (E5), and says why.
28
+ - `append` takes several source files at once (a list in Python, a cell
29
+ or string array in MATLAB, a vector in Julia, `append_files` in C++ and
30
+ Rust, `gamut_append_files` in C, several files on the command line).
31
+ The result is that of appending them one by one, made in one session:
32
+ the destination is copied once rather than once per file, and gets
33
+ every file's runs or none. An error names the file it is about.
34
+ - The writer refuses a derivative with respect to coordinates along an
35
+ axis the coordinates do not have (E13). It used to write the file, which
36
+ the validator then refused with the same rule.
37
+ - The conformance corpus has a case for every rule of the specification:
38
+ E24 and W11 had none, and five more clauses of E8, E15 and E20 are
39
+ covered.
40
+ - Appending is safe against a crash: the runs go to a copy beside the
41
+ file (`<file>.appending-…`, a clone where the filesystem makes one) that
42
+ replaces the file when it closes. A process killed while it appends, or
43
+ a write that fails, now loses only that session's runs; it used to be
44
+ able to leave the whole file unreadable (#92). `append` adds all of a
45
+ source's runs or none. A second process opening a file to append while
46
+ one does is refused by name (a lock on `<file>.appending`), and readers
47
+ keep reading the file meanwhile; both used to fail with "cannot open as
48
+ an HDF5 file". Appending needs write access to the file's folder.
49
+ Julia's `do` block, like Python's `with`, gives a file up when its
50
+ close fails; it used to close a second time and could publish runs
51
+ while reporting the failure.
52
+ - The Julia package is named `GamutFile`, after the General registry's
53
+ convention for file-format packages, and is added from the registry:
54
+ `Pkg.add(name="GamutFile")`, then `using GamutFile`. Calls are spelled
55
+ `GamutFile.open` and so on; nothing else changes. The format, the files
56
+ and the other languages keep the name `gamut`.
57
+ - `Nearest` takes `x` as points × columns as given, in Python, MATLAB and
58
+ Julia, and the core refuses another shape (E17). It used to be reshaped
59
+ to fit first, so columns × points passed and stored pairs of one
60
+ column's values. One column may still be a plain list of points.
61
+ - A field read refuses `cells` on a node field and `nodes` on a cell
62
+ field, naming the one to use; either used to select by position
63
+ whatever the field's location. Julia also refuses `nodes` and `cells`
64
+ together, as Python and MATLAB do. The command line's `--zone` reads
65
+ through the field's own keyword.
66
+ - The specification (§17), the validation page and CONTRIBUTING say that a
67
+ reader ignores an attribute, group, role or statistic word it does not
68
+ know and goes on, and that the validator reports it (W5). They said a
69
+ reader reports W5; no reader does.
70
+
3
71
  ## 2.2.0 (2026-11-04)
4
72
 
5
73
  The file format (`gamut/1`) is unchanged; the C interface only adds calls.
@@ -5,8 +5,8 @@ message: >-
5
5
  `format`, for example "gamut/1").
6
6
  title: "Gamut: an open file format for simulation studies"
7
7
  type: software
8
- version: 2.2.0
9
- date-released: 2026-11-04
8
+ version: 2.3.0
9
+ date-released: 2026-11-18
10
10
  authors:
11
11
  - name: "Bijective Systems"
12
12
  repository-code: "https://github.com/bijective-systems-org/gamut"
@@ -1,5 +1,5 @@
1
1
  cmake_minimum_required(VERSION 3.16)
2
- project(gamut VERSION 2.2.0 LANGUAGES C CXX)
2
+ project(gamut VERSION 2.3.0 LANGUAGES C CXX)
3
3
 
4
4
  # The shared core of spec version 1: one C++ library behind a plain C
5
5
  # interface (include/gamut/gamut.h). Python, MATLAB and Julia bind to
@@ -74,6 +74,7 @@ set(GAMUT_CORE_SOURCES
74
74
  src/nearest.cpp
75
75
  src/evaluate.cpp
76
76
  src/copy.cpp
77
+ src/session.cpp
77
78
  src/notice.cpp
78
79
  src/select.cpp
79
80
  src/capi.cpp
@@ -20,7 +20,8 @@ Open an issue first, with:
20
20
  1. a real study or workflow that the format cannot hold today;
21
21
  2. the meaning proposed, and what readers that do not know it will do;
22
22
  3. whether it is an addition within version 1 (SPEC.md section 17: a
23
- reader that does not know it reports W5 and goes on) or needs a new
23
+ reader that does not know it ignores it and goes on, and the validator
24
+ reports W5) or needs a new
24
25
  major version;
25
26
  4. the corpus cases that pin it.
26
27
 
@@ -58,7 +59,7 @@ the JSON package in its environment):
58
59
  julia --project=julia -e 'include("julia/test/runtests.jl")'
59
60
  python corpus/generate.py /tmp/corpus
60
61
  GAMUT_LIBRARY=build/libgamut.so python corpus/check.py /tmp/corpus
61
- julia --project=<an environment with JSON and Gamut> julia/test/check_corpus.jl /tmp/corpus
62
+ julia --project=<an environment with JSON and GamutFile> julia/test/check_corpus.jl /tmp/corpus
62
63
  ```
63
64
 
64
65
  Rust's tests, the corpus from Rust, and the check that `bijective-gamut-sys`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bijective-gamut
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: Gamut by Bijective Systems: an open file format for parametric simulation studies and fitted models
5
5
  Keywords: simulation,parametric study,design of experiments,CFD,FEA,HDF5,netCDF,xarray,surrogate model,reduced-order model,machine learning,dataset,MATLAB,Julia
6
6
  Author: Bijective Systems
@@ -51,14 +51,13 @@ Description-Content-Type: text/markdown
51
51
  </picture>
52
52
  </p>
53
53
 
54
- # Gamut: an open file format for parametric simulation studies
54
+ # Gamut: a file format for parametric studies and models, with definitions intact
55
55
 
56
56
  By [Bijective Systems](https://github.com/bijective-systems-org), with
57
57
  libraries for Python, MATLAB, Julia, C++, C and Rust.
58
58
 
59
+ **[Start here](https://bijective-systems-org.github.io/gamut/first-file.html)** ·
59
60
  [Documentation](https://bijective-systems-org.github.io/gamut/) ·
60
- [Installing](https://bijective-systems-org.github.io/gamut/install.html) ·
61
- [Examples](https://bijective-systems-org.github.io/gamut/guide/index.html) ·
62
61
  [Specification](https://bijective-systems-org.github.io/gamut/reference/specification.html) ·
63
62
  [PyPI: bijective-gamut](https://pypi.org/project/bijective-gamut/) ·
64
63
  [Releases](https://github.com/bijective-systems-org/gamut/releases)
@@ -69,14 +68,19 @@ libraries for Python, MATLAB, Julia, C++, C and Rust.
69
68
 
70
69
  ---
71
70
 
72
- Gamut is a file format for parametric simulation studies: the hundreds or
73
- thousands of CFD or FEA runs behind a design sweep, an aerodynamic
74
- database or a surrogate model. One file holds the run table, each run's
75
- inputs, results and status, and, when the runs have a mesh, the mesh and
76
- every field on it, all with units. A model fitted to the runs is saved the
77
- same way, as plain numbers with no code. Every language reads and writes
78
- the file through one core, so each reads what another wrote, value for
79
- value.
71
+ Gamut is an open file format for exchanging engineering studies and models
72
+ with their definitions intact. Study files describe runs, parameters,
73
+ results, units and relationships, including fields on shared or varying
74
+ meshes. Those definitions travel with the data, so another person or tool
75
+ can inspect the study without reconstructing its meaning from filenames
76
+ and separate notes.
77
+
78
+ Libraries for Python, MATLAB, Julia, C++, C and Rust use one core to read
79
+ and write the format, so each reads what another wrote, value for value.
80
+ Model files hold their definitions and state as plain data, without
81
+ executable code. Declared inputs and outputs can be inspected without the
82
+ model implementation. Interpreting its state and evaluating the model
83
+ require an implementation of the recorded type in the consuming runtime.
80
84
 
81
85
  <p align="center">
82
86
  <picture>
@@ -85,148 +89,42 @@ value.
85
89
  </picture>
86
90
  </p>
87
91
 
88
- ## Example
92
+ ## First file
89
93
 
90
- A sweep of a wing's angle of attack: six runs written at once, a seventh
91
- added later, and the lift of the runs that converged read back. `cl`
92
- stands for your solver's results.
94
+ Install with `python -m pip install bijective-gamut`. This example
95
+ writes one input and one result for each of three runs.
93
96
 
94
97
  ```python
95
- alpha = np.arange(0.0, 11.0, 2.0) # six angles of attack, in degrees
96
- cl = 0.11 * alpha # stands for the solver's lift coefficients
97
-
98
- with gamut.create("sweep.gamut", writer="example sweep",
99
- parameters={"alpha": {"units": "degree", "role": "condition"}},
100
- labels={"status": {"role": "status",
101
- "categories": ["converged", "failed"]}},
102
- scalars={"cl": "1"}) as study:
103
- study.add_runs({"alpha": alpha, "cl": cl,
104
- "status": ["converged"] * len(alpha)})
105
-
106
- with gamut.open("sweep.gamut", mode="a") as study:
107
- study.add_run({"alpha": 12, "status": "failed"})
108
-
109
- with gamut.open("sweep.gamut") as study:
110
- lift = study.get_scalar("cl", rows=study.select("status == converged"))
111
- ```
112
-
113
- <details>
114
- <summary>MATLAB</summary>
115
-
116
- ```matlab
117
- alpha = (0:2:10)'; % six angles of attack, in degrees
118
- cl = 0.11 * alpha; % stands for the solver's lift coefficients
119
-
120
- study = gamut.create('sweep.gamut', 'writer', 'example sweep', ...
121
- 'parameters', struct('alpha', struct('units', 'degree', ...
122
- 'role', 'condition')), ...
123
- 'labels', struct('status', struct('role', 'status', ...
124
- 'categories', {{'converged', 'failed'}})), ...
125
- 'scalars', struct('cl', '1'));
126
- status = repmat({'converged'}, numel(alpha), 1);
127
- study.addRuns(struct('alpha', alpha, 'cl', cl, 'status', {status}));
128
- study.close();
98
+ import gamut
129
99
 
130
- study = gamut.open('sweep.gamut', 'mode', 'a');
131
- study.addRun(struct('alpha', 12, 'status', 'failed'));
132
- study.close();
100
+ # Values at the same position belong to the same run.
101
+ alpha = [0.0, 2.0, 4.0]
102
+ cl = [0.0, 0.22, 0.44]
133
103
 
134
- study = gamut.open('sweep.gamut');
135
- lift = study.getScalar('cl', 'rows', study.select('status == converged'));
136
- study.close();
137
- ```
138
-
139
- </details>
140
-
141
- <details>
142
- <summary>Julia</summary>
143
-
144
- ```julia
145
- alpha = collect(0.0:2.0:10.0) # six angles of attack, in degrees
146
- cl = 0.11 .* alpha # stands for the solver's lift coefficients
104
+ with gamut.create(
105
+ "first.gamut",
106
+ writer="example sweep",
107
+ parameters={"alpha": {"units": "degree", "role": "condition"}},
108
+ scalars={"cl": "1"},
109
+ ) as study:
110
+ study.add_runs({"alpha": alpha, "cl": cl})
147
111
 
148
- Gamut.create("sweep.gamut"; writer="example sweep",
149
- parameters=Dict("alpha" => (units="degree", role="condition")),
150
- labels=Dict("status" => (role="status",
151
- categories=["converged", "failed"])),
152
- scalars=Dict("cl" => "1")) do study
153
- status = fill("converged", length(alpha))
154
- Gamut.add_runs!(study, Dict("alpha" => alpha, "cl" => cl, "status" => status))
155
- end
112
+ with gamut.open("first.gamut") as study:
113
+ lift = study.get_scalar("cl")
156
114
 
157
- Gamut.open("sweep.gamut"; mode="a") do study
158
- Gamut.add_run!(study, Dict("alpha" => 12.0, "status" => "failed"))
159
- end
160
-
161
- lift = Gamut.open("sweep.gamut") do study
162
- Gamut.get_scalar(study, "cl"; rows=Gamut.select(study, "status == converged"))
163
- end
115
+ print("cl:", " ".join(f"{value:.2f}" for value in lift))
164
116
  ```
165
117
 
166
- </details>
167
-
168
- <details>
169
- <summary>C++</summary>
170
-
171
- ```cpp
172
- const std::vector<double> alpha = {0, 2, 4, 6, 8, 10}; // angles of attack, degrees
173
- std::vector<double> cl; // stands for the solver's lift coefficients
174
- for (const double a : alpha) cl.push_back(0.11 * a);
175
-
176
- auto study = gamut::create("sweep.gamut", "example sweep");
177
- study.declare_parameter("alpha", "condition", "degree");
178
- study.declare_label("status", "status", {"converged", "failed"});
179
- study.declare_scalar("cl", "1");
180
- const std::vector<std::string> status(alpha.size(), "converged");
181
- study.add_runs({{"alpha", alpha}, {"cl", cl}, {"status", status}});
182
- study.close();
183
-
184
- study = gamut::open("sweep.gamut", "a");
185
- study.add_run({{"alpha", 12.0}, {"status", "failed"}});
186
- study.close();
187
-
188
- study = gamut::open("sweep.gamut");
189
- const std::vector<double> lift =
190
- study.get_scalar("cl", study.select("status == converged"));
191
- ```
192
-
193
- </details>
194
-
195
- <details>
196
- <summary>Rust</summary>
197
-
198
- ```rust
199
- let alpha = vec![0.0, 2.0, 4.0, 6.0, 8.0, 10.0]; // angles of attack, degrees
200
- let cl: Vec<f64> = alpha.iter().map(|a| 0.11 * a).collect(); // stands for the solver's lift coefficients
201
-
202
- let mut study = gamut::create("sweep.gamut", "example sweep", "", "")?;
203
- study.declare_parameter("alpha", "condition", "degree")?;
204
- study.declare_label("status", "status", &["converged", "failed"])?;
205
- study.declare_scalar("cl", "1")?;
206
- let status = vec!["converged"; alpha.len()];
207
- study.add_runs(&[("alpha", alpha.into()), ("cl", cl.into()), ("status", status.into())], &[])?;
208
- study.close()?;
209
-
210
- let mut study = gamut::open_append("sweep.gamut")?;
211
- study.add_run(&[("alpha", 12.0.into()), ("status", "failed".into())], &[])?;
212
- study.close()?;
213
-
214
- let study = gamut::open("sweep.gamut")?;
215
- let lift = study.get_scalar("cl", study.select("status == converged")?)?;
216
- ```
217
-
218
- </details>
219
-
220
- All five print the same line:
221
-
222
118
  ```text
223
- lift of the runs that converged: 0.00 0.22 0.44 0.66 0.88 1.10
119
+ cl: 0.00 0.22 0.44
224
120
  ```
225
121
 
226
- The [examples](https://bijective-systems-org.github.io/gamut/guide/index.html) go on from here, a step at a time
227
- and in each language: a mesh shared by every run, families of shapes,
228
- meshes that change, time series, uncertainty, and models fitted to the
229
- runs.
122
+ [First file](https://bijective-systems-org.github.io/gamut/first-file.html)
123
+ shows how to inspect and validate the file and runs the same example in
124
+ MATLAB, Julia, C++ and Rust.
125
+
126
+ For a full study, see the
127
+ [capsule aeroheating dataset](https://huggingface.co/datasets/bijective/capsule-aeroheating).
230
128
 
231
129
  ## Performance
232
130
 
@@ -249,9 +147,9 @@ another approach is faster.
249
147
  |---|---|
250
148
  | Python 3.11 or later | `pip install bijective-gamut` |
251
149
  | MATLAB R2023b or later | open `Gamut.mltbx` from the [latest release](https://github.com/bijective-systems-org/gamut/releases/latest) |
252
- | Julia 1.10 or later | `Pkg.add(url="https://github.com/bijective-systems-org/gamut", subdir="julia", rev="v2.2.0")` |
150
+ | Julia 1.10 or later | `Pkg.add(name="GamutFile", version="2.3.0")` |
253
151
  | C++ and C | CMake build and install, then `find_package(gamut)`; include `gamut/gamut.hpp` (C++17) or `gamut/gamut.h` (C) |
254
- | Rust 1.70 or later | `bijective-gamut = { git = "https://github.com/bijective-systems-org/gamut", tag = "v2.2.0" }`, with `GAMUT_LIB_DIR` at a release's core |
152
+ | Rust 1.70 or later | `bijective-gamut = { git = "https://github.com/bijective-systems-org/gamut", tag = "v2.3.0" }`, with `GAMUT_LIB_DIR` at a release's core |
255
153
 
256
154
  In Python, install `bijective-gamut`, then `import gamut`; the PyPI project
257
155
  named `gamut` is a different package. [Installing](https://bijective-systems-org.github.io/gamut/install.html) has
@@ -262,3 +160,5 @@ agents a plain-text overview.
262
160
 
263
161
  [Apache 2.0](https://github.com/bijective-systems-org/gamut/blob/main/LICENSE). Made by [Bijective Systems](https://github.com/bijective-systems-org).
264
162
  If you use Gamut in published work, please cite it ([CITATION.cff](https://github.com/bijective-systems-org/gamut/blob/main/CITATION.cff)).
163
+
164
+ Gamut is developed in collaboration with AI coding agents (Claude Code and Codex).
@@ -0,0 +1,119 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/bijective-systems-org/gamut/main/docs/assets/logo-dark.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/bijective-systems-org/gamut/main/docs/assets/logo.svg">
5
+ <img src="https://raw.githubusercontent.com/bijective-systems-org/gamut/main/docs/assets/logo-any.svg" alt="Gamut" width="240">
6
+ </picture>
7
+ </p>
8
+
9
+ # Gamut: a file format for parametric studies and models, with definitions intact
10
+
11
+ By [Bijective Systems](https://github.com/bijective-systems-org), with
12
+ libraries for Python, MATLAB, Julia, C++, C and Rust.
13
+
14
+ **[Start here](https://bijective-systems-org.github.io/gamut/first-file.html)** ·
15
+ [Documentation](https://bijective-systems-org.github.io/gamut/) ·
16
+ [Specification](https://bijective-systems-org.github.io/gamut/reference/specification.html) ·
17
+ [PyPI: bijective-gamut](https://pypi.org/project/bijective-gamut/) ·
18
+ [Releases](https://github.com/bijective-systems-org/gamut/releases)
19
+
20
+ <p align="center">
21
+ <a href="https://github.com/bijective-systems-org/gamut/actions/workflows/ci.yml"><img src="https://github.com/bijective-systems-org/gamut/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
22
+ </p>
23
+
24
+ ---
25
+
26
+ Gamut is an open file format for exchanging engineering studies and models
27
+ with their definitions intact. Study files describe runs, parameters,
28
+ results, units and relationships, including fields on shared or varying
29
+ meshes. Those definitions travel with the data, so another person or tool
30
+ can inspect the study without reconstructing its meaning from filenames
31
+ and separate notes.
32
+
33
+ Libraries for Python, MATLAB, Julia, C++, C and Rust use one core to read
34
+ and write the format, so each reads what another wrote, value for value.
35
+ Model files hold their definitions and state as plain data, without
36
+ executable code. Declared inputs and outputs can be inspected without the
37
+ model implementation. Interpreting its state and evaluating the model
38
+ require an implementation of the recorded type in the consuming runtime.
39
+
40
+ <p align="center">
41
+ <picture>
42
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/bijective-systems-org/gamut/main/docs/assets/languages-dark.svg">
43
+ <img src="https://raw.githubusercontent.com/bijective-systems-org/gamut/main/docs/assets/languages.svg" alt="Python (with the command line), MATLAB, Julia, C++, C and Rust each read and write a .gamut file through the C interface of the one C++ core; Fortran is planned." width="760">
44
+ </picture>
45
+ </p>
46
+
47
+ ## First file
48
+
49
+ Install with `python -m pip install bijective-gamut`. This example
50
+ writes one input and one result for each of three runs.
51
+
52
+ ```python
53
+ import gamut
54
+
55
+ # Values at the same position belong to the same run.
56
+ alpha = [0.0, 2.0, 4.0]
57
+ cl = [0.0, 0.22, 0.44]
58
+
59
+ with gamut.create(
60
+ "first.gamut",
61
+ writer="example sweep",
62
+ parameters={"alpha": {"units": "degree", "role": "condition"}},
63
+ scalars={"cl": "1"},
64
+ ) as study:
65
+ study.add_runs({"alpha": alpha, "cl": cl})
66
+
67
+ with gamut.open("first.gamut") as study:
68
+ lift = study.get_scalar("cl")
69
+
70
+ print("cl:", " ".join(f"{value:.2f}" for value in lift))
71
+ ```
72
+
73
+ ```text
74
+ cl: 0.00 0.22 0.44
75
+ ```
76
+
77
+ [First file](https://bijective-systems-org.github.io/gamut/first-file.html)
78
+ shows how to inspect and validate the file and runs the same example in
79
+ MATLAB, Julia, C++ and Rust.
80
+
81
+ For a full study, see the
82
+ [capsule aeroheating dataset](https://huggingface.co/datasets/bijective/capsule-aeroheating).
83
+
84
+ ## Performance
85
+
86
+ <p align="center">
87
+ <img src="https://raw.githubusercontent.com/bijective-systems-org/gamut/main/docs/assets/bench-study.svg" alt="File size and read times of Exodus II, CGNS and PhysicsNeMo-Mesh relative to Gamut, for a triangulated capsule geometry family and an XFOIL airfoil sweep. Every format uses the same mesh within each dataset." width="760">
88
+ </p>
89
+
90
+ On the triangulated capsule family, Gamut and compressed Exodus occupy
91
+ about the same space, and Gamut is smaller and reads one run faster than
92
+ PhysicsNeMo-Mesh, which writes faster; on the smaller airfoil sweep,
93
+ PhysicsNeMo-Mesh reads faster and Gamut is smaller. PhysicsNeMo-Mesh needs
94
+ triangles, so every format here uses the capsule converted to triangles.
95
+ The [benchmarks](https://bijective-systems-org.github.io/gamut/benchmarks.html) give the full timings, settings
96
+ and machine, the original quadrilateral results, and the workloads where
97
+ another approach is faster.
98
+
99
+ ## Install
100
+
101
+ | Language | Install |
102
+ |---|---|
103
+ | Python 3.11 or later | `pip install bijective-gamut` |
104
+ | MATLAB R2023b or later | open `Gamut.mltbx` from the [latest release](https://github.com/bijective-systems-org/gamut/releases/latest) |
105
+ | Julia 1.10 or later | `Pkg.add(name="GamutFile", version="2.3.0")` |
106
+ | C++ and C | CMake build and install, then `find_package(gamut)`; include `gamut/gamut.hpp` (C++17) or `gamut/gamut.h` (C) |
107
+ | Rust 1.70 or later | `bijective-gamut = { git = "https://github.com/bijective-systems-org/gamut", tag = "v2.3.0" }`, with `GAMUT_LIB_DIR` at a release's core |
108
+
109
+ In Python, install `bijective-gamut`, then `import gamut`; the PyPI project
110
+ named `gamut` is a different package. [Installing](https://bijective-systems-org.github.io/gamut/install.html) has
111
+ the details for each language, and [llms.txt](https://raw.githubusercontent.com/bijective-systems-org/gamut/main/llms.txt) gives coding
112
+ agents a plain-text overview.
113
+
114
+ ## License
115
+
116
+ [Apache 2.0](https://github.com/bijective-systems-org/gamut/blob/main/LICENSE). Made by [Bijective Systems](https://github.com/bijective-systems-org).
117
+ If you use Gamut in published work, please cite it ([CITATION.cff](https://github.com/bijective-systems-org/gamut/blob/main/CITATION.cff)).
118
+
119
+ Gamut is developed in collaboration with AI coding agents (Claude Code and Codex).