ovftoolkit 0.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 (182) hide show
  1. ovftoolkit-0.3.0/.gitattributes +1 -0
  2. ovftoolkit-0.3.0/.github/workflows/ci.yml +353 -0
  3. ovftoolkit-0.3.0/.github/workflows/docs.yml +68 -0
  4. ovftoolkit-0.3.0/.github/workflows/release.yml +337 -0
  5. ovftoolkit-0.3.0/.gitignore +11 -0
  6. ovftoolkit-0.3.0/CMakeLists.txt +364 -0
  7. ovftoolkit-0.3.0/LICENSE +21 -0
  8. ovftoolkit-0.3.0/LICENSES/mdspan.txt +238 -0
  9. ovftoolkit-0.3.0/LICENSES/nanobind.txt +26 -0
  10. ovftoolkit-0.3.0/LICENSING.md +54 -0
  11. ovftoolkit-0.3.0/OVFParser/OVFDictionary.h +603 -0
  12. ovftoolkit-0.3.0/OVFParser/OVFGrammar.cpp +1095 -0
  13. ovftoolkit-0.3.0/OVFParser/OVFHeader.cpp +249 -0
  14. ovftoolkit-0.3.0/OVFParser/OVFHeader.h +374 -0
  15. ovftoolkit-0.3.0/OVFParser/OVFParser.h +120 -0
  16. ovftoolkit-0.3.0/OVFParser/OVFReader.cpp +972 -0
  17. ovftoolkit-0.3.0/OVFParser/OVFWriter.cpp +281 -0
  18. ovftoolkit-0.3.0/OVFParser/OVFWriter.h +111 -0
  19. ovftoolkit-0.3.0/OVFParser/VField.cpp +354 -0
  20. ovftoolkit-0.3.0/OVFParser/VField.h +651 -0
  21. ovftoolkit-0.3.0/OVFToolkitConfig.h.in +9 -0
  22. ovftoolkit-0.3.0/PKG-INFO +322 -0
  23. ovftoolkit-0.3.0/README.md +294 -0
  24. ovftoolkit-0.3.0/THIRD_PARTY_NOTICES.md +27 -0
  25. ovftoolkit-0.3.0/bindings/CMakeLists.txt +5 -0
  26. ovftoolkit-0.3.0/bindings/python/CMakeLists.txt +166 -0
  27. ovftoolkit-0.3.0/bindings/python/bindings.cpp +917 -0
  28. ovftoolkit-0.3.0/bindings/python/ovftoolkit/__init__.py +6 -0
  29. ovftoolkit-0.3.0/bindings/python/ovftoolkit/__init__.pyi +6 -0
  30. ovftoolkit-0.3.0/bindings/python/ovftoolkit/arrays.py +25 -0
  31. ovftoolkit-0.3.0/bindings/python/ovftoolkit/py.typed +1 -0
  32. ovftoolkit-0.3.0/bindings/python/ovftoolkit/spectrum.py +97 -0
  33. ovftoolkit-0.3.0/bindings/python/test_arrays.py +26 -0
  34. ovftoolkit-0.3.0/bindings/python/test_binding.py +211 -0
  35. ovftoolkit-0.3.0/bindings/python/test_spectrum.py +48 -0
  36. ovftoolkit-0.3.0/docs/CMakeLists.txt +32 -0
  37. ovftoolkit-0.3.0/docs/Doxyfile +26 -0
  38. ovftoolkit-0.3.0/docs/README.md +32 -0
  39. ovftoolkit-0.3.0/docs/cpp-mainpage.md +8 -0
  40. ovftoolkit-0.3.0/docs/help/examples/index.md +47 -0
  41. ovftoolkit-0.3.0/docs/help/index.md +18 -0
  42. ovftoolkit-0.3.0/docs/help/reference/index.md +12 -0
  43. ovftoolkit-0.3.0/docs/help/reference/python.md +87 -0
  44. ovftoolkit-0.3.0/docs/images/ovftoolkit-python-example.png +0 -0
  45. ovftoolkit-0.3.0/docs/overrides/main.html +11 -0
  46. ovftoolkit-0.3.0/docs/prepare_help.py +80 -0
  47. ovftoolkit-0.3.0/docs/requirements.txt +3 -0
  48. ovftoolkit-0.3.0/examples/Imported geometry - figure eight/FigureEightGeometry.ipynb +329 -0
  49. ovftoolkit-0.3.0/examples/Imported geometry - figure eight/figure-eight.mx3.in +13 -0
  50. ovftoolkit-0.3.0/examples/Imported geometry - pig/PigGeometry.ipynb +591 -0
  51. ovftoolkit-0.3.0/examples/Imported geometry - pig/model/README.md +14 -0
  52. ovftoolkit-0.3.0/examples/Imported geometry - pig/model/origins-of-the-pig.obj +13299 -0
  53. ovftoolkit-0.3.0/examples/Imported geometry - pig/model/upstream-info.txt +10 -0
  54. ovftoolkit-0.3.0/examples/Imported geometry - pig/pig.mx3.in +14 -0
  55. ovftoolkit-0.3.0/examples/Process spectrum/OVFToolkitWorkFlow.ipynb +1201 -0
  56. ovftoolkit-0.3.0/examples/Process spectrum/vortex-dynamics.mx3.in +25 -0
  57. ovftoolkit-0.3.0/examples/YIG strip dispersion/YIGStripDispersion.ipynb +583 -0
  58. ovftoolkit-0.3.0/examples/YIG strip dispersion/yig-strip.mx3.in +34 -0
  59. ovftoolkit-0.3.0/examples/create_ovf.py +16 -0
  60. ovftoolkit-0.3.0/examples/plot_ovf.py +30 -0
  61. ovftoolkit-0.3.0/externals/mdspan/.clang-tidy +4 -0
  62. ovftoolkit-0.3.0/externals/mdspan/.github/dependabot.yml +6 -0
  63. ovftoolkit-0.3.0/externals/mdspan/.github/workflows/cmake-windows.yml +47 -0
  64. ovftoolkit-0.3.0/externals/mdspan/.github/workflows/cmake.yml +107 -0
  65. ovftoolkit-0.3.0/externals/mdspan/.github/workflows/single-header.yml +22 -0
  66. ovftoolkit-0.3.0/externals/mdspan/.gitignore +8 -0
  67. ovftoolkit-0.3.0/externals/mdspan/CMakeLists.txt +226 -0
  68. ovftoolkit-0.3.0/externals/mdspan/LICENSE +238 -0
  69. ovftoolkit-0.3.0/externals/mdspan/LICENSE_FILE_HEADER +15 -0
  70. ovftoolkit-0.3.0/externals/mdspan/README.md +84 -0
  71. ovftoolkit-0.3.0/externals/mdspan/benchmarks/CMakeLists.txt +94 -0
  72. ovftoolkit-0.3.0/externals/mdspan/benchmarks/copy/CMakeLists.txt +2 -0
  73. ovftoolkit-0.3.0/externals/mdspan/benchmarks/copy/copy_layout_stride.cpp +268 -0
  74. ovftoolkit-0.3.0/externals/mdspan/benchmarks/fill.hpp +177 -0
  75. ovftoolkit-0.3.0/externals/mdspan/benchmarks/matvec/CMakeLists.txt +8 -0
  76. ovftoolkit-0.3.0/externals/mdspan/benchmarks/matvec/cuda/CMakeLists.txt +5 -0
  77. ovftoolkit-0.3.0/externals/mdspan/benchmarks/matvec/cuda/matvec_cuda.cu +275 -0
  78. ovftoolkit-0.3.0/externals/mdspan/benchmarks/matvec/openmp/CMakeLists.txt +7 -0
  79. ovftoolkit-0.3.0/externals/mdspan/benchmarks/matvec/openmp/matvec_openmp.cpp +261 -0
  80. ovftoolkit-0.3.0/externals/mdspan/benchmarks/stencil/CMakeLists.txt +10 -0
  81. ovftoolkit-0.3.0/externals/mdspan/benchmarks/stencil/cuda/CMakeLists.txt +9 -0
  82. ovftoolkit-0.3.0/externals/mdspan/benchmarks/stencil/cuda/stencil_3d_cuda.cu +335 -0
  83. ovftoolkit-0.3.0/externals/mdspan/benchmarks/stencil/openmp/CMakeLists.txt +7 -0
  84. ovftoolkit-0.3.0/externals/mdspan/benchmarks/stencil/openmp/stencil_3d_openmp.cpp +325 -0
  85. ovftoolkit-0.3.0/externals/mdspan/benchmarks/stencil/stencil_3d.cpp +138 -0
  86. ovftoolkit-0.3.0/externals/mdspan/benchmarks/sum/CMakeLists.txt +12 -0
  87. ovftoolkit-0.3.0/externals/mdspan/benchmarks/sum/cuda/CMakeLists.txt +5 -0
  88. ovftoolkit-0.3.0/externals/mdspan/benchmarks/sum/cuda/sum_3d_cuda.cu +300 -0
  89. ovftoolkit-0.3.0/externals/mdspan/benchmarks/sum/openmp/CMakeLists.txt +7 -0
  90. ovftoolkit-0.3.0/externals/mdspan/benchmarks/sum/openmp/sum_3d_openmp.cpp +151 -0
  91. ovftoolkit-0.3.0/externals/mdspan/benchmarks/sum/sum_3d_common.hpp +233 -0
  92. ovftoolkit-0.3.0/externals/mdspan/benchmarks/sum/sum_3d_left.cpp +96 -0
  93. ovftoolkit-0.3.0/externals/mdspan/benchmarks/sum/sum_3d_right.cpp +101 -0
  94. ovftoolkit-0.3.0/externals/mdspan/benchmarks/sum/sum_submdspan_right.cpp +199 -0
  95. ovftoolkit-0.3.0/externals/mdspan/benchmarks/tiny_matrix_add/CMakeLists.txt +6 -0
  96. ovftoolkit-0.3.0/externals/mdspan/benchmarks/tiny_matrix_add/openmp/CMakeLists.txt +7 -0
  97. ovftoolkit-0.3.0/externals/mdspan/benchmarks/tiny_matrix_add/openmp/tiny_matrix_add_openmp.cpp +454 -0
  98. ovftoolkit-0.3.0/externals/mdspan/benchmarks/tiny_matrix_add/tiny_matrix_add.cpp +151 -0
  99. ovftoolkit-0.3.0/externals/mdspan/cmake/mdspanConfig.cmake.in +7 -0
  100. ovftoolkit-0.3.0/externals/mdspan/cmake/metabench.cmake +1002 -0
  101. ovftoolkit-0.3.0/externals/mdspan/comp_bench/CMakeLists.txt +38 -0
  102. ovftoolkit-0.3.0/externals/mdspan/comp_bench/cbench_submdspan.cpp.erb +31 -0
  103. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/CMakeLists.txt +28 -0
  104. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_common.hpp +126 -0
  105. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_compressed_pair_layout.cpp +143 -0
  106. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_constexpr_dereference.cpp +273 -0
  107. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_constexpr_layouts.cpp +39 -0
  108. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_constexpr_submdspan.cpp +387 -0
  109. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_constructor_sfinae.cpp +182 -0
  110. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_extents_ctors.cpp +303 -0
  111. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_extents_type_check.cpp +79 -0
  112. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_layout_convertible.cpp +114 -0
  113. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_layout_type_check.cpp +87 -0
  114. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_mdarray_type_check.cpp +115 -0
  115. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_mdspan_convertible.cpp +42 -0
  116. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_namespace_std.cpp +25 -0
  117. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_no_unique_address.cpp +84 -0
  118. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_standard_layout.cpp +170 -0
  119. ovftoolkit-0.3.0/externals/mdspan/compilation_tests/ctest_trivially_copyable.cpp +166 -0
  120. ovftoolkit-0.3.0/externals/mdspan/examples/CMakeLists.txt +18 -0
  121. ovftoolkit-0.3.0/externals/mdspan/examples/aligned_accessor/CMakeLists.txt +1 -0
  122. ovftoolkit-0.3.0/externals/mdspan/examples/aligned_accessor/aligned_accessor.cpp +736 -0
  123. ovftoolkit-0.3.0/externals/mdspan/examples/dot_product/CMakeLists.txt +1 -0
  124. ovftoolkit-0.3.0/externals/mdspan/examples/dot_product/dot_product.cpp +133 -0
  125. ovftoolkit-0.3.0/externals/mdspan/examples/godbolt_starter/CMakeLists.txt +1 -0
  126. ovftoolkit-0.3.0/externals/mdspan/examples/godbolt_starter/godbolt_starter.cpp +38 -0
  127. ovftoolkit-0.3.0/externals/mdspan/examples/restrict_accessor/CMakeLists.txt +1 -0
  128. ovftoolkit-0.3.0/externals/mdspan/examples/restrict_accessor/restrict_accessor.cpp +267 -0
  129. ovftoolkit-0.3.0/externals/mdspan/examples/tiled_layout/CMakeLists.txt +1 -0
  130. ovftoolkit-0.3.0/externals/mdspan/examples/tiled_layout/simple_tiled_layout.cpp +212 -0
  131. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/compressed_pair.hpp +195 -0
  132. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/config.hpp +315 -0
  133. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/default_accessor.hpp +56 -0
  134. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/dynamic_extent.hpp +35 -0
  135. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/extents.hpp +701 -0
  136. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/full_extent_t.hpp +26 -0
  137. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/layout_left.hpp +267 -0
  138. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/layout_right.hpp +263 -0
  139. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/layout_stride.hpp +691 -0
  140. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/macros.hpp +719 -0
  141. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/mdspan.hpp +514 -0
  142. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/no_unique_address.hpp +97 -0
  143. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/trait_backports.hpp +132 -0
  144. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/type_list.hpp +86 -0
  145. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p0009_bits/utility.hpp +317 -0
  146. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p1684_bits/mdarray.hpp +460 -0
  147. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2389_bits/dims.hpp +25 -0
  148. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2630_bits/constant_wrapper.hpp +157 -0
  149. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2630_bits/integral_constant_like.hpp +157 -0
  150. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2630_bits/strided_slice.hpp +67 -0
  151. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2630_bits/submdspan.hpp +41 -0
  152. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2630_bits/submdspan_canonicalize_slices.hpp +388 -0
  153. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2630_bits/submdspan_extents.hpp +389 -0
  154. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2630_bits/submdspan_mapping.hpp +624 -0
  155. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2642_bits/layout_padded.hpp +1087 -0
  156. ovftoolkit-0.3.0/externals/mdspan/include/experimental/__p2642_bits/layout_padded_fwd.hpp +135 -0
  157. ovftoolkit-0.3.0/externals/mdspan/include/experimental/mdarray +28 -0
  158. ovftoolkit-0.3.0/externals/mdspan/include/experimental/mdspan +39 -0
  159. ovftoolkit-0.3.0/externals/mdspan/include/mdspan/mdarray.hpp +31 -0
  160. ovftoolkit-0.3.0/externals/mdspan/include/mdspan/mdspan.hpp +43 -0
  161. ovftoolkit-0.3.0/externals/mdspan/make_single_header.py +82 -0
  162. ovftoolkit-0.3.0/externals/mdspan/scripts/snl/config-all +73 -0
  163. ovftoolkit-0.3.0/externals/mdspan/scripts/snl/config-one +8 -0
  164. ovftoolkit-0.3.0/externals/mdspan/scripts/snl/config-one-cuda +7 -0
  165. ovftoolkit-0.3.0/externals/mdspan/scripts/snl/gtest-clang-patch +22 -0
  166. ovftoolkit-0.3.0/externals/mdspan/scripts/snl/gtest-hip-patch +102 -0
  167. ovftoolkit-0.3.0/externals/mdspan/scripts/snl/gtest-nvhpc-patch +14 -0
  168. ovftoolkit-0.3.0/mkdocs.yml +65 -0
  169. ovftoolkit-0.3.0/pyproject.toml +91 -0
  170. ovftoolkit-0.3.0/vcpkg-configuration.json +17 -0
  171. ovftoolkit-0.3.0/vcpkg-overlays/fftw3/aligned_malloc.patch +38 -0
  172. ovftoolkit-0.3.0/vcpkg-overlays/fftw3/fftw3_arch_fix.patch +39 -0
  173. ovftoolkit-0.3.0/vcpkg-overlays/fftw3/fix-avx2-fma-flags.patch +25 -0
  174. ovftoolkit-0.3.0/vcpkg-overlays/fftw3/fix-openmp.patch +13 -0
  175. ovftoolkit-0.3.0/vcpkg-overlays/fftw3/install-subtargets.patch +18 -0
  176. ovftoolkit-0.3.0/vcpkg-overlays/fftw3/neon.patch +73 -0
  177. ovftoolkit-0.3.0/vcpkg-overlays/fftw3/portfile.cmake +78 -0
  178. ovftoolkit-0.3.0/vcpkg-overlays/fftw3/propagate-fftw-dll.patch +14 -0
  179. ovftoolkit-0.3.0/vcpkg-overlays/fftw3/vcpkg.json +45 -0
  180. ovftoolkit-0.3.0/vcpkg-triplets/x64-windows-release.cmake +4 -0
  181. ovftoolkit-0.3.0/vcpkg-triplets/x64-windows-static-release.cmake +4 -0
  182. ovftoolkit-0.3.0/vcpkg.json +42 -0
@@ -0,0 +1 @@
1
+ testing/*.nb linguist-detectable=false
@@ -0,0 +1,353 @@
1
+ name: Build and test
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ pull_request:
7
+ workflow_dispatch:
8
+ inputs:
9
+ build_fftw_artifact:
10
+ description: Build the separate GPL FFTW portable artifact
11
+ required: false
12
+ default: false
13
+ type: boolean
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ linux-cuda-tests:
20
+ name: Linux CUDA 12.9 tests
21
+ runs-on: ubuntu-24.04
22
+ container: nvidia/cuda:12.9.1-devel-ubuntu24.04
23
+ steps:
24
+ - name: Install checkout prerequisites
25
+ run: |
26
+ apt-get update
27
+ apt-get install --yes ca-certificates git
28
+ - uses: actions/checkout@v6
29
+ with:
30
+ submodules: recursive
31
+ - name: Install build dependencies
32
+ run: |
33
+ apt-get update
34
+ DEBIAN_FRONTEND=noninteractive apt-get install --yes \
35
+ gcc-14 g++-14 golang-go libboost-program-options-dev libfftw3-dev \
36
+ libhdf5-dev libtbb-dev libvtk9-dev ninja-build \
37
+ python3-dev python3-pip
38
+ python3 -m pip install --break-system-packages \
39
+ "cmake>=3.30" nanobind numpy "setuptools>=77" wheel
40
+ - name: Configure
41
+ run: |
42
+ CC=gcc-14 CXX=g++-14 cmake -S . -B build -G Ninja \
43
+ -DCMAKE_BUILD_TYPE=Release \
44
+ -DOVFTOOLKIT_BUILD_DOCS=OFF \
45
+ -DOVFTOOLKIT_BUILD_WOLFRAM_BINDING=OFF \
46
+ -DOVFTOOLKIT_BUILD_PYTHON_BINDING=ON \
47
+ -DOVFTOOLKIT_BUILD_MUMAX_RUNNER=ON \
48
+ -DOVFTOOLKIT_USE_CUFFT=ON \
49
+ -DOVFTOOLKIT_USE_FFTW=ON
50
+ - name: Build
51
+ run: cmake --build build --parallel
52
+ - name: Run complete test suite
53
+ run: ctest --test-dir build --output-on-failure
54
+
55
+ windows-cuda-portable:
56
+ name: Windows CUDA 12.9 static portable
57
+ runs-on: windows-2022
58
+ env:
59
+ VCPKG_BINARY_CACHE: ${{ github.workspace }}\vcpkg-binary-cache
60
+ steps:
61
+ - uses: actions/checkout@v6
62
+ with:
63
+ submodules: recursive
64
+ - uses: actions/setup-python@v6
65
+ with:
66
+ python-version: "3.13"
67
+ - name: Install Python build and test dependencies
68
+ run: python -m pip install nanobind numpy
69
+ - name: Install CUDA 12.9
70
+ id: cuda
71
+ uses: Jimver/cuda-toolkit@v0.2.35
72
+ with:
73
+ cuda: "12.9.1"
74
+ method: network
75
+ sub-packages: '["nvcc", "visual_studio_integration", "cudart", "cufft", "cufft_dev"]'
76
+ - name: Verify CUDA 12.9 installation
77
+ shell: pwsh
78
+ env:
79
+ CUDA_ROOT: ${{ steps.cuda.outputs.CUDA_PATH }}
80
+ run: |
81
+ $required = @(
82
+ "$env:CUDA_ROOT/bin/nvcc.exe",
83
+ "$env:CUDA_ROOT/include/cufft.h",
84
+ "$env:CUDA_ROOT/lib/x64/cufft.lib",
85
+ "$env:CUDA_ROOT/extras/visual_studio_integration/MSBuildExtensions/CUDA 12.9.props"
86
+ )
87
+ foreach ($path in $required) {
88
+ if (-not (Test-Path -LiteralPath $path)) {
89
+ throw "CUDA installation is incomplete; missing $path"
90
+ }
91
+ }
92
+ & "$env:CUDA_ROOT/bin/nvcc.exe" --version
93
+ - name: Identify vcpkg tool revision
94
+ id: vcpkg
95
+ shell: pwsh
96
+ run: |
97
+ $revision = git -C $env:VCPKG_INSTALLATION_ROOT rev-parse --short=12 HEAD
98
+ "revision=$revision" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
99
+ - name: Restore release-only vcpkg binary cache
100
+ id: vcpkg-cache
101
+ uses: actions/cache/restore@v5
102
+ with:
103
+ path: ${{ env.VCPKG_BINARY_CACHE }}
104
+ key: windows-vcpkg-x64-static-release-cuda-v1-${{ steps.vcpkg.outputs.revision }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'vcpkg-triplets/**') }}
105
+ restore-keys: |
106
+ windows-vcpkg-x64-static-release-cuda-v1-${{ steps.vcpkg.outputs.revision }}-
107
+ - name: Configure vcpkg binary cache
108
+ shell: pwsh
109
+ run: |
110
+ New-Item -ItemType Directory -Force $env:VCPKG_BINARY_CACHE
111
+ "VCPKG_BINARY_SOURCES=clear;files,$env:VCPKG_BINARY_CACHE,readwrite" |
112
+ Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
113
+ - name: Configure CUDA-only static build
114
+ shell: pwsh
115
+ env:
116
+ CUDA_ROOT: ${{ steps.cuda.outputs.CUDA_PATH }}
117
+ run: |
118
+ $toolchain = "$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake".Replace('\', '/')
119
+ $triplets = "$env:GITHUB_WORKSPACE/vcpkg-triplets".Replace('\', '/')
120
+ $python = (Get-Command python).Source.Replace('\', '/')
121
+ $cuda = $env:CUDA_ROOT.Replace('\', '/')
122
+ cmake -S . -B build-windows-cuda -G "Visual Studio 17 2022" `
123
+ -A x64 -T "v143,cuda=$cuda" `
124
+ "-DCMAKE_TOOLCHAIN_FILE=$toolchain" `
125
+ "-DCUDAToolkit_ROOT=$cuda" `
126
+ "-DVCPKG_OVERLAY_TRIPLETS=$triplets" `
127
+ -DVCPKG_TARGET_TRIPLET=x64-windows-static-release `
128
+ -DVCPKG_HOST_TRIPLET=x64-windows-release `
129
+ -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON `
130
+ -DVCPKG_MANIFEST_FEATURES=convert `
131
+ '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>' `
132
+ -DCMAKE_INSTALL_PREFIX=build-windows-cuda/stage `
133
+ -DOVFTOOLKIT_BUILD_DOCS=OFF `
134
+ -DOVFTOOLKIT_BUILD_WOLFRAM_BINDING=OFF `
135
+ -DOVFTOOLKIT_BUILD_PYTHON_BINDING=ON `
136
+ -DOVFTOOLKIT_BUILD_MUMAX_RUNNER=OFF `
137
+ -DOVFTOOLKIT_USE_CUFFT=ON `
138
+ -DOVFTOOLKIT_USE_FFTW=OFF `
139
+ "-DPython_EXECUTABLE=$python"
140
+ - name: Save vcpkg dependencies after configuration
141
+ if: ${{ github.event_name != 'pull_request' && steps.vcpkg-cache.outputs.cache-hit != 'true' }}
142
+ uses: actions/cache/save@v5
143
+ with:
144
+ path: ${{ env.VCPKG_BINARY_CACHE }}
145
+ key: ${{ steps.vcpkg-cache.outputs.cache-primary-key }}
146
+ - name: Build Release
147
+ run: cmake --build build-windows-cuda --config Release --parallel
148
+ - name: Run complete test suite
149
+ run: ctest --test-dir build-windows-cuda -C Release --output-on-failure
150
+ - name: Stage tools
151
+ run: cmake --install build-windows-cuda --config Release
152
+ - name: Assemble portable CUDA package
153
+ id: package
154
+ shell: pwsh
155
+ run: |
156
+ $projectFile = Get-Content CMakeLists.txt -Raw
157
+ if ($projectFile -notmatch 'project\(OVFToolkit VERSION ([0-9]+\.[0-9]+\.[0-9]+)') {
158
+ throw 'Could not determine OVFToolkit version from CMakeLists.txt'
159
+ }
160
+ $shortSha = $env:GITHUB_SHA.Substring(0, 7)
161
+ $name = "OVFToolkit-$($Matches[1])-$shortSha-windows-x64-cuda12.9-static-portable"
162
+ $packageDir = Join-Path $env:GITHUB_WORKSPACE "dist/$name"
163
+ New-Item -ItemType Directory -Force $packageDir
164
+ Copy-Item build-windows-cuda/stage/bin/*.exe $packageDir
165
+ Copy-Item build-windows-cuda/stage/bin/*.dll $packageDir -ErrorAction SilentlyContinue
166
+ Copy-Item "$env:CUDA_PATH/bin/cudart64_12.dll" $packageDir
167
+ Copy-Item "$env:CUDA_PATH/bin/cufft64_11.dll" $packageDir
168
+ Copy-Item LICENSE, LICENSING.md, THIRD_PARTY_NOTICES.md $packageDir
169
+ $vcpkgLicenses = Join-Path $packageDir 'licenses/vcpkg'
170
+ New-Item -ItemType Directory -Force $vcpkgLicenses
171
+ Get-ChildItem build-windows-cuda/vcpkg_installed/x64-windows-static-release/share -Directory |
172
+ ForEach-Object {
173
+ $copyright = Join-Path $_.FullName 'copyright'
174
+ if (Test-Path $copyright) {
175
+ Copy-Item $copyright (Join-Path $vcpkgLicenses "$($_.Name).txt")
176
+ }
177
+ }
178
+ $cudaEula = Get-ChildItem $env:CUDA_PATH -Filter EULA.txt -Recurse |
179
+ Select-Object -First 1
180
+ if ($cudaEula) {
181
+ Copy-Item $cudaEula.FullName (Join-Path $packageDir 'NVIDIA-CUDA-EULA.txt')
182
+ }
183
+ & "$packageDir/ovf-convert.exe" --version
184
+ & "$packageDir/ovf-batchfft.exe" --version
185
+ $archive = Join-Path $env:GITHUB_WORKSPACE "dist/$name.zip"
186
+ Compress-Archive -Path $packageDir -DestinationPath $archive
187
+ "name=$name" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
188
+ "archive=$archive" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
189
+ - name: Upload portable CUDA tools
190
+ uses: actions/upload-artifact@v4
191
+ with:
192
+ name: ${{ steps.package.outputs.name }}
193
+ path: ${{ steps.package.outputs.archive }}
194
+ if-no-files-found: error
195
+ - name: Select Python 3.12 for the stable ABI wheel
196
+ uses: actions/setup-python@v6
197
+ with:
198
+ python-version: "3.12"
199
+ - name: Install wheel build frontend
200
+ run: python -m pip install build
201
+ - name: Build CPython stable ABI wheel
202
+ id: wheel
203
+ shell: pwsh
204
+ run: |
205
+ $ErrorActionPreference = 'Stop'
206
+ $PSNativeCommandUseErrorActionPreference = $true
207
+ $prefix = "$env:GITHUB_WORKSPACE/build-windows-cuda/vcpkg_installed/x64-windows-static-release".Replace('\', '/')
208
+ $env:CMAKE_ARGS = "-DCMAKE_PREFIX_PATH=$prefix"
209
+ $env:CMAKE_BUILD_PARALLEL_LEVEL = '2'
210
+ python -m build --wheel --outdir wheelhouse `
211
+ --config-setting=wheel.py-api=cp312 `
212
+ --config-setting=cmake.define.OVFTOOLKIT_PYTHON_STABLE_ABI=ON
213
+ $wheel = Get-ChildItem wheelhouse/*.whl
214
+ if ($wheel.Count -ne 1 -or $wheel.Name -notmatch '-cp312-abi3-win_amd64\.whl$') {
215
+ throw "Expected one cp312-abi3 Windows wheel, found: $($wheel.Name -join ', ')"
216
+ }
217
+ $projectFile = Get-Content CMakeLists.txt -Raw
218
+ if ($projectFile -notmatch 'project\(OVFToolkit VERSION ([0-9]+\.[0-9]+\.[0-9]+)') {
219
+ throw 'Could not determine OVFToolkit version from CMakeLists.txt'
220
+ }
221
+ $version = $Matches[1]
222
+ $shortSha = $env:GITHUB_SHA.Substring(0, 7)
223
+ $name = "OVFToolkit-$version-$shortSha-windows-x64-cp312-abi3-wheel"
224
+ "name=$name" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
225
+ "path=$($wheel.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
226
+ - name: Test stable ABI wheel with Python 3.14
227
+ uses: actions/setup-python@v6
228
+ with:
229
+ python-version: "3.14"
230
+ - name: Install and test stable ABI wheel
231
+ shell: pwsh
232
+ run: |
233
+ python -m venv wheel-test
234
+ $python = "$env:GITHUB_WORKSPACE/wheel-test/Scripts/python.exe"
235
+ & $python -m pip install "${{ steps.wheel.outputs.path }}"
236
+ & $python -c "import ovftoolkit as ovf; assert ovf.VField().data is None"
237
+ - name: Upload stable ABI wheel
238
+ uses: actions/upload-artifact@v4
239
+ with:
240
+ name: ${{ steps.wheel.outputs.name }}
241
+ path: ${{ steps.wheel.outputs.path }}
242
+ if-no-files-found: error
243
+
244
+ # Disabled on pushes and pull requests for the initial rollout. It can be
245
+ # exercised manually after the CUDA-only cache has completed successfully.
246
+ windows-fftw-portable:
247
+ name: Windows FFTW static portable
248
+ if: ${{ github.event_name == 'workflow_dispatch' && inputs.build_fftw_artifact }}
249
+ runs-on: windows-2022
250
+ env:
251
+ VCPKG_BINARY_CACHE: ${{ github.workspace }}\vcpkg-binary-cache
252
+ steps:
253
+ - uses: actions/checkout@v6
254
+ with:
255
+ submodules: recursive
256
+ - uses: actions/setup-python@v6
257
+ with:
258
+ python-version: "3.13"
259
+ - name: Install Python build and test dependencies
260
+ run: python -m pip install nanobind numpy
261
+ - name: Identify vcpkg tool revision
262
+ id: vcpkg
263
+ shell: pwsh
264
+ run: |
265
+ $revision = git -C $env:VCPKG_INSTALLATION_ROOT rev-parse --short=12 HEAD
266
+ "revision=$revision" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
267
+ - name: Restore release-only vcpkg binary cache
268
+ id: vcpkg-cache
269
+ uses: actions/cache/restore@v5
270
+ with:
271
+ path: ${{ env.VCPKG_BINARY_CACHE }}
272
+ key: windows-vcpkg-x64-static-release-fftw-v1-${{ steps.vcpkg.outputs.revision }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'vcpkg-triplets/**', 'vcpkg-overlays/fftw3/**') }}
273
+ restore-keys: |
274
+ windows-vcpkg-x64-static-release-cuda-v1-${{ steps.vcpkg.outputs.revision }}-
275
+ windows-vcpkg-x64-static-release-fftw-v1-${{ steps.vcpkg.outputs.revision }}-
276
+ - name: Configure vcpkg binary cache
277
+ shell: pwsh
278
+ run: |
279
+ New-Item -ItemType Directory -Force $env:VCPKG_BINARY_CACHE
280
+ "VCPKG_BINARY_SOURCES=clear;files,$env:VCPKG_BINARY_CACHE,readwrite" |
281
+ Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
282
+ - name: Configure FFTW-only static build
283
+ shell: pwsh
284
+ run: |
285
+ $toolchain = "$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake".Replace('\', '/')
286
+ $triplets = "$env:GITHUB_WORKSPACE/vcpkg-triplets".Replace('\', '/')
287
+ $python = (Get-Command python).Source.Replace('\', '/')
288
+ cmake -S . -B build-windows-fftw -A x64 `
289
+ "-DCMAKE_TOOLCHAIN_FILE=$toolchain" `
290
+ "-DVCPKG_OVERLAY_TRIPLETS=$triplets" `
291
+ -DVCPKG_TARGET_TRIPLET=x64-windows-static-release `
292
+ -DVCPKG_HOST_TRIPLET=x64-windows-release `
293
+ -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON `
294
+ '-DVCPKG_MANIFEST_FEATURES=convert;fftw' `
295
+ '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>' `
296
+ -DCMAKE_INSTALL_PREFIX=build-windows-fftw/stage `
297
+ -DOVFTOOLKIT_BUILD_DOCS=OFF `
298
+ -DOVFTOOLKIT_BUILD_WOLFRAM_BINDING=OFF `
299
+ -DOVFTOOLKIT_BUILD_PYTHON_BINDING=ON `
300
+ -DOVFTOOLKIT_BUILD_MUMAX_RUNNER=OFF `
301
+ -DOVFTOOLKIT_USE_CUFFT=OFF `
302
+ -DOVFTOOLKIT_USE_FFTW=ON `
303
+ "-DPython_EXECUTABLE=$python"
304
+ - name: Save vcpkg dependencies after configuration
305
+ if: ${{ github.event_name != 'pull_request' && steps.vcpkg-cache.outputs.cache-hit != 'true' }}
306
+ uses: actions/cache/save@v5
307
+ with:
308
+ path: ${{ env.VCPKG_BINARY_CACHE }}
309
+ key: ${{ steps.vcpkg-cache.outputs.cache-primary-key }}
310
+ - name: Build Release
311
+ run: cmake --build build-windows-fftw --config Release --parallel
312
+ - name: Run complete test suite
313
+ run: ctest --test-dir build-windows-fftw -C Release --output-on-failure
314
+ - name: Stage tools
315
+ run: cmake --install build-windows-fftw --config Release
316
+ - name: Assemble portable FFTW package
317
+ id: package
318
+ shell: pwsh
319
+ run: |
320
+ $projectFile = Get-Content CMakeLists.txt -Raw
321
+ if ($projectFile -notmatch 'project\(OVFToolkit VERSION ([0-9]+\.[0-9]+\.[0-9]+)') {
322
+ throw 'Could not determine OVFToolkit version from CMakeLists.txt'
323
+ }
324
+ $shortSha = $env:GITHUB_SHA.Substring(0, 7)
325
+ $name = "OVFToolkit-$($Matches[1])-$shortSha-windows-x64-fftw3-static-portable"
326
+ $packageDir = Join-Path $env:GITHUB_WORKSPACE "dist/$name"
327
+ New-Item -ItemType Directory -Force $packageDir
328
+ Copy-Item build-windows-fftw/stage/bin/*.exe $packageDir
329
+ Copy-Item build-windows-fftw/stage/bin/*.dll $packageDir -ErrorAction SilentlyContinue
330
+ Copy-Item LICENSE, LICENSING.md, THIRD_PARTY_NOTICES.md $packageDir
331
+ $vcpkgLicenses = Join-Path $packageDir 'licenses/vcpkg'
332
+ New-Item -ItemType Directory -Force $vcpkgLicenses
333
+ Get-ChildItem build-windows-fftw/vcpkg_installed/x64-windows-static-release/share -Directory |
334
+ ForEach-Object {
335
+ $copyright = Join-Path $_.FullName 'copyright'
336
+ if (Test-Path $copyright) {
337
+ Copy-Item $copyright (Join-Path $vcpkgLicenses "$($_.Name).txt")
338
+ }
339
+ }
340
+ Copy-Item build-windows-fftw/vcpkg_installed/x64-windows-static-release/share/fftw3/copyright `
341
+ $packageDir/FFTW-COPYING
342
+ & "$packageDir/ovf-convert.exe" --version
343
+ & "$packageDir/ovf-batchfft.exe" --version
344
+ $archive = Join-Path $env:GITHUB_WORKSPACE "dist/$name.zip"
345
+ Compress-Archive -Path $packageDir -DestinationPath $archive
346
+ "name=$name" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
347
+ "archive=$archive" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
348
+ - name: Upload portable FFTW tools
349
+ uses: actions/upload-artifact@v4
350
+ with:
351
+ name: ${{ steps.package.outputs.name }}
352
+ path: ${{ steps.package.outputs.archive }}
353
+ if-no-files-found: error
@@ -0,0 +1,68 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ paths:
7
+ - ".github/workflows/docs.yml"
8
+ - "docs/**"
9
+ - "examples/**"
10
+ - "mkdocs.yml"
11
+ pull_request:
12
+ paths:
13
+ - ".github/workflows/docs.yml"
14
+ - "docs/**"
15
+ - "examples/**"
16
+ - "mkdocs.yml"
17
+ workflow_dispatch:
18
+
19
+ permissions:
20
+ contents: read
21
+
22
+ concurrency:
23
+ group: pages
24
+ cancel-in-progress: false
25
+
26
+ jobs:
27
+ build:
28
+ name: Build saved notebook outputs
29
+ runs-on: ubuntu-24.04
30
+ steps:
31
+ - uses: actions/checkout@v6
32
+ - uses: actions/setup-python@v6
33
+ with:
34
+ python-version: "3.13"
35
+ cache: pip
36
+ cache-dependency-path: docs/requirements.txt
37
+ - name: Install documentation dependencies
38
+ run: python -m pip install -r docs/requirements.txt
39
+ - name: Install Doxygen and Graphviz
40
+ run: sudo apt-get update && sudo apt-get install --yes --no-install-recommends doxygen graphviz
41
+ - name: Stage notebooks without executing them
42
+ run: python docs/prepare_help.py
43
+ - name: Build documentation
44
+ run: python -m mkdocs build --strict
45
+ - name: Configure GitHub Pages
46
+ if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
47
+ uses: actions/configure-pages@v5
48
+ - name: Upload GitHub Pages artifact
49
+ if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
50
+ uses: actions/upload-pages-artifact@v4
51
+ with:
52
+ path: site
53
+
54
+ deploy:
55
+ name: Publish GitHub Pages
56
+ if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
57
+ needs: build
58
+ permissions:
59
+ pages: write
60
+ id-token: write
61
+ environment:
62
+ name: github-pages
63
+ url: ${{ steps.deployment.outputs.page_url }}
64
+ runs-on: ubuntu-24.04
65
+ steps:
66
+ - name: Deploy
67
+ id: deployment
68
+ uses: actions/deploy-pages@v4