peclet-amr 0.1.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 (173) hide show
  1. peclet_amr-0.1.0/.clang-format +62 -0
  2. peclet_amr-0.1.0/.clang-tidy +120 -0
  3. peclet_amr-0.1.0/.github/workflows/ci.yml +192 -0
  4. peclet_amr-0.1.0/.github/workflows/docs.yml +51 -0
  5. peclet_amr-0.1.0/.github/workflows/quality.yml +45 -0
  6. peclet_amr-0.1.0/.github/workflows/release.yml +42 -0
  7. peclet_amr-0.1.0/.gitignore +21 -0
  8. peclet_amr-0.1.0/CITATION.cff +31 -0
  9. peclet_amr-0.1.0/CLAUDE.md +200 -0
  10. peclet_amr-0.1.0/CMakeLists.txt +175 -0
  11. peclet_amr-0.1.0/LICENSE +21 -0
  12. peclet_amr-0.1.0/PKG-INFO +101 -0
  13. peclet_amr-0.1.0/README.md +87 -0
  14. peclet_amr-0.1.0/benchmarks/CMakeLists.txt +8 -0
  15. peclet_amr-0.1.0/benchmarks/bench_amr_flow.cpp +367 -0
  16. peclet_amr-0.1.0/cmake/PecletAmrPinMpiexec.cmake +23 -0
  17. peclet_amr-0.1.0/cmake/PecletAmrTest.cmake +34 -0
  18. peclet_amr-0.1.0/cmake/PecletDeps.cmake +109 -0
  19. peclet_amr-0.1.0/cmake/peclet-amrConfig.cmake.in +9 -0
  20. peclet_amr-0.1.0/docs/Doxyfile +68 -0
  21. peclet_amr-0.1.0/docs/amr_anisotropic.md +282 -0
  22. peclet_amr-0.1.0/docs/amr_collocated_projection.md +459 -0
  23. peclet_amr-0.1.0/docs/amr_mixed_level_cut_band_plan.md +841 -0
  24. peclet_amr-0.1.0/docs/amr_setup_parallel_plan.md +256 -0
  25. peclet_amr-0.1.0/docs/archive/README.md +30 -0
  26. peclet_amr-0.1.0/docs/archive/amr_aperture_advection_plan.md +125 -0
  27. peclet_amr-0.1.0/docs/archive/amr_device_assembly_plan.md +95 -0
  28. peclet_amr-0.1.0/docs/archive/amr_distributed_flow.md +280 -0
  29. peclet_amr-0.1.0/docs/archive/amr_march_perf_and_distributed_plan.md +750 -0
  30. peclet_amr-0.1.0/docs/archive/comm_avoiding_pressure_driver.md +121 -0
  31. peclet_amr-0.1.0/docs/archive/snellius_amr_bed.md +59 -0
  32. peclet_amr-0.1.0/docs/data/amr_bed_graded_d7.log +12 -0
  33. peclet_amr-0.1.0/docs/data/amr_bed_graded_d8.log +11 -0
  34. peclet_amr-0.1.0/docs/data/amr_bed_graded_d8_graded.log +13 -0
  35. peclet_amr-0.1.0/docs/data/amr_bed_graded_d8_h100.log +12 -0
  36. peclet_amr-0.1.0/docs/data/amr_cfdiv_cutrow_fix.log +44 -0
  37. peclet_amr-0.1.0/docs/data/amr_seam_census_m1.log +29 -0
  38. peclet_amr-0.1.0/docs/data/amr_seam_census_m1_rcp8.log +15 -0
  39. peclet_amr-0.1.0/docs/data/amr_seam_census_m1_rcp9.log +15 -0
  40. peclet_amr-0.1.0/docs/data/amr_seam_march_m3_v1.log +37 -0
  41. peclet_amr-0.1.0/docs/data/amr_seam_sample_order_m2.log +20 -0
  42. peclet_amr-0.1.0/docs/data/amr_two_sphere_diverge_probe.log +34 -0
  43. peclet_amr-0.1.0/docs/data/amr_two_sphere_gap_n128.log +80 -0
  44. peclet_amr-0.1.0/docs/data/amr_zh_c2_n64.log +11 -0
  45. peclet_amr-0.1.0/docs/data/amr_zh_c2_seam_n128.log +31 -0
  46. peclet_amr-0.1.0/docs/data/amr_zh_ladder_n128.log +45 -0
  47. peclet_amr-0.1.0/docs/data/amr_zh_ladder_n256.log +42 -0
  48. peclet_amr-0.1.0/docs/data/amr_zh_ladder_n256_cf0.log +42 -0
  49. peclet_amr-0.1.0/docs/data/amr_zh_ladder_n64.log +37 -0
  50. peclet_amr-0.1.0/docs/data/amr_zh_ladder_parity_n128.log +7 -0
  51. peclet_amr-0.1.0/docs/data/m3_ctrl1e20.log +10 -0
  52. peclet_amr-0.1.0/docs/data/m3_ctrl60.log +14 -0
  53. peclet_amr-0.1.0/docs/data/m3_cycle_ctrl.log +18 -0
  54. peclet_amr-0.1.0/docs/data/m3_cycle_seam.log +18 -0
  55. peclet_amr-0.1.0/docs/data/m3_parity.log +2 -0
  56. peclet_amr-0.1.0/docs/data/m3_seam1e20.log +10 -0
  57. peclet_amr-0.1.0/docs/data/m3_seam60.log +14 -0
  58. peclet_amr-0.1.0/docs/data/m3r1_ctrl60_cf1.log +14 -0
  59. peclet_amr-0.1.0/docs/data/m3r1_cycle_seam.log +18 -0
  60. peclet_amr-0.1.0/docs/data/m3r1_seam1e20.log +10 -0
  61. peclet_amr-0.1.0/docs/data/m3r1_seam60.log +14 -0
  62. peclet_amr-0.1.0/docs/data/m3r1_seam60_cf1.log +14 -0
  63. peclet_amr-0.1.0/include/peclet/amr/adapt.hpp +267 -0
  64. peclet_amr-0.1.0/include/peclet/amr/advect_recon.hpp +42 -0
  65. peclet_amr-0.1.0/include/peclet/amr/assembly.hpp +192 -0
  66. peclet_amr-0.1.0/include/peclet/amr/barnes_hut.hpp +223 -0
  67. peclet_amr-0.1.0/include/peclet/amr/block_octree.hpp +328 -0
  68. peclet_amr-0.1.0/include/peclet/amr/block_octree_view.hpp +69 -0
  69. peclet_amr-0.1.0/include/peclet/amr/cf_scheme.hpp +621 -0
  70. peclet_amr-0.1.0/include/peclet/amr/common.hpp +17 -0
  71. peclet_amr-0.1.0/include/peclet/amr/csr.hpp +124 -0
  72. peclet_amr-0.1.0/include/peclet/amr/cut_cell.hpp +763 -0
  73. peclet_amr-0.1.0/include/peclet/amr/distributed_adapt.hpp +202 -0
  74. peclet_amr-0.1.0/include/peclet/amr/distributed_flow_mg.hpp +399 -0
  75. peclet_amr-0.1.0/include/peclet/amr/distributed_fv.hpp +583 -0
  76. peclet_amr-0.1.0/include/peclet/amr/distributed_octree.hpp +870 -0
  77. peclet_amr-0.1.0/include/peclet/amr/distributed_poisson.hpp +256 -0
  78. peclet_amr-0.1.0/include/peclet/amr/distributed_view.hpp +362 -0
  79. peclet_amr-0.1.0/include/peclet/amr/face_csr.hpp +23 -0
  80. peclet_amr-0.1.0/include/peclet/amr/face_geom.hpp +39 -0
  81. peclet_amr-0.1.0/include/peclet/amr/facegeom_assembly.hpp +183 -0
  82. peclet_amr-0.1.0/include/peclet/amr/flow.hpp +2189 -0
  83. peclet_amr-0.1.0/include/peclet/amr/flow_oracle.hpp +848 -0
  84. peclet_amr-0.1.0/include/peclet/amr/fv_op.hpp +202 -0
  85. peclet_amr-0.1.0/include/peclet/amr/ghost_projection.hpp +506 -0
  86. peclet_amr-0.1.0/include/peclet/amr/ghost_projection_sampled.hpp +1407 -0
  87. peclet_amr-0.1.0/include/peclet/amr/indicators.hpp +91 -0
  88. peclet_amr-0.1.0/include/peclet/amr/leaf_field.hpp +142 -0
  89. peclet_amr-0.1.0/include/peclet/amr/leaf_halo.hpp +438 -0
  90. peclet_amr-0.1.0/include/peclet/amr/momentum.hpp +239 -0
  91. peclet_amr-0.1.0/include/peclet/amr/momentum_assembly.hpp +239 -0
  92. peclet_amr-0.1.0/include/peclet/amr/multigrid.hpp +455 -0
  93. peclet_amr-0.1.0/include/peclet/amr/pcg.hpp +279 -0
  94. peclet_amr-0.1.0/include/peclet/amr/poisson.hpp +823 -0
  95. peclet_amr-0.1.0/include/peclet/amr/refine.hpp +152 -0
  96. peclet_amr-0.1.0/include/peclet/amr/scalar_transport.hpp +174 -0
  97. peclet_amr-0.1.0/include/peclet/amr/velocity_mg.hpp +296 -0
  98. peclet_amr-0.1.0/include/peclet/amr/vtu_io.hpp +120 -0
  99. peclet_amr-0.1.0/packaging/_amr.pyi +469 -0
  100. peclet_amr-0.1.0/packaging/amr_init.py +33 -0
  101. peclet_amr-0.1.0/pyproject.toml +49 -0
  102. peclet_amr-0.1.0/python/amr_bindings.cpp +1216 -0
  103. peclet_amr-0.1.0/python/example_amr.py +81 -0
  104. peclet_amr-0.1.0/python/state_hash.py +223 -0
  105. peclet_amr-0.1.0/python/state_hash_reference.json +16 -0
  106. peclet_amr-0.1.0/python/test_amr.py +418 -0
  107. peclet_amr-0.1.0/tests/CMakeLists.txt +83 -0
  108. peclet_amr-0.1.0/tests/oracle/morton_octree.hpp +163 -0
  109. peclet_amr-0.1.0/tests/study/amr_adaptive_zh.py +113 -0
  110. peclet_amr-0.1.0/tests/study/amr_adaptive_zh_mpi.py +110 -0
  111. peclet_amr-0.1.0/tests/study/amr_bed_graded.py +201 -0
  112. peclet_amr-0.1.0/tests/study/amr_cloud_economy.py +113 -0
  113. peclet_amr-0.1.0/tests/study/amr_march_profile.py +177 -0
  114. peclet_amr-0.1.0/tests/study/amr_ns_ghost.py +148 -0
  115. peclet_amr-0.1.0/tests/study/amr_two_sphere_diverge_probe.py +75 -0
  116. peclet_amr-0.1.0/tests/study/amr_two_sphere_gap.py +204 -0
  117. peclet_amr-0.1.0/tests/study/amr_zh_baseline.py +79 -0
  118. peclet_amr-0.1.0/tests/study/amr_zh_c2.py +71 -0
  119. peclet_amr-0.1.0/tests/study/amr_zh_c2_seam.py +154 -0
  120. peclet_amr-0.1.0/tests/study/amr_zh_dilute.py +84 -0
  121. peclet_amr-0.1.0/tests/study/amr_zh_graded.py +79 -0
  122. peclet_amr-0.1.0/tests/study/amr_zh_ladder.py +227 -0
  123. peclet_amr-0.1.0/tests/study/amr_zh_ladder_parity.py +51 -0
  124. peclet_amr-0.1.0/tests/study_amr_ghost_apriori.cpp +340 -0
  125. peclet_amr-0.1.0/tests/study_amr_seam_census.cpp +485 -0
  126. peclet_amr-0.1.0/tests/study_amr_seam_march.cpp +213 -0
  127. peclet_amr-0.1.0/tests/study_amr_seam_sample_order.cpp +783 -0
  128. peclet_amr-0.1.0/tests/test_amr_adapt.cpp +141 -0
  129. peclet_amr-0.1.0/tests/test_amr_adapt_transport.cpp +146 -0
  130. peclet_amr-0.1.0/tests/test_amr_assembly.cpp +161 -0
  131. peclet_amr-0.1.0/tests/test_amr_barnes_hut.cpp +79 -0
  132. peclet_amr-0.1.0/tests/test_amr_cf_quadratic.cpp +124 -0
  133. peclet_amr-0.1.0/tests/test_amr_cf_vector.cpp +486 -0
  134. peclet_amr-0.1.0/tests/test_amr_cut_cell.cpp +136 -0
  135. peclet_amr-0.1.0/tests/test_amr_distributed_adapt_mpi.cpp +139 -0
  136. peclet_amr-0.1.0/tests/test_amr_distributed_adaptflow_mpi.cpp +203 -0
  137. peclet_amr-0.1.0/tests/test_amr_distributed_flow_mg_mpi.cpp +211 -0
  138. peclet_amr-0.1.0/tests/test_amr_distributed_flow_mpi.cpp +177 -0
  139. peclet_amr-0.1.0/tests/test_amr_distributed_fv_mpi.cpp +171 -0
  140. peclet_amr-0.1.0/tests/test_amr_distributed_graded_mg_mpi.cpp +135 -0
  141. peclet_amr-0.1.0/tests/test_amr_distributed_mg_mpi.cpp +109 -0
  142. peclet_amr-0.1.0/tests/test_amr_distributed_momentum_mpi.cpp +264 -0
  143. peclet_amr-0.1.0/tests/test_amr_distributed_mpi.cpp +163 -0
  144. peclet_amr-0.1.0/tests/test_amr_distributed_openness_mpi.cpp +162 -0
  145. peclet_amr-0.1.0/tests/test_amr_distributed_poisson_mpi.cpp +102 -0
  146. peclet_amr-0.1.0/tests/test_amr_distributed_rebalance_mpi.cpp +180 -0
  147. peclet_amr-0.1.0/tests/test_amr_distributed_seam_mpi.cpp +194 -0
  148. peclet_amr-0.1.0/tests/test_amr_distributed_view_mpi.cpp +136 -0
  149. peclet_amr-0.1.0/tests/test_amr_drag.cpp +182 -0
  150. peclet_amr-0.1.0/tests/test_amr_face_field.cpp +99 -0
  151. peclet_amr-0.1.0/tests/test_amr_facegeom.cpp +114 -0
  152. peclet_amr-0.1.0/tests/test_amr_flow.cpp +319 -0
  153. peclet_amr-0.1.0/tests/test_amr_flow_solver.cpp +1239 -0
  154. peclet_amr-0.1.0/tests/test_amr_fv_op.cpp +114 -0
  155. peclet_amr-0.1.0/tests/test_amr_fv_openness.cpp +157 -0
  156. peclet_amr-0.1.0/tests/test_amr_kappa_dirichlet.cpp +132 -0
  157. peclet_amr-0.1.0/tests/test_amr_kappa_restrict.cpp +148 -0
  158. peclet_amr-0.1.0/tests/test_amr_leaf_halo_mpi.cpp +191 -0
  159. peclet_amr-0.1.0/tests/test_amr_leaf_halo_view_mpi.cpp +162 -0
  160. peclet_amr-0.1.0/tests/test_amr_momentum.cpp +215 -0
  161. peclet_amr-0.1.0/tests/test_amr_momentum_assembly.cpp +159 -0
  162. peclet_amr-0.1.0/tests/test_amr_multigrid.cpp +287 -0
  163. peclet_amr-0.1.0/tests/test_amr_openness.cpp +129 -0
  164. peclet_amr-0.1.0/tests/test_amr_pcg.cpp +212 -0
  165. peclet_amr-0.1.0/tests/test_amr_poisson.cpp +281 -0
  166. peclet_amr-0.1.0/tests/test_amr_sdf.cpp +133 -0
  167. peclet_amr-0.1.0/tests/test_amr_transfer.cpp +160 -0
  168. peclet_amr-0.1.0/tests/test_amr_transport.cpp +169 -0
  169. peclet_amr-0.1.0/tests/test_amr_vtu.cpp +99 -0
  170. peclet_amr-0.1.0/tests/test_block_octree.cpp +199 -0
  171. peclet_amr-0.1.0/tests/test_block_octree_view.cpp +99 -0
  172. peclet_amr-0.1.0/tests/test_skip_mpi.hpp +31 -0
  173. peclet_amr-0.1.0/tests/test_util.hpp +46 -0
@@ -0,0 +1,62 @@
1
+ # Google C++ Style Guide – clang-format configuration
2
+ # https://google.github.io/styleguide/cppguide.html
3
+ #
4
+ # Applied to files under include/ and tests/.
5
+
6
+ BasedOnStyle: Google
7
+ Language: Cpp
8
+
9
+ # Column limit
10
+ ColumnLimit: 100
11
+
12
+ # Indentation
13
+ IndentWidth: 2
14
+ TabWidth: 2
15
+ UseTab: Never
16
+ ContinuationIndentWidth: 4
17
+
18
+ # Braces
19
+ BreakBeforeBraces: Attach
20
+
21
+ # Alignment
22
+ AlignAfterOpenBracket: Align
23
+ AlignConsecutiveAssignments: false
24
+ AlignConsecutiveDeclarations: false
25
+ AlignTrailingComments: true
26
+
27
+ # Include sorting
28
+ IncludeBlocks: Regroup
29
+ SortIncludes: CaseInsensitive
30
+
31
+ # Pointer/reference alignment
32
+ PointerAlignment: Left
33
+ ReferenceAlignment: Left
34
+
35
+ # Spaces
36
+ SpaceBeforeParens: ControlStatements
37
+ SpaceInEmptyParentheses: false
38
+ SpacesInAngles: false
39
+ SpacesInContainerLiterals: false
40
+
41
+ # Short-form options (Google defaults)
42
+ AllowShortFunctionsOnASingleLine: Inline
43
+ AllowShortIfStatementsOnASingleLine: false
44
+ AllowShortLoopsOnASingleLine: false
45
+ AllowShortCaseLabelsOnASingleLine: false
46
+
47
+ # Template
48
+ SpaceAfterTemplateKeyword: true
49
+
50
+ # Constructor initializer lists
51
+ BreakConstructorInitializers: BeforeComma
52
+ ConstructorInitializerIndentWidth: 4
53
+
54
+ # Class access modifiers
55
+ AccessModifierOffset: -1
56
+
57
+ # Namespace
58
+ NamespaceIndentation: None
59
+ CompactNamespaces: false
60
+
61
+ # Comments
62
+ ReflowComments: true
@@ -0,0 +1,120 @@
1
+ # clang-tidy configuration for peclet.core
2
+ # https://clang.llvm.org/extra/clang-tidy/
3
+ #
4
+ # Enable a curated set of checks aligned with the Google C++ Style Guide and
5
+ # modern C++ best practices. A few checks are disabled because the current
6
+ # code base uses patterns (e.g. VLAs as GCC extensions, raw owning pointers in
7
+ # legacy geometry code) that would generate too much noise before the code is
8
+ # further modernised.
9
+
10
+ Checks: >
11
+ clang-diagnostic-*,
12
+ clang-analyzer-*,
13
+ cppcoreguidelines-avoid-goto,
14
+ cppcoreguidelines-init-variables,
15
+ cppcoreguidelines-narrowing-conversions,
16
+ cppcoreguidelines-no-malloc,
17
+ google-build-explicit-make-pair,
18
+ google-build-namespaces,
19
+ google-explicit-constructor,
20
+ google-global-names-in-headers,
21
+ google-readability-avoid-underscore-in-googletest-name,
22
+ google-readability-casting,
23
+ google-readability-todo,
24
+ google-runtime-int,
25
+ google-runtime-operator,
26
+ modernize-avoid-bind,
27
+ modernize-loop-convert,
28
+ modernize-make-shared,
29
+ modernize-make-unique,
30
+ modernize-pass-by-value,
31
+ modernize-redundant-void-arg,
32
+ modernize-replace-auto-ptr,
33
+ modernize-shrink-to-fit,
34
+ modernize-use-bool-literals,
35
+ modernize-use-default-member-init,
36
+ modernize-use-emplace,
37
+ modernize-use-equals-default,
38
+ modernize-use-equals-delete,
39
+ modernize-use-nodiscard,
40
+ modernize-use-nullptr,
41
+ modernize-use-override,
42
+ modernize-use-using,
43
+ performance-faster-string-find,
44
+ performance-for-range-copy,
45
+ performance-implicit-conversion-in-loop,
46
+ performance-inefficient-algorithm,
47
+ performance-inefficient-string-concatenation,
48
+ performance-inefficient-vector-operation,
49
+ performance-move-const-arg,
50
+ performance-move-constructor-init,
51
+ performance-no-automatic-move,
52
+ performance-trivially-destructible,
53
+ performance-type-promotion-in-math-fn,
54
+ performance-unnecessary-copy-initialization,
55
+ performance-unnecessary-value-param,
56
+ readability-braces-around-statements,
57
+ readability-const-return-type,
58
+ readability-container-size-empty,
59
+ readability-delete-null-pointer,
60
+ readability-else-after-return,
61
+ readability-function-size,
62
+ readability-identifier-naming,
63
+ readability-implicit-bool-conversion,
64
+ readability-misleading-indentation,
65
+ readability-misplaced-array-index,
66
+ readability-non-const-parameter,
67
+ readability-redundant-access-specifiers,
68
+ readability-redundant-control-flow,
69
+ readability-redundant-declaration,
70
+ readability-redundant-member-init,
71
+ readability-redundant-preprocessor,
72
+ readability-redundant-smartptr-get,
73
+ readability-redundant-string-cstr,
74
+ readability-redundant-string-init,
75
+ readability-simplify-subscript-expr,
76
+ readability-static-accessed-through-instance,
77
+ readability-static-definition-in-anonymous-namespace,
78
+ readability-string-compare,
79
+ readability-uniqueptr-delete-release,
80
+ -cppcoreguidelines-pro-bounds-array-to-pointer-decay,
81
+ -cppcoreguidelines-pro-bounds-constant-array-index,
82
+ -cppcoreguidelines-pro-bounds-pointer-arithmetic,
83
+ -cppcoreguidelines-pro-type-reinterpret-cast,
84
+ -cppcoreguidelines-pro-type-vararg,
85
+ -google-runtime-references,
86
+ -readability-magic-numbers
87
+
88
+ WarningsAsErrors: ''
89
+
90
+ HeaderFilterRegex: 'include/peclet/core/.*'
91
+
92
+ FormatStyle: file
93
+
94
+ CheckOptions:
95
+ - key: readability-identifier-naming.NamespaceCase
96
+ value: lower_case
97
+ - key: readability-identifier-naming.ClassCase
98
+ value: CamelCase
99
+ - key: readability-identifier-naming.StructCase
100
+ value: CamelCase
101
+ - key: readability-identifier-naming.TemplateParameterCase
102
+ value: CamelCase
103
+ - key: readability-identifier-naming.FunctionCase
104
+ value: camelBack
105
+ - key: readability-identifier-naming.VariableCase
106
+ value: camelBack
107
+ - key: readability-identifier-naming.ClassMemberCase
108
+ value: camelBack
109
+ - key: readability-identifier-naming.ClassMemberPrefix
110
+ value: 'm_'
111
+ - key: readability-identifier-naming.PrivateMemberPrefix
112
+ value: 'm_'
113
+ - key: readability-identifier-naming.ConstantCase
114
+ value: kCamelCase
115
+ - key: readability-identifier-naming.EnumConstantCase
116
+ value: kCamelCase
117
+ - key: readability-function-size.LineThreshold
118
+ value: '200'
119
+ - key: readability-function-size.StatementThreshold
120
+ value: '100'
@@ -0,0 +1,192 @@
1
+ name: CI
2
+
3
+ # Honest CI (suite/docs/QUALITY_PLAN.md §3.D): every test the repository registers is either RUN or
4
+ # reported by ctest as "Not Run (skipped)" — never green by early-return. peclet-amr is header-only
5
+ # over peclet-core + peclet-morton (checked out as SIBLINGS, exactly the suite layout) and always
6
+ # compiles through Kokkos (OpenMP + Serial host backend here, 5.1.1 cached):
7
+ #
8
+ # kokkos-openmp gcc / clang, Release, MPI ON: the whole battery — host octree + oracle, the
9
+ # device (Kokkos) solver stack, the distributed octree / flow at np=1,2,4 — plus
10
+ # (gcc) the Python module peclet.amr with test_amr.py serial + np=2 and the
11
+ # state_hash byte gate.
12
+ # debug gcc Debug, MPI ON: the same battery with assertions live (single-rank + mpi),
13
+ # minus amr_flow_solver — the whole device step vs the oracle takes >40 min
14
+ # unoptimised on a 4-core runner (Release covers it); listed by `ctest -N`.
15
+ #
16
+ # What is NOT run here, and why (nothing is hidden — `ctest -N` lists it all):
17
+ # * label np8 the 8-rank instances: hosted runners have 4 cores and oversubscribed np=8 halo
18
+ # tests hung there (peclet-core's NBX tag-race history). np=8 is a LOCAL gate.
19
+ # * label bench benchmarks + measurement studies (bench_amr_flow, study_amr_*): timings and
20
+ # tables, no correctness gate.
21
+ # * GPU backends (CUDA/HIP): no GPU on free runners.
22
+ # * python_state_hash reports SKIPPED: the byte gate's reference is recorded on the developer's
23
+ # toolchain (the last bits of a Krylov solve are compiler-specific); it gates locally.
24
+ # * MPI is required (there is no no-MPI configuration): core's mpi_stub covers the host halo
25
+ # only, and the device flow reaches the Kokkos grid halo.
26
+ #
27
+ # Thread bounds: the hosted runner has 4 cores / 16 GB. Single-rank suites run with
28
+ # OMP_NUM_THREADS=2, the MPI suites with OMP_NUM_THREADS=1 (np=4 x 1 thread), ctest -j1 throughout.
29
+ #
30
+ # core is checked out at PECLET_CORE_REF: peclet-amr needs core's solver layer (lifted out of the AMR
31
+ # tree on 2026-09-10), which ships in the core release AFTER v0.6.1 — until that tag exists this is
32
+ # `main`; the release repins it (and PECLET_CORE_TAG in cmake/PecletDeps.cmake) to the tag.
33
+
34
+ on:
35
+ push:
36
+ branches: [main, "**"]
37
+ pull_request:
38
+ workflow_dispatch:
39
+
40
+ permissions:
41
+ contents: read
42
+
43
+ env:
44
+ KOKKOS_TAG: "5.1.1" # keep in lockstep with ../tools/bootstrap_deps.sh and cmake/PecletDeps.cmake
45
+ PECLET_CORE_REF: "main" # see the header
46
+ MORTON_TAG: "v0.2.1" # keep in lockstep with cmake/PecletDeps.cmake (PECLET_MORTON_TAG)
47
+ NANOBIND_VERSION: "2.13.0" # the suite venv's nanobind; pinned so a nanobind release cannot break CI
48
+ OMPI_ALLOW_RUN_AS_ROOT: 1
49
+ OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
50
+ OMPI_MCA_rmaps_base_oversubscribe: 1
51
+ PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe"
52
+ OMP_PROC_BIND: "false"
53
+ CTEST_OUTPUT_ON_FAILURE: 1
54
+
55
+ jobs:
56
+ kokkos-openmp:
57
+ name: ubuntu / ${{ matrix.compiler }} / Kokkos OpenMP + MPI / Release
58
+ runs-on: ubuntu-24.04
59
+ timeout-minutes: 90
60
+ strategy:
61
+ fail-fast: false
62
+ matrix:
63
+ compiler: [gcc, clang]
64
+ include:
65
+ - compiler: gcc
66
+ cc: gcc
67
+ cxx: g++
68
+ - compiler: clang
69
+ cc: clang
70
+ cxx: clang++
71
+ env:
72
+ CC: ${{ matrix.cc }}
73
+ CXX: ${{ matrix.cxx }}
74
+ steps:
75
+ # Sibling layout, exactly as in the suite checkout: cmake/PecletDeps.cmake finds ../core and
76
+ # ../morton before it would fetch anything.
77
+ - uses: actions/checkout@v4
78
+ with:
79
+ path: amr
80
+ - name: Checkout core + morton (siblings)
81
+ uses: actions/checkout@v4
82
+ with:
83
+ repository: computational-chemical-engineering/peclet-core
84
+ ref: ${{ env.PECLET_CORE_REF }}
85
+ path: core
86
+ - uses: actions/checkout@v4
87
+ with:
88
+ repository: computational-chemical-engineering/peclet-morton
89
+ ref: ${{ env.MORTON_TAG }}
90
+ path: morton
91
+
92
+ - name: Install toolchain
93
+ run: |
94
+ sudo apt-get update -q
95
+ sudo apt-get install -y cmake ninja-build libomp-dev g++ clang libopenmpi-dev openmpi-bin \
96
+ python3-dev python3-pip
97
+ python3 -m pip install "nanobind==${NANOBIND_VERSION}" numpy mpi4py
98
+
99
+ - name: Cache Kokkos install
100
+ id: kokkos-cache
101
+ uses: actions/cache@v4
102
+ with:
103
+ path: ${{ github.workspace }}/kokkos-install
104
+ key: kokkos-${{ env.KOKKOS_TAG }}-openmp-cxx20-${{ matrix.compiler }}-${{ runner.os }}
105
+
106
+ - name: Build Kokkos (OpenMP + Serial)
107
+ if: steps.kokkos-cache.outputs.cache-hit != 'true'
108
+ run: |
109
+ git clone --depth 1 --branch "$KOKKOS_TAG" https://github.com/kokkos/kokkos.git /tmp/kokkos
110
+ cmake -S /tmp/kokkos -B /tmp/kokkos/build -G Ninja \
111
+ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 \
112
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
113
+ -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_SERIAL=ON \
114
+ -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/kokkos-install"
115
+ cmake --build /tmp/kokkos/build -j
116
+ cmake --install /tmp/kokkos/build
117
+
118
+ - name: Configure (MPI + tests + Python)
119
+ run: |
120
+ cmake -S amr -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
121
+ -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/kokkos-install" \
122
+ -DPECLET_AMR_BUILD_TESTS=ON \
123
+ -DPECLET_AMR_BUILD_PYTHON=${{ matrix.compiler == 'gcc' && 'ON' || 'OFF' }} \
124
+ -DPython_EXECUTABLE="$(which python3)"
125
+
126
+ - name: Build
127
+ run: cmake --build build -j
128
+
129
+ - name: List tests
130
+ run: ctest --test-dir build -N
131
+
132
+ - name: Test single-rank (OMP_NUM_THREADS=2)
133
+ run: OMP_NUM_THREADS=2 ctest --test-dir build -LE "mpi|bench" --timeout 1800 --output-on-failure -j1
134
+
135
+ - name: Test MPI np=1,2,4 (OMP_NUM_THREADS=1; np8 excluded, see header)
136
+ run: OMP_NUM_THREADS=1 ctest --test-dir build -L mpi -LE "np8|bench" --timeout 1800 --output-on-failure -j1
137
+
138
+ - name: Import peclet.amr
139
+ if: matrix.compiler == 'gcc'
140
+ run: PYTHONPATH=$PWD/build python3 -c "import mpi4py.MPI, peclet.amr; print('peclet.amr', peclet.amr.execution_space)"
141
+
142
+ debug:
143
+ name: ubuntu / gcc / Kokkos OpenMP + MPI / Debug
144
+ runs-on: ubuntu-24.04
145
+ timeout-minutes: 120
146
+ steps:
147
+ - uses: actions/checkout@v4
148
+ with:
149
+ path: amr
150
+ - uses: actions/checkout@v4
151
+ with:
152
+ repository: computational-chemical-engineering/peclet-core
153
+ ref: ${{ env.PECLET_CORE_REF }}
154
+ path: core
155
+ - uses: actions/checkout@v4
156
+ with:
157
+ repository: computational-chemical-engineering/peclet-morton
158
+ ref: ${{ env.MORTON_TAG }}
159
+ path: morton
160
+ - name: Install toolchain
161
+ run: |
162
+ sudo apt-get update -q
163
+ sudo apt-get install -y cmake ninja-build libomp-dev g++ libopenmpi-dev openmpi-bin
164
+ - name: Cache Kokkos install
165
+ id: kokkos-cache
166
+ uses: actions/cache@v4
167
+ with:
168
+ path: ${{ github.workspace }}/kokkos-install
169
+ key: kokkos-${{ env.KOKKOS_TAG }}-openmp-cxx20-gcc-${{ runner.os }}
170
+ - name: Build Kokkos (OpenMP + Serial)
171
+ if: steps.kokkos-cache.outputs.cache-hit != 'true'
172
+ run: |
173
+ git clone --depth 1 --branch "$KOKKOS_TAG" https://github.com/kokkos/kokkos.git /tmp/kokkos
174
+ cmake -S /tmp/kokkos -B /tmp/kokkos/build -G Ninja \
175
+ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 \
176
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
177
+ -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_SERIAL=ON \
178
+ -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/kokkos-install"
179
+ cmake --build /tmp/kokkos/build -j
180
+ cmake --install /tmp/kokkos/build
181
+ - name: Configure (Debug, MPI + tests, no Python)
182
+ run: |
183
+ cmake -S amr -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug \
184
+ -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/kokkos-install" \
185
+ -DPECLET_AMR_BUILD_TESTS=ON -DPECLET_AMR_BUILD_PYTHON=OFF
186
+ - name: Build
187
+ run: cmake --build build -j
188
+ - name: Test (single-rank + MPI np=1,2,4; amr_flow_solver excluded, see header)
189
+ run: |
190
+ ctest --test-dir build -N
191
+ OMP_NUM_THREADS=2 ctest --test-dir build -LE "mpi|bench" -E "^amr_flow_solver$" --timeout 2400 --output-on-failure -j1
192
+ OMP_NUM_THREADS=1 ctest --test-dir build -L mpi -LE "np8|bench" --timeout 2400 --output-on-failure -j1
@@ -0,0 +1,51 @@
1
+ name: Documentation
2
+
3
+ # Build the Doxygen API docs (README.md + the header-only C++20 API in include/ + the Python
4
+ # binding TU) and publish them to GitHub Pages. Requires Pages to be enabled for the repository with
5
+ # "Source: GitHub Actions" (Settings -> Pages). Runs on every push to main; can also be run manually.
6
+
7
+ on:
8
+ push:
9
+ branches: [main]
10
+ paths:
11
+ - 'include/**'
12
+ - 'python/**'
13
+ - 'docs/**'
14
+ - 'README.md'
15
+ - '.github/workflows/docs.yml'
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+ pages: write
21
+ id-token: write
22
+
23
+ # allow one concurrent deployment; cancel an in-progress run for a newer push
24
+ concurrency:
25
+ group: pages
26
+ cancel-in-progress: true
27
+
28
+ jobs:
29
+ build:
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - uses: actions/checkout@v4
33
+ - name: Install Doxygen + Graphviz
34
+ run: sudo apt-get update && sudo apt-get install -y doxygen graphviz
35
+ - name: Build documentation
36
+ run: doxygen docs/Doxyfile
37
+ - name: Upload Pages artifact
38
+ uses: actions/upload-pages-artifact@v5
39
+ with:
40
+ path: docs/html
41
+
42
+ deploy:
43
+ needs: build
44
+ runs-on: ubuntu-latest
45
+ environment:
46
+ name: github-pages
47
+ url: ${{ steps.deployment.outputs.page_url }}
48
+ steps:
49
+ - name: Deploy to GitHub Pages
50
+ id: deployment
51
+ uses: actions/deploy-pages@v5
@@ -0,0 +1,45 @@
1
+ name: Quality
2
+
3
+ # Code-quality gates. Python hard-fails on critical errors only. The C++ clang-format check is
4
+ # BLOCKING from the package's first push (suite/docs/QUALITY_PLAN.md §3.D.7): clang-format is pinned
5
+ # to 18.1.8 (the suite venv's version, installed from PyPI — the apt package drifts) and the whole
6
+ # tree — include/ tests/ python/ benchmarks/ — is formatted against the suite-wide .clang-format
7
+ # (the AMR tree was reformatted once on relocation, 2026-09-10; core had excluded it until then).
8
+
9
+ on:
10
+ push:
11
+ branches: [main, "**"]
12
+ pull_request:
13
+ workflow_dispatch:
14
+
15
+ jobs:
16
+ python-lint:
17
+ name: ruff (critical errors)
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: actions/setup-python@v6
22
+ with:
23
+ python-version: "3.12"
24
+ - run: pip install ruff
25
+ - name: Ruff critical-error check
26
+ run: |
27
+ ruff check . --select E9,F63,F7,F82 \
28
+ --exclude ".venv,venv,build,build_*,__pycache__,_deps,extern"
29
+
30
+ cpp-format:
31
+ name: clang-format 18.1.8 (blocking)
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+ - uses: actions/setup-python@v6
36
+ with:
37
+ python-version: "3.12"
38
+ - run: pip install "clang-format==18.1.8"
39
+ - name: clang-format dry-run (uses the repo .clang-format)
40
+ run: |
41
+ files=$(git ls-files 'include/*.hpp' 'tests/*.hpp' 'tests/*.cpp' 'benchmarks/*.cpp' 'python/*.cpp')
42
+ [ -z "$files" ] && { echo "no C++ sources"; exit 0; }
43
+ clang-format --version
44
+ echo "$files" | wc -l
45
+ clang-format --dry-run --Werror $files
@@ -0,0 +1,42 @@
1
+ name: Release
2
+
3
+ # Publish peclet-amr to PyPI on a version tag via Trusted Publishing (OIDC) — configure the publisher
4
+ # on PyPI first; no API token secret needed. SDIST ONLY, like peclet-core: peclet.amr links MPI (its
5
+ # DistributedOctree runs over MPI_COMM_WORLD, driven by mpi4py) and a Kokkos backend, whose ABI/arch
6
+ # make a portable binary wheel impossible. Consumers `pip install peclet-amr` and build against their
7
+ # site MPI + Kokkos prefix (cmake/PecletDeps.cmake fetches the peclet-core / peclet-morton headers
8
+ # at their pinned tags), or use the suite containers. See ../docs/RELEASE.md.
9
+
10
+ on:
11
+ push:
12
+ tags: ["v*"]
13
+ workflow_dispatch:
14
+
15
+ jobs:
16
+ sdist:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: actions/setup-python@v6
21
+ with:
22
+ python-version: "3.12"
23
+ - run: pip install build
24
+ - run: python -m build --sdist
25
+ - uses: actions/upload-artifact@v4
26
+ with:
27
+ name: sdist
28
+ path: dist/*.tar.gz
29
+
30
+ publish:
31
+ needs: [sdist]
32
+ runs-on: ubuntu-latest
33
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
34
+ environment: pypi
35
+ permissions:
36
+ id-token: write # required for trusted publishing
37
+ steps:
38
+ - uses: actions/download-artifact@v4
39
+ with:
40
+ path: dist
41
+ merge-multiple: true
42
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,21 @@
1
+ build/
2
+ build_*/
3
+ build-*/
4
+ *.o
5
+ *.so
6
+ .cache/
7
+ compile_commands.json
8
+
9
+ # Generated Doxygen output (built in CI, published to Pages)
10
+ docs/html/
11
+
12
+ # Python build/test artifacts
13
+ __pycache__/
14
+ *.pyc
15
+ *.egg-info/
16
+ dist/
17
+
18
+ # Scratch output of the examples / studies
19
+ *.vtu
20
+ *.log
21
+ !docs/data/*.log
@@ -0,0 +1,31 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it using the metadata below."
3
+ title: "peclet-amr: block-local-Morton AMR octree and collocated cut-cell Navier–Stokes solver"
4
+ abstract: >-
5
+ Header-only C++20 adaptive-mesh-refinement package of the peclet suite: a per-block linear octree
6
+ on Morton codes with 2:1 balance, solution-adaptive refinement and an ORB-distributed (MPI) variant
7
+ with leaf halos and weighted-ORB rebalancing; on it, a collocated-projection incompressible
8
+ Navier–Stokes solver with a cut-cell immersed boundary (ghost projection, mixed-level cut band),
9
+ geometric multigrid (PCG / BiCGStab), scalar transport and VTU output. Kokkos device backends
10
+ (CUDA / HIP / OpenMP) and nanobind Python bindings (peclet.amr). Relocated out of peclet-core with
11
+ its history on 2026-09-10.
12
+ type: software
13
+ authors:
14
+ - family-names: Peters
15
+ given-names: Frank
16
+ email: e.a.j.f.peters@gmail.com
17
+ affiliation: "Eindhoven University of Technology"
18
+ version: 0.1.0
19
+ date-released: 2026-09-12
20
+ license: MIT
21
+ repository-code: "https://github.com/computational-chemical-engineering/peclet-amr"
22
+ keywords:
23
+ - adaptive mesh refinement
24
+ - octree
25
+ - Morton codes
26
+ - cut-cell immersed boundary
27
+ - incompressible Navier–Stokes
28
+ - multigrid
29
+ - MPI
30
+ - Kokkos
31
+ - GPU computing