cea 3.0.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 (210) hide show
  1. cea-3.0.0/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
  2. cea-3.0.0/.github/ISSUE_TEMPLATE/feature_request.md +16 -0
  3. cea-3.0.0/.github/pull_request_template.md +10 -0
  4. cea-3.0.0/.github/workflows/basic_build.yml +509 -0
  5. cea-3.0.0/.github/workflows/docs.yml +57 -0
  6. cea-3.0.0/.github/workflows/publish_wheels.yml +131 -0
  7. cea-3.0.0/.gitignore +40 -0
  8. cea-3.0.0/AGENTS.md +13 -0
  9. cea-3.0.0/CHANGELOG.md +49 -0
  10. cea-3.0.0/CLAUDE.md +133 -0
  11. cea-3.0.0/CMakeLists.txt +143 -0
  12. cea-3.0.0/CMakePresets.json +120 -0
  13. cea-3.0.0/CONTRIBUTING.md +293 -0
  14. cea-3.0.0/Doxyfile +2901 -0
  15. cea-3.0.0/LICENSE.txt +54 -0
  16. cea-3.0.0/Makefile +12 -0
  17. cea-3.0.0/NOTICE.txt +14 -0
  18. cea-3.0.0/PKG-INFO +189 -0
  19. cea-3.0.0/README.md +177 -0
  20. cea-3.0.0/cmake/CompilerFlags.cmake +23 -0
  21. cea-3.0.0/cmake/FindCython.cmake +82 -0
  22. cea-3.0.0/cmake/FindNumPy.cmake +112 -0
  23. cea-3.0.0/cmake/FindPythonExtensions.cmake +613 -0
  24. cea-3.0.0/cmake/UseCython.cmake +405 -0
  25. cea-3.0.0/cmake/UsePythonExtensions.cmake +313 -0
  26. cea-3.0.0/cmake/cea_utilities.cmake +45 -0
  27. cea-3.0.0/cmake/targetLinkLibrariesWithDynamicLookup.cmake +581 -0
  28. cea-3.0.0/data/thermo.inp +15802 -0
  29. cea-3.0.0/data/trans.inp +488 -0
  30. cea-3.0.0/docs/Makefile +20 -0
  31. cea-3.0.0/docs/README.md +7 -0
  32. cea-3.0.0/docs/logo-bw.tex +30 -0
  33. cea-3.0.0/docs/logo.tex +43 -0
  34. cea-3.0.0/docs/source/Win11-oneAPI_Walkthrough.rst +176 -0
  35. cea-3.0.0/docs/source/conf.py +184 -0
  36. cea-3.0.0/docs/source/developer_guide.rst +240 -0
  37. cea-3.0.0/docs/source/example_index.rst +90 -0
  38. cea-3.0.0/docs/source/examples/deton/example6.rst +548 -0
  39. cea-3.0.0/docs/source/examples/deton_examples.rst +9 -0
  40. cea-3.0.0/docs/source/examples/equilibrium/example1.rst +320 -0
  41. cea-3.0.0/docs/source/examples/equilibrium/example14.rst +241 -0
  42. cea-3.0.0/docs/source/examples/equilibrium/example2.rst +395 -0
  43. cea-3.0.0/docs/source/examples/equilibrium/example3.rst +355 -0
  44. cea-3.0.0/docs/source/examples/equilibrium/example4.rst +312 -0
  45. cea-3.0.0/docs/source/examples/equilibrium_examples.rst +13 -0
  46. cea-3.0.0/docs/source/examples/mixture_thermo.rst +113 -0
  47. cea-3.0.0/docs/source/examples/python_examples.rst +11 -0
  48. cea-3.0.0/docs/source/examples/rocket/example10.rst +369 -0
  49. cea-3.0.0/docs/source/examples/rocket/example11.rst +397 -0
  50. cea-3.0.0/docs/source/examples/rocket/example12.rst +311 -0
  51. cea-3.0.0/docs/source/examples/rocket/example13.rst +337 -0
  52. cea-3.0.0/docs/source/examples/rocket/example8.rst +321 -0
  53. cea-3.0.0/docs/source/examples/rocket/example9.rst +370 -0
  54. cea-3.0.0/docs/source/examples/rocket_examples.rst +14 -0
  55. cea-3.0.0/docs/source/examples/sample_plots.rst +107 -0
  56. cea-3.0.0/docs/source/examples/shock/example7.rst +668 -0
  57. cea-3.0.0/docs/source/examples/shock_examples.rst +9 -0
  58. cea-3.0.0/docs/source/faq.rst +57 -0
  59. cea-3.0.0/docs/source/images/logo.png +0 -0
  60. cea-3.0.0/docs/source/index.rst +60 -0
  61. cea-3.0.0/docs/source/installation.rst +207 -0
  62. cea-3.0.0/docs/source/interface_index.rst +40 -0
  63. cea-3.0.0/docs/source/interfaces/c_api.rst +18 -0
  64. cea-3.0.0/docs/source/interfaces/fortran_api.rst +67 -0
  65. cea-3.0.0/docs/source/interfaces/legacy_interface.rst +17 -0
  66. cea-3.0.0/docs/source/interfaces/python_api.rst +62 -0
  67. cea-3.0.0/docs/source/quick_start.rst +119 -0
  68. cea-3.0.0/docs/source/ref_list.rst +17 -0
  69. cea-3.0.0/docs/source/theory.rst +178 -0
  70. cea-3.0.0/environment.yml +14 -0
  71. cea-3.0.0/extern/fbasics/.gitignore +1 -0
  72. cea-3.0.0/extern/fbasics/CMakeLists.txt +65 -0
  73. cea-3.0.0/extern/fbasics/CMakePresets.json +38 -0
  74. cea-3.0.0/extern/fbasics/source/CMakeLists.txt +50 -0
  75. cea-3.0.0/extern/fbasics/source/algorithms.f90 +611 -0
  76. cea-3.0.0/extern/fbasics/source/algorithms_test.pf +196 -0
  77. cea-3.0.0/extern/fbasics/source/c_binding.f90 +38 -0
  78. cea-3.0.0/extern/fbasics/source/c_binding_test.pf +27 -0
  79. cea-3.0.0/extern/fbasics/source/findloc.f90 +44 -0
  80. cea-3.0.0/extern/fbasics/source/geometry.f90 +93 -0
  81. cea-3.0.0/extern/fbasics/source/geometry_test.pf +45 -0
  82. cea-3.0.0/extern/fbasics/source/logging.f90 +91 -0
  83. cea-3.0.0/extern/fbasics/source/math.f90 +57 -0
  84. cea-3.0.0/extern/fbasics/source/math_test.pf +81 -0
  85. cea-3.0.0/extern/fbasics/source/parameters.f90.in +34 -0
  86. cea-3.0.0/extern/fbasics/source/string_scanner.f90 +242 -0
  87. cea-3.0.0/extern/fbasics/source/string_scanner_test.pf +78 -0
  88. cea-3.0.0/extern/fbasics/source/timing.f90 +58 -0
  89. cea-3.0.0/extern/fbasics/source/timing_test.pf +41 -0
  90. cea-3.0.0/extern/fbasics/source/utils.f90 +538 -0
  91. cea-3.0.0/extern/fbasics/source/utils_test.pf +231 -0
  92. cea-3.0.0/extern/fbasics/test/utils/read_only_file.txt +0 -0
  93. cea-3.0.0/extern/fbasics/test/utils/read_write_file.txt +0 -0
  94. cea-3.0.0/project.md +21 -0
  95. cea-3.0.0/pyproject.toml +42 -0
  96. cea-3.0.0/pytest.ini +3 -0
  97. cea-3.0.0/samples/example1.inp +25 -0
  98. cea-3.0.0/samples/rp1311_examples.inp +392 -0
  99. cea-3.0.0/scripts/develop.sh +129 -0
  100. cea-3.0.0/source/CMakeLists.txt +107 -0
  101. cea-3.0.0/source/atomic_data.f90 +213 -0
  102. cea-3.0.0/source/bind/CMakeLists.txt +130 -0
  103. cea-3.0.0/source/bind/README.md +14 -0
  104. cea-3.0.0/source/bind/c/CMakeLists.txt +92 -0
  105. cea-3.0.0/source/bind/c/README.md +14 -0
  106. cea-3.0.0/source/bind/c/bindc.F90 +3837 -0
  107. cea-3.0.0/source/bind/c/cea.h +688 -0
  108. cea-3.0.0/source/bind/c/cea_enum.h +161 -0
  109. cea-3.0.0/source/bind/c/samples/rp1311_example1.c +125 -0
  110. cea-3.0.0/source/bind/c/samples/rp1311_example2.c +125 -0
  111. cea-3.0.0/source/bind/c/samples/rp1311_example3.c +99 -0
  112. cea-3.0.0/source/bind/c/samples/rp1311_example6.c +95 -0
  113. cea-3.0.0/source/bind/c/samples/rp1311_example7.c +104 -0
  114. cea-3.0.0/source/bind/c/samples/rp1311_example8.c +127 -0
  115. cea-3.0.0/source/bind/c/samples/rp1311_example9.c +169 -0
  116. cea-3.0.0/source/bind/excel/README.md +3 -0
  117. cea-3.0.0/source/bind/libcea.pyx +1 -0
  118. cea-3.0.0/source/bind/matlab/README.md +10 -0
  119. cea-3.0.0/source/bind/matlab/ceam.pyx +135 -0
  120. cea-3.0.0/source/bind/matlab/samples/example1.m +82 -0
  121. cea-3.0.0/source/bind/python/CEA.pyx +4377 -0
  122. cea-3.0.0/source/bind/python/README.md +12 -0
  123. cea-3.0.0/source/bind/python/cea/__init__.py +37 -0
  124. cea-3.0.0/source/bind/python/cea/constants.py +9 -0
  125. cea-3.0.0/source/bind/python/cea/lib/__init__.py +0 -0
  126. cea-3.0.0/source/bind/python/cea/lib/data/__init__.py +0 -0
  127. cea-3.0.0/source/bind/python/cea/samples/ceam_example1.py +173 -0
  128. cea-3.0.0/source/bind/python/cea/samples/example1.py +229 -0
  129. cea-3.0.0/source/bind/python/cea/samples/example10.py +280 -0
  130. cea-3.0.0/source/bind/python/cea/samples/example11.py +298 -0
  131. cea-3.0.0/source/bind/python/cea/samples/example12.py +214 -0
  132. cea-3.0.0/source/bind/python/cea/samples/example13.py +216 -0
  133. cea-3.0.0/source/bind/python/cea/samples/example14.py +174 -0
  134. cea-3.0.0/source/bind/python/cea/samples/example2.py +288 -0
  135. cea-3.0.0/source/bind/python/cea/samples/example3.py +233 -0
  136. cea-3.0.0/source/bind/python/cea/samples/example4.py +225 -0
  137. cea-3.0.0/source/bind/python/cea/samples/example5.py +0 -0
  138. cea-3.0.0/source/bind/python/cea/samples/example6.py +427 -0
  139. cea-3.0.0/source/bind/python/cea/samples/example7.py +538 -0
  140. cea-3.0.0/source/bind/python/cea/samples/example8.py +234 -0
  141. cea-3.0.0/source/bind/python/cea/samples/example9.py +281 -0
  142. cea-3.0.0/source/bind/python/cea/samples/h2_o2.py +112 -0
  143. cea-3.0.0/source/bind/python/cea/samples/inert_reactants.py +37 -0
  144. cea-3.0.0/source/bind/python/cea/samples/mixture_thermo.py +66 -0
  145. cea-3.0.0/source/bind/python/cea/samples/negative_reactants.py +37 -0
  146. cea-3.0.0/source/bind/python/cea/samples/sample_plots.py +231 -0
  147. cea-3.0.0/source/bind/python/cea/units/__init__.py +181 -0
  148. cea-3.0.0/source/bind/python/cea_def.pxd +392 -0
  149. cea-3.0.0/source/bind/python/tests/conftest.py +20 -0
  150. cea-3.0.0/source/bind/python/tests/test_init.py +15 -0
  151. cea-3.0.0/source/bind/python/tests/test_mixture.py +34 -0
  152. cea-3.0.0/source/bind/python/tests/test_rocket_smoke.py +59 -0
  153. cea-3.0.0/source/bind/python/tests/test_strings.py +20 -0
  154. cea-3.0.0/source/bind/python/tests/test_validation.py +34 -0
  155. cea-3.0.0/source/cea.f90 +18 -0
  156. cea-3.0.0/source/database_compile.f90 +386 -0
  157. cea-3.0.0/source/detonation.f90 +311 -0
  158. cea-3.0.0/source/detonation_test.pf +72 -0
  159. cea-3.0.0/source/equilibrium.f90 +3683 -0
  160. cea-3.0.0/source/equilibrium_test.pf +744 -0
  161. cea-3.0.0/source/fits.f90 +117 -0
  162. cea-3.0.0/source/fits_test.pf +50 -0
  163. cea-3.0.0/source/input.f90 +839 -0
  164. cea-3.0.0/source/input_test.pf +121 -0
  165. cea-3.0.0/source/main.f90 +2871 -0
  166. cea-3.0.0/source/mixture.f90 +1272 -0
  167. cea-3.0.0/source/mixture_test.pf +308 -0
  168. cea-3.0.0/source/param.f90.in +70 -0
  169. cea-3.0.0/source/rocket.f90 +1474 -0
  170. cea-3.0.0/source/rocket_test.pf +512 -0
  171. cea-3.0.0/source/shock.f90 +881 -0
  172. cea-3.0.0/source/shock_test.pf +107 -0
  173. cea-3.0.0/source/thermo.f90 +692 -0
  174. cea-3.0.0/source/thermo_test.pf +163 -0
  175. cea-3.0.0/source/transport.f90 +371 -0
  176. cea-3.0.0/source/transport_test.pf +137 -0
  177. cea-3.0.0/source/units.f90 +155 -0
  178. cea-3.0.0/test/main_interface/__init__.py +0 -0
  179. cea-3.0.0/test/main_interface/example1.inp +25 -0
  180. cea-3.0.0/test/main_interface/example10.inp +14 -0
  181. cea-3.0.0/test/main_interface/example11.inp +19 -0
  182. cea-3.0.0/test/main_interface/example12.inp +23 -0
  183. cea-3.0.0/test/main_interface/example13.inp +23 -0
  184. cea-3.0.0/test/main_interface/example14.inp +22 -0
  185. cea-3.0.0/test/main_interface/example2.inp +19 -0
  186. cea-3.0.0/test/main_interface/example3.inp +44 -0
  187. cea-3.0.0/test/main_interface/example4.inp +44 -0
  188. cea-3.0.0/test/main_interface/example5.inp +54 -0
  189. cea-3.0.0/test/main_interface/example6.inp +16 -0
  190. cea-3.0.0/test/main_interface/example7.inp +26 -0
  191. cea-3.0.0/test/main_interface/example8.inp +19 -0
  192. cea-3.0.0/test/main_interface/example9.inp +12 -0
  193. cea-3.0.0/test/main_interface/parse_output.py +374 -0
  194. cea-3.0.0/test/main_interface/reference_output/example1.out +241 -0
  195. cea-3.0.0/test/main_interface/reference_output/example10.out +155 -0
  196. cea-3.0.0/test/main_interface/reference_output/example11.out +194 -0
  197. cea-3.0.0/test/main_interface/reference_output/example12.out +412 -0
  198. cea-3.0.0/test/main_interface/reference_output/example13.out +238 -0
  199. cea-3.0.0/test/main_interface/reference_output/example14.out +133 -0
  200. cea-3.0.0/test/main_interface/reference_output/example2.out +198 -0
  201. cea-3.0.0/test/main_interface/reference_output/example3.out +229 -0
  202. cea-3.0.0/test/main_interface/reference_output/example4.out +225 -0
  203. cea-3.0.0/test/main_interface/reference_output/example5.out +322 -0
  204. cea-3.0.0/test/main_interface/reference_output/example6.out +189 -0
  205. cea-3.0.0/test/main_interface/reference_output/example7.out +205 -0
  206. cea-3.0.0/test/main_interface/reference_output/example8.out +229 -0
  207. cea-3.0.0/test/main_interface/reference_output/example9.out +235 -0
  208. cea-3.0.0/test/main_interface/test_main.py +376 -0
  209. cea-3.0.0/test/main_interface/test_output/__init__.py +0 -0
  210. cea-3.0.0/test/main_interface/test_output/get_output.py +59 -0
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a problem to help us improve
4
+ title: "[bug]"
5
+ labels: bug
6
+ assignees: markleader
7
+ ---
8
+
9
+ **Summary**
10
+ A clear, concise description of the bug.
11
+
12
+ **Reproduction**
13
+ - Interface: [Fortran | C | Python | legacy]
14
+ - Minimal input / steps (attach .inp if relevant):
15
+ - Command or API call used:
16
+
17
+ **Expected behavior**
18
+ What you expected to happen.
19
+
20
+ **Actual behavior**
21
+ What happened (include key error messages/output).
22
+
23
+ **Environment**
24
+ - OS:
25
+ - CEA version/commit:
26
+ - Compiler or Python version (if relevant):
27
+
28
+ **Additional context**
29
+ Anything else helpful (optional).
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an improvement
4
+ title: "[feature]"
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ **Problem / use case**
10
+ What’s hard or missing today?
11
+
12
+ **Proposed solution**
13
+ What would you like to see?
14
+
15
+ **Additional context**
16
+ Examples, references, or alternatives (optional).
@@ -0,0 +1,10 @@
1
+ ## Summary
2
+
3
+ ## Changes
4
+
5
+ ## Testing
6
+ - Not run (explain why)
7
+
8
+ ## Compatibility / Numerical behavior
9
+ - [ ] No expected changes to numerical results
10
+ - [ ] Expected changes (explain and provide validation)
@@ -0,0 +1,509 @@
1
+ name: Basic Build
2
+ run-name: "[${{ github.actor }}]: ${{ github.event_name }} to ${{ github.ref_name }}"
3
+ on:
4
+ push:
5
+ pull_request:
6
+ workflow_dispatch:
7
+ jobs:
8
+ build:
9
+ name: Build (${{ matrix.label }})
10
+ runs-on: ${{ matrix.runs_on }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ include:
15
+ - label: linux-x86_64-gfortran
16
+ runs_on: ubuntu-22.04
17
+ compiler: gcc
18
+ fc: gfortran
19
+ - label: linux-aarch64-gfortran
20
+ runs_on: ubuntu-22.04-arm
21
+ compiler: gcc
22
+ fc: gfortran
23
+ - label: macos-x86_64-gfortran
24
+ runs_on: macos-15-intel
25
+ compiler: gcc
26
+ fc: gfortran-14
27
+ - label: macos-arm64-gfortran
28
+ runs_on: macos-14
29
+ compiler: gcc
30
+ fc: gfortran-14
31
+ - label: windows-amd64-ifx
32
+ runs_on: windows-2022
33
+ compiler: intel
34
+ version: "2025.2"
35
+ fc: ifx
36
+ - label: windows-amd64-ifort
37
+ runs_on: windows-2022
38
+ compiler: intel-classic
39
+ version: "2021.10"
40
+ fc: ifort
41
+ - label: windows-amd64-gfortran
42
+ runs_on: windows-2022
43
+ compiler: gcc
44
+ fc: gfortran
45
+ defaults:
46
+ run:
47
+ shell: bash
48
+ steps:
49
+ - name: Check out CEA
50
+ uses: actions/checkout@v4
51
+
52
+ - name: Set up Python
53
+ uses: actions/setup-python@v5
54
+ with:
55
+ python-version: "3.12"
56
+
57
+ - name: Set up GNU Fortran compiler (Linux)
58
+ if: runner.os == 'Linux' && matrix.compiler == 'gcc'
59
+ run: |
60
+ sudo apt-get update
61
+ sudo apt-get install -y gcc g++ gfortran
62
+
63
+ - name: Set up Fortran compiler (macOS)
64
+ if: runner.os == 'macOS' && matrix.compiler == 'gcc'
65
+ run: |
66
+ brew update
67
+ brew install gcc@14
68
+
69
+ - name: Set up Intel oneAPI compiler (Windows)
70
+ if: runner.os == 'Windows' && (matrix.compiler == 'intel' || matrix.compiler == 'intel-classic')
71
+ uses: fortran-lang/setup-fortran@v1
72
+ with:
73
+ compiler: ${{ matrix.compiler }}
74
+ version: ${{ matrix.version }}
75
+
76
+ - name: Resolve Intel compiler path
77
+ if: runner.os == 'Windows' && (matrix.compiler == 'intel' || matrix.compiler == 'intel-classic')
78
+ shell: pwsh
79
+ run: |
80
+ $compiler = "${{ matrix.fc }}"
81
+ $resolved = $null
82
+ $cmd = Get-Command $compiler -ErrorAction SilentlyContinue
83
+ if ($cmd) {
84
+ $resolved = $cmd.Source
85
+ } else {
86
+ $candidates = Get-ChildItem -Path "C:\Program Files (x86)\Intel\oneAPI\compiler" -Filter "$compiler.exe" -Recurse -ErrorAction SilentlyContinue | Sort-Object FullName -Descending
87
+ if ($candidates.Count -gt 0) {
88
+ $resolved = $candidates[0].FullName
89
+ }
90
+ }
91
+ if (-not $resolved) {
92
+ Write-Error "Unable to find $compiler.exe in PATH or oneAPI install path."
93
+ exit 1
94
+ }
95
+ "FC=$resolved" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
96
+ [System.IO.Path]::GetDirectoryName($resolved) | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
97
+
98
+ - name: Set up MSYS2 (Windows gfortran)
99
+ if: runner.os == 'Windows' && matrix.compiler == 'gcc'
100
+ uses: msys2/setup-msys2@v2
101
+ with:
102
+ update: true
103
+ install: >-
104
+ mingw-w64-ucrt-x86_64-gcc-fortran
105
+ mingw-w64-ucrt-x86_64-cmake
106
+ mingw-w64-ucrt-x86_64-ninja
107
+
108
+ - name: Export MinGW gfortran path
109
+ if: runner.os == 'Windows' && matrix.compiler == 'gcc'
110
+ run: |
111
+ echo "C:/msys64/ucrt64/bin" >> "$GITHUB_PATH"
112
+
113
+ - name: Remove MinGW/MSYS paths for Intel Windows builds
114
+ if: runner.os == 'Windows' && (matrix.compiler == 'intel' || matrix.compiler == 'intel-classic')
115
+ shell: pwsh
116
+ run: |
117
+ $parts = $env:PATH -split ';'
118
+ $clean = $parts | Where-Object { $_ -and ($_ -notmatch 'mingw') -and ($_ -notmatch 'msys') -and ($_ -notmatch 'strawberry') }
119
+ "PATH=$($clean -join ';')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
120
+
121
+ - name: Install build tools
122
+ run: |
123
+ python -m pip install --upgrade pip
124
+ python -m pip install ninja setuptools numpy cython
125
+
126
+ - name: Record toolchain info
127
+ run: |
128
+ git --version
129
+ cmake --version
130
+ ninja --version
131
+ if command -v gfortran &> /dev/null; then gfortran --version; fi
132
+ if [ -n "${FC}" ]; then
133
+ FC_BASENAME="$(basename "${FC}")"
134
+ case "${FC_BASENAME}" in
135
+ ifort|ifort.exe|ifx|ifx.exe)
136
+ "${FC}" /help > /dev/null || true
137
+ ;;
138
+ *)
139
+ "${FC}" --version || true
140
+ ;;
141
+ esac
142
+ fi
143
+
144
+ - name: Configure (Non-Intel Windows)
145
+ if: runner.os != 'Windows' || matrix.compiler == 'gcc'
146
+ run: |
147
+ FC_COMPILER="${FC:-${{ matrix.fc }}}"
148
+ cmake -S . -B build -G Ninja \
149
+ -DCMAKE_Fortran_COMPILER="${FC_COMPILER}" \
150
+ -DCMAKE_BUILD_TYPE=Release \
151
+ -DCEA_BUILD_TESTING=OFF \
152
+ -DCEA_ENABLE_BIND_C=ON \
153
+ -DCEA_ENABLE_BIND_CXX=OFF \
154
+ -DCEA_ENABLE_BIND_PYTHON=OFF \
155
+ -DCEA_ENABLE_BIND_MATLAB=OFF \
156
+ -DCEA_ENABLE_BIND_EXCEL=OFF
157
+
158
+ - name: Configure (Windows Intel)
159
+ if: runner.os == 'Windows' && (matrix.compiler == 'intel' || matrix.compiler == 'intel-classic')
160
+ shell: cmd
161
+ run: |
162
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 >nul
163
+ cmake -S . -B build -G Ninja ^
164
+ -DCMAKE_Fortran_COMPILER="%FC%" ^
165
+ -DCMAKE_BUILD_TYPE=Release ^
166
+ -DCEA_BUILD_TESTING=OFF ^
167
+ -DCEA_ENABLE_BIND_C=ON ^
168
+ -DCEA_ENABLE_BIND_CXX=OFF ^
169
+ -DCEA_ENABLE_BIND_PYTHON=OFF ^
170
+ -DCEA_ENABLE_BIND_MATLAB=OFF ^
171
+ -DCEA_ENABLE_BIND_EXCEL=OFF
172
+
173
+ - name: Build (Non-Intel Windows)
174
+ if: runner.os != 'Windows' || matrix.compiler == 'gcc'
175
+ run: |
176
+ cmake --build build
177
+
178
+ - name: Build (Windows Intel)
179
+ if: runner.os == 'Windows' && (matrix.compiler == 'intel' || matrix.compiler == 'intel-classic')
180
+ shell: cmd
181
+ run: |
182
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 >nul
183
+ cmake --build build
184
+
185
+ - name: Run smoke test (Unix)
186
+ if: runner.os != 'Windows'
187
+ run: |
188
+ ./build/source/cea -h
189
+
190
+ - name: Run smoke test (Windows)
191
+ if: runner.os == 'Windows' && matrix.compiler == 'gcc'
192
+ run: |
193
+ ./build/source/cea.exe -h
194
+
195
+ - name: Run smoke test (Windows Intel)
196
+ if: runner.os == 'Windows' && (matrix.compiler == 'intel' || matrix.compiler == 'intel-classic')
197
+ shell: cmd
198
+ run: |
199
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 >nul
200
+ .\build\source\cea.exe -h
201
+
202
+ - name: Verify C ABI library output (Unix)
203
+ if: runner.os != 'Windows'
204
+ run: |
205
+ ls -la build/source/bind/c
206
+ ls -la build/source/bind/c/libcea_bindc.* || ls -la build/source/bind/c/cea_bindc.*
207
+
208
+ - name: Verify C ABI library output (Windows)
209
+ if: runner.os == 'Windows'
210
+ run: |
211
+ ls -la build/source/bind/c
212
+ ls -la build/source/bind/c/*cea_bindc*
213
+
214
+ - name: Upload CLI executable artifact
215
+ uses: actions/upload-artifact@v4
216
+ with:
217
+ name: cea-cli-${{ matrix.label }}
218
+ if-no-files-found: error
219
+ path: |
220
+ build/source/cea
221
+ build/source/cea.exe
222
+ build/thermo.lib
223
+ build/trans.lib
224
+
225
+ - name: Upload C ABI library artifact
226
+ uses: actions/upload-artifact@v4
227
+ with:
228
+ name: cea-bindc-${{ matrix.label }}
229
+ if-no-files-found: error
230
+ path: |
231
+ source/bind/c/cea.h
232
+ source/bind/c/cea_enum.h
233
+ build/source/bind/c/libcea_bindc.so
234
+ build/source/bind/c/libcea_bindc.dylib
235
+ build/source/bind/c/cea_bindc.dll
236
+ build/source/bind/c/cea_bindc.lib
237
+ build/source/bind/c/libcea_bindc.dll.a
238
+
239
+ pfunit-tests:
240
+ name: pFUnit (ubuntu-22.04 / gcc 11)
241
+ runs-on: ubuntu-22.04
242
+ steps:
243
+ - name: Check out CEA
244
+ uses: actions/checkout@v4
245
+
246
+ - name: Set up Python
247
+ uses: actions/setup-python@v5
248
+ with:
249
+ python-version: "3.12"
250
+
251
+ - name: Set up Fortran compiler
252
+ uses: fortran-lang/setup-fortran@v1
253
+ with:
254
+ compiler: gcc
255
+ version: "11"
256
+
257
+ - name: Install build tools
258
+ run: |
259
+ python -m pip install --upgrade pip
260
+ python -m pip install ninja setuptools numpy cython
261
+
262
+ - name: Build CEA + GFE (pFUnit)
263
+ run: |
264
+ scripts/develop.sh -G Ninja
265
+
266
+ - name: Rebuild data libraries (compiler-native)
267
+ run: |
268
+ pushd data
269
+ ../build-dev/source/cea --compile-thermo thermo.inp
270
+ ../build-dev/source/cea --compile-trans trans.inp
271
+ popd
272
+
273
+ - name: Run pFUnit tests
274
+ env:
275
+ GFORTRAN_ERROR_BACKTRACE: "1"
276
+ GFORTRAN_UNBUFFERED_ALL: "1"
277
+ run: |
278
+ ulimit -c unlimited
279
+ ctest --output-on-failure --test-dir build-dev -V
280
+
281
+ python-tests:
282
+ name: Python (ubuntu-22.04 / gcc 11)
283
+ runs-on: ubuntu-22.04
284
+ steps:
285
+ - name: Check out CEA
286
+ uses: actions/checkout@v4
287
+
288
+ - name: Set up Python
289
+ uses: actions/setup-python@v5
290
+ with:
291
+ python-version: "3.12"
292
+
293
+ - name: Set up Fortran compiler
294
+ uses: fortran-lang/setup-fortran@v1
295
+ with:
296
+ compiler: gcc
297
+ version: "11"
298
+
299
+ - name: Install build tools
300
+ run: |
301
+ python -m pip install --upgrade pip
302
+ python -m pip install ninja pytest setuptools numpy cython
303
+
304
+ - name: Install CEA (editable)
305
+ run: |
306
+ python -m pip install -e .
307
+
308
+ - name: Import extension (no init)
309
+ env:
310
+ CEA_SKIP_INIT: "1"
311
+ run: |
312
+ python - <<'PY'
313
+ import cea
314
+ import cea.lib.libcea
315
+ print("cea import ok")
316
+ PY
317
+
318
+ - name: Run pytest
319
+ env:
320
+ CEA_DATA_DIR: ${{ github.workspace }}/data
321
+ run: |
322
+ pytest source/bind/python/tests
323
+
324
+ release-artifacts:
325
+ name: Release CLI + C ABI Artifacts
326
+ needs: build
327
+ runs-on: ubuntu-22.04
328
+ if: startsWith(github.ref, 'refs/tags/v')
329
+ permissions:
330
+ contents: write
331
+ steps:
332
+ - name: Download build artifacts
333
+ uses: actions/download-artifact@v4
334
+ with:
335
+ path: release-dist
336
+ merge-multiple: false
337
+
338
+ - name: Generate SHA256 checksums
339
+ run: |
340
+ cd release-dist
341
+ find . -type f -print0 | sort -z | xargs -0 sha256sum > SHA256SUMS.txt
342
+ cat SHA256SUMS.txt
343
+
344
+ - name: Publish GitHub release assets
345
+ uses: softprops/action-gh-release@v2
346
+ with:
347
+ files: release-dist/**
348
+ generate_release_notes: true
349
+
350
+ bindc:
351
+ name: Build (${{ matrix.os }} / ${{ matrix.toolchain.ccompiler }} / ${{matrix.toolchain.fcompiler}})
352
+ runs-on: ${{ matrix.os }}
353
+ strategy:
354
+ fail-fast: false
355
+ matrix:
356
+ os: [ubuntu-22.04, macos-latest, windows-latest]
357
+ toolchain:
358
+ - ccompiler: gcc
359
+ cversion: "11"
360
+ fcompiler: gcc
361
+ fversion: "11"
362
+ include:
363
+ - os: ubuntu-22.04
364
+ toolchain:
365
+ ccompiler: gcc
366
+ cversion: "13"
367
+ fcompiler: gcc
368
+ fversion: "13"
369
+ - os: ubuntu-22.04
370
+ toolchain:
371
+ ccompiler: intel
372
+ cversion: "2023.1"
373
+ fcompiler: intel
374
+ fversion: "2023.1"
375
+ - os: ubuntu-22.04
376
+ toolchain:
377
+ ccompiler: intel-classic
378
+ cversion: "2021.9"
379
+ fcompiler: intel-classic
380
+ fversion: "2021.9"
381
+ - os: windows-latest
382
+ toolchain:
383
+ ccompiler: msvc
384
+ cversion: latest
385
+ fcompiler: intel
386
+ fversion: "2025.2"
387
+ - os: windows-latest
388
+ toolchain:
389
+ ccompiler: intel
390
+ cversion: "2025.2"
391
+ fcompiler: intel
392
+ fversion: "2025.2"
393
+ defaults:
394
+ run:
395
+ shell: bash
396
+ steps:
397
+ - name: Check out CEA
398
+ uses: actions/checkout@v6
399
+
400
+ - name: Check out GFE
401
+ if: ${{ runner.os != 'Windows' }}
402
+ uses: actions/checkout@v6
403
+ with:
404
+ repository: Goddard-Fortran-Ecosystem/GFE
405
+ path: extern/gfe
406
+ submodules: true
407
+
408
+ - name: Set up Fortran compiler
409
+ if: ${{ runner.os != 'Windows' || matrix.toolchain.fcompiler != 'gcc' }}
410
+ uses: fortran-lang/setup-fortran@v1
411
+ with:
412
+ compiler: ${{ matrix.toolchain.fcompiler }}
413
+ version: ${{ matrix.toolchain.fversion }}
414
+
415
+ - name: Set up Fortran compiler (Windows, gfortran)
416
+ if: ${{ runner.os == 'Windows' && matrix.toolchain.fcompiler == 'gcc' }}
417
+ run: |
418
+ # Use pre-installed MinGW on Windows runners to avoid Chocolatey issues
419
+ # GitHub Actions windows-latest runners include MinGW in C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
420
+ $mingwPath = "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin"
421
+ if (Test-Path $mingwPath) {
422
+ echo "$mingwPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
423
+ echo "FC=$mingwPath\gfortran.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
424
+ } else {
425
+ # Fallback: search for gfortran in common locations
426
+ $gfortran = Get-Command gfortran -ErrorAction SilentlyContinue
427
+ if ($gfortran) {
428
+ echo "FC=$($gfortran.Source)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
429
+ } else {
430
+ Write-Error "gfortran not found on Windows runner"
431
+ exit 1
432
+ }
433
+ }
434
+ shell: pwsh
435
+
436
+ - name: Set up C Compiler
437
+ if: ${{matrix.toolchain.ccompiler == 'msvc'}}
438
+ uses: ilammy/msvc-dev-cmd@v1
439
+
440
+ - name: Install build tools
441
+ run: |
442
+ python -m pip install --upgrade pip
443
+ python -m pip install ninja setuptools numpy cython
444
+
445
+ - name: Record toolchain info
446
+ run: |
447
+ git --version
448
+ cmake --version
449
+ ninja --version
450
+ if command -v gfortran &> /dev/null; then gfortran --version; fi
451
+ if [ -n "${FC}" ]; then "${FC}" --version; fi
452
+
453
+ - name: Configure and Build GFE
454
+ if: ${{ runner.os != 'Windows' }}
455
+ run: |
456
+ cmake -S extern/gfe -B build/extern/gfe -GNinja \
457
+ -DCMAKE_INSTALL_PREFIX=build/install \
458
+ -DCMAKE_BUILD_TYPE=Release \
459
+ -DSKIP_MPI=YES \
460
+ -DSKIP_OPENMP=YES \
461
+ -DSKIP_FHAMCREST=YES \
462
+ -DSKIP_ESMF=YES \
463
+ -DSKIP_ROBUST=YES
464
+ cmake --build build/extern/gfe --target install
465
+
466
+ - name: Configure (linux)
467
+ if: ${{runner.os != 'Windows' || matrix.toolchain.ccompiler != 'msvc'}}
468
+ run: |
469
+ cmake -S . -B build -G Ninja \
470
+ -DCMAKE_PREFIX_PATH=build/install \
471
+ -DCMAKE_BUILD_TYPE=Debug \
472
+ -DCEA_BUILD_TESTING=ON \
473
+ -DCEA_ENABLE_BIND_C=ON \
474
+ -DCEA_ENABLE_BIND_CXX=OFF \
475
+ -DCEA_ENABLE_BIND_PYTHON=OFF \
476
+ -DCEA_ENABLE_BIND_MATLAB=OFF \
477
+ -DCEA_ENABLE_BIND_EXCEL=OFF \
478
+ -DCMAKE_Fortran_FLAGS="-ffree-line-length-none"
479
+
480
+ - name: Configure (msvc)
481
+ if: ${{runner.os == 'Windows' && matrix.toolchain.ccompiler == 'msvc'}}
482
+ run: |
483
+ cmake -S . -B build -G Ninja \
484
+ -DCMAKE_BUILD_TYPE=Release \
485
+ -DCEA_BUILD_TESTING=ON \
486
+ -DCEA_ENABLE_BIND_C=ON \
487
+ -DCEA_ENABLE_BIND_CXX=OFF \
488
+ -DCEA_ENABLE_BIND_PYTHON=OFF \
489
+ -DCEA_ENABLE_BIND_MATLAB=OFF \
490
+ -DCEA_ENABLE_BIND_EXCEL=OFF \
491
+ -DCMAKE_C_COMPILER=cl \
492
+ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
493
+
494
+ - name: Build
495
+ run: |
496
+ cmake --build build
497
+
498
+ - name: Run smoke test (Unix)
499
+ if: runner.os != 'Windows'
500
+ run: |
501
+ ./build/source/cea -h
502
+
503
+ - name: Run smoke test (Windows)
504
+ if: runner.os == 'Windows'
505
+ run: |
506
+ ./build/source/cea.exe -h
507
+
508
+ - name: Run ctest
509
+ run: ctest --test-dir build --output-on-failure
@@ -0,0 +1,57 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-22.04
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.12"
21
+
22
+ - name: Install system deps
23
+ run: |
24
+ sudo apt-get update
25
+ sudo apt-get install -y gfortran cmake ninja-build doxygen
26
+
27
+ - name: Install Python deps
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ python -m pip install -e .
31
+ python -m pip install sphinx breathe
32
+
33
+ # Optional: regenerate Doxygen XML
34
+ - name: Build Doxygen XML
35
+ run: doxygen Doxyfile
36
+
37
+ - name: Build Sphinx HTML
38
+ env:
39
+ CEA_SKIP_INIT: "1"
40
+ run: |
41
+ cd docs
42
+ make html
43
+
44
+ - name: Upload Pages artifact
45
+ uses: actions/upload-pages-artifact@v3
46
+ with:
47
+ path: docs/_build/html
48
+
49
+ deploy:
50
+ needs: build
51
+ runs-on: ubuntu-22.04
52
+ environment:
53
+ name: github-pages
54
+ url: ${{ steps.deployment.outputs.page_url }}
55
+ steps:
56
+ - id: deployment
57
+ uses: actions/deploy-pages@v4