peclet-halo 1.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 (130) hide show
  1. peclet_halo-1.1.0/.clang-format +62 -0
  2. peclet_halo-1.1.0/.clang-tidy +120 -0
  3. peclet_halo-1.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +24 -0
  4. peclet_halo-1.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +15 -0
  5. peclet_halo-1.1.0/.github/PULL_REQUEST_TEMPLATE.md +10 -0
  6. peclet_halo-1.1.0/.github/dependabot.yml +6 -0
  7. peclet_halo-1.1.0/.github/workflows/ci.yml +187 -0
  8. peclet_halo-1.1.0/.github/workflows/docs.yml +50 -0
  9. peclet_halo-1.1.0/.github/workflows/quality.yml +45 -0
  10. peclet_halo-1.1.0/.github/workflows/release.yml +67 -0
  11. peclet_halo-1.1.0/.gitignore +17 -0
  12. peclet_halo-1.1.0/CITATION.cff +37 -0
  13. peclet_halo-1.1.0/CLAUDE.md +227 -0
  14. peclet_halo-1.1.0/CMakeLists.txt +158 -0
  15. peclet_halo-1.1.0/LICENSE +21 -0
  16. peclet_halo-1.1.0/PKG-INFO +151 -0
  17. peclet_halo-1.1.0/README.md +119 -0
  18. peclet_halo-1.1.0/benchmarks/CMakeLists.txt +6 -0
  19. peclet_halo-1.1.0/benchmarks/bench_halo.cpp +91 -0
  20. peclet_halo-1.1.0/cmake/PecletCorePinMpiexec.cmake +23 -0
  21. peclet_halo-1.1.0/cmake/PecletCoreTest.cmake +31 -0
  22. peclet_halo-1.1.0/cmake/SuiteNanobind.cmake +51 -0
  23. peclet_halo-1.1.0/cmake/peclet-coreConfig.cmake.in +12 -0
  24. peclet_halo-1.1.0/docs/Doxyfile +67 -0
  25. peclet_halo-1.1.0/docs/archive/README.md +18 -0
  26. peclet_halo-1.1.0/docs/archive/cuda-aware-mpi.md +71 -0
  27. peclet_halo-1.1.0/include/peclet/core/common/cpu_budget.hpp +192 -0
  28. peclet_halo-1.1.0/include/peclet/core/common/host_parallel.hpp +132 -0
  29. peclet_halo-1.1.0/include/peclet/core/common/mpi.hpp +11 -0
  30. peclet_halo-1.1.0/include/peclet/core/common/mpi_stub.hpp +178 -0
  31. peclet_halo-1.1.0/include/peclet/core/common/portable.hpp +187 -0
  32. peclet_halo-1.1.0/include/peclet/core/common/types.hpp +72 -0
  33. peclet_halo-1.1.0/include/peclet/core/common/view.hpp +91 -0
  34. peclet_halo-1.1.0/include/peclet/core/decomp/block_decomposer.hpp +475 -0
  35. peclet_halo-1.1.0/include/peclet/core/decomp/block_indexer.hpp +121 -0
  36. peclet_halo-1.1.0/include/peclet/core/decomp/grid_redistribute.hpp +142 -0
  37. peclet_halo-1.1.0/include/peclet/core/decomp/morton_indexer.hpp +88 -0
  38. peclet_halo-1.1.0/include/peclet/core/domain.hpp +242 -0
  39. peclet_halo-1.1.0/include/peclet/core/field/field_set.hpp +96 -0
  40. peclet_halo-1.1.0/include/peclet/core/geom/body_properties.hpp +400 -0
  41. peclet_halo-1.1.0/include/peclet/core/geom/device_scene.hpp +290 -0
  42. peclet_halo-1.1.0/include/peclet/core/geom/grid_sdf.hpp +85 -0
  43. peclet_halo-1.1.0/include/peclet/core/geom/primitives.hpp +442 -0
  44. peclet_halo-1.1.0/include/peclet/core/geom/quadrature.hpp +323 -0
  45. peclet_halo-1.1.0/include/peclet/core/geom/scene.hpp +511 -0
  46. peclet_halo-1.1.0/include/peclet/core/geom/scene_builder.hpp +467 -0
  47. peclet_halo-1.1.0/include/peclet/core/geom/scene_query.hpp +1103 -0
  48. peclet_halo-1.1.0/include/peclet/core/geom/sdf.hpp +107 -0
  49. peclet_halo-1.1.0/include/peclet/core/geom/vti_io.hpp +155 -0
  50. peclet_halo-1.1.0/include/peclet/core/halo/grid_halo.hpp +325 -0
  51. peclet_halo-1.1.0/include/peclet/core/halo/grid_halo_topology.hpp +441 -0
  52. peclet_halo-1.1.0/include/peclet/core/halo/nbx.hpp +153 -0
  53. peclet_halo-1.1.0/include/peclet/core/halo/particle_halo.hpp +235 -0
  54. peclet_halo-1.1.0/include/peclet/core/halo/particle_halo_topology.hpp +305 -0
  55. peclet_halo-1.1.0/include/peclet/core/halo/particle_migrator.hpp +321 -0
  56. peclet_halo-1.1.0/include/peclet/core/halo/particle_migrator_view.hpp +292 -0
  57. peclet_halo-1.1.0/include/peclet/core/halo/particle_rebalance.hpp +70 -0
  58. peclet_halo-1.1.0/include/peclet/core/interp/particle_grid.hpp +114 -0
  59. peclet_halo-1.1.0/include/peclet/core/python/kokkos_teardown.hpp +149 -0
  60. peclet_halo-1.1.0/include/peclet/core/python/ndarray_interop.hpp +197 -0
  61. peclet_halo-1.1.0/include/peclet/core/scheme/cut_cell_closure.hpp +133 -0
  62. peclet_halo-1.1.0/include/peclet/core/scheme/ghost_closure.hpp +236 -0
  63. peclet_halo-1.1.0/include/peclet/core/solver/coloring.hpp +101 -0
  64. peclet_halo-1.1.0/include/peclet/core/solver/csr_bicgstab.hpp +244 -0
  65. peclet_halo-1.1.0/include/peclet/core/solver/csr_operator.hpp +130 -0
  66. peclet_halo-1.1.0/include/peclet/core/solver/face_csr.hpp +141 -0
  67. peclet_halo-1.1.0/include/peclet/core/solver/graph_amg.hpp +620 -0
  68. peclet_halo-1.1.0/include/peclet/core/solver/graph_amg_device.hpp +289 -0
  69. peclet_halo-1.1.0/include/peclet/core/solver/vector_ops.hpp +51 -0
  70. peclet_halo-1.1.0/include/peclet/core/vof/curvature.hpp +865 -0
  71. peclet_halo-1.1.0/include/peclet/core/vof/cutcell.hpp +226 -0
  72. peclet_halo-1.1.0/include/peclet/core/vof/plic.hpp +617 -0
  73. peclet_halo-1.1.0/include/peclet/core/vof/wetting.hpp +333 -0
  74. peclet_halo-1.1.0/packaging/pyproject-core.toml +55 -0
  75. peclet_halo-1.1.0/packaging/shell/core_geom.py +9 -0
  76. peclet_halo-1.1.0/packaging/shell/core_init.py +25 -0
  77. peclet_halo-1.1.0/packaging/shell/core_mpi.py +9 -0
  78. peclet_halo-1.1.0/pyproject.toml +71 -0
  79. peclet_halo-1.1.0/python/CMakeLists.txt +112 -0
  80. peclet_halo-1.1.0/python/halo_bindings.cpp +310 -0
  81. peclet_halo-1.1.0/python/packaging/_halo.pyi +103 -0
  82. peclet_halo-1.1.0/python/packaging/core_init.py +25 -0
  83. peclet_halo-1.1.0/python/packaging/halo_init.py +23 -0
  84. peclet_halo-1.1.0/python/state_hash.py +194 -0
  85. peclet_halo-1.1.0/python/state_hash_reference.json +13 -0
  86. peclet_halo-1.1.0/python/test_mpi.py +110 -0
  87. peclet_halo-1.1.0/tests/CMakeLists.txt +257 -0
  88. peclet_halo-1.1.0/tests/data/rcp_pack_seed3_unit.txt +181 -0
  89. peclet_halo-1.1.0/tests/python/CMakeLists.txt +41 -0
  90. peclet_halo-1.1.0/tests/python/interop_test_module.cpp +68 -0
  91. peclet_halo-1.1.0/tests/python/test_ndarray_interop.py +77 -0
  92. peclet_halo-1.1.0/tests/test_cpu_budget.cpp +127 -0
  93. peclet_halo-1.1.0/tests/test_csr_solver.cpp +263 -0
  94. peclet_halo-1.1.0/tests/test_cut_cell_closure.cpp +100 -0
  95. peclet_halo-1.1.0/tests/test_decomposition.cpp +347 -0
  96. peclet_halo-1.1.0/tests/test_diffusion.cpp +161 -0
  97. peclet_halo-1.1.0/tests/test_diffusion_sdf.cpp +146 -0
  98. peclet_halo-1.1.0/tests/test_domain.cpp +156 -0
  99. peclet_halo-1.1.0/tests/test_field_set.cpp +73 -0
  100. peclet_halo-1.1.0/tests/test_geom_batch_device.cpp +269 -0
  101. peclet_halo-1.1.0/tests/test_geom_body.cpp +237 -0
  102. peclet_halo-1.1.0/tests/test_geom_owner.cpp +344 -0
  103. peclet_halo-1.1.0/tests/test_geom_primitives.cpp +216 -0
  104. peclet_halo-1.1.0/tests/test_geom_properties.cpp +436 -0
  105. peclet_halo-1.1.0/tests/test_geom_quadrature.cpp +232 -0
  106. peclet_halo-1.1.0/tests/test_geom_scene.cpp +352 -0
  107. peclet_halo-1.1.0/tests/test_geom_scene_builder.cpp +244 -0
  108. peclet_halo-1.1.0/tests/test_geom_scene_query.cpp +379 -0
  109. peclet_halo-1.1.0/tests/test_geom_tree_grad.cpp +223 -0
  110. peclet_halo-1.1.0/tests/test_ghost_particles_mpi.cpp +143 -0
  111. peclet_halo-1.1.0/tests/test_graph_amg.cpp +167 -0
  112. peclet_halo-1.1.0/tests/test_graph_amg_device.cpp +113 -0
  113. peclet_halo-1.1.0/tests/test_grid_halo.cpp +170 -0
  114. peclet_halo-1.1.0/tests/test_grid_halo_exchange.cpp +146 -0
  115. peclet_halo-1.1.0/tests/test_grid_redistribute_mpi.cpp +112 -0
  116. peclet_halo-1.1.0/tests/test_host_parallel.cpp +117 -0
  117. peclet_halo-1.1.0/tests/test_morton_indexer.cpp +86 -0
  118. peclet_halo-1.1.0/tests/test_nbx_rounds.cpp +138 -0
  119. peclet_halo-1.1.0/tests/test_particle_grid.cpp +104 -0
  120. peclet_halo-1.1.0/tests/test_particle_halo_exchange.cpp +148 -0
  121. peclet_halo-1.1.0/tests/test_particle_halo_mpi.cpp +242 -0
  122. peclet_halo-1.1.0/tests/test_particle_migration.cpp +125 -0
  123. peclet_halo-1.1.0/tests/test_particle_migrator_view_mpi.cpp +168 -0
  124. peclet_halo-1.1.0/tests/test_particle_rebalance.cpp +168 -0
  125. peclet_halo-1.1.0/tests/test_sdf.cpp +70 -0
  126. peclet_halo-1.1.0/tests/test_skip_mpi.hpp +31 -0
  127. peclet_halo-1.1.0/tests/test_util.hpp +46 -0
  128. peclet_halo-1.1.0/tests/test_vti.cpp +72 -0
  129. peclet_halo-1.1.0/tools/cuda_aware_mpi_check.cpp +59 -0
  130. peclet_halo-1.1.0/tools/cudampi-env.sh +12 -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,24 @@
1
+ name: Bug report
2
+ description: Report a problem with this Peclet package
3
+ labels: [bug]
4
+ body:
5
+ - type: textarea
6
+ id: what
7
+ attributes:
8
+ label: What happened?
9
+ description: What you did, what you expected, and what actually happened.
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: repro
14
+ attributes:
15
+ label: Minimal reproducer
16
+ description: Smallest script/inputs that reproduce it (grid size, backend, np).
17
+ render: shell
18
+ - type: input
19
+ id: env
20
+ attributes:
21
+ label: Environment
22
+ description: OS, compiler, Kokkos backend (Serial/OpenMP/CUDA/HIP), GPU/MPI, package version.
23
+ validations:
24
+ required: true
@@ -0,0 +1,15 @@
1
+ name: Feature request
2
+ description: Suggest an idea or improvement
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: problem
7
+ attributes:
8
+ label: Problem / motivation
9
+ description: What are you trying to do that is hard today?
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: proposal
14
+ attributes:
15
+ label: Proposed solution
@@ -0,0 +1,10 @@
1
+ ## Summary
2
+ <!-- What does this change and why? -->
3
+
4
+ ## Testing
5
+ <!-- How did you validate? tests run, np=1,2,4 for MPI, validator scripts + numbers -->
6
+
7
+ ## Checklist
8
+ - [ ] Follows the suite style (clang-format clean for C++)
9
+ - [ ] Added/ran a test or validator
10
+ - [ ] Numerical method unchanged (or the change is intentional and documented)
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
@@ -0,0 +1,187 @@
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. Three configurations:
5
+ #
6
+ # cpp header-only core + MPI, gcc/clang x Debug/Release, WITH the morton sibling (so the
7
+ # morton_indexer test runs; before 2026-09 CI never provided morton). Serial + MPI
8
+ # np=1,2,4.
9
+ # kokkos-openmp the portable Kokkos path (OpenMP + Serial host backend, Kokkos 5.1.1 cached) —
10
+ # device halo, device geometry, the face-CSR solver layer — plus the Python modules
11
+ # (peclet.core.{mpi,geom}) with their test scripts as ctests.
12
+ # no-mpi PECLET_CORE_ENABLE_MPI=OFF: the single-rank mpi_stub halo layer.
13
+ #
14
+ # What is NOT run here, and why (nothing is hidden — `ctest -N` lists it all):
15
+ # * label np8 the 8-rank instances: hosted runners have 4 cores and the oversubscribed np=8
16
+ # halo tests hung there (CLAUDE.md, NBX tag race history). np=8 is a LOCAL gate.
17
+ # * label bench the halo benchmark (bench_halo): timings, no correctness gate.
18
+ # * GPU backends (CUDA/HIP): no GPU on free runners; covered by the consumer codes' local batteries.
19
+ #
20
+ # Thread bounds: the hosted runner has 4 cores / 16 GB. Single-rank suites run with
21
+ # OMP_NUM_THREADS=2, the MPI suites with OMP_NUM_THREADS=1 (np=4 x 1 thread), ctest -j1 throughout —
22
+ # an unbounded OpenMP pool under mpirun starved a runner into "lost communication" in flow's CI.
23
+
24
+ on:
25
+ push:
26
+ branches: [main, "**"]
27
+ pull_request:
28
+ workflow_dispatch:
29
+
30
+ env:
31
+ KOKKOS_TAG: "5.1.1" # keep in lockstep with ../tools/bootstrap_deps.sh
32
+ MORTON_TAG: "v0.2.1" # keep in lockstep with flow/cmake/PecletDeps.cmake (PECLET_MORTON_TAG)
33
+ NANOBIND_VERSION: "2.13.0"
34
+ OMPI_ALLOW_RUN_AS_ROOT: 1
35
+ OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
36
+ # Allow OpenMPI to oversubscribe should the runner ever have fewer cores than np=4.
37
+ OMPI_MCA_rmaps_base_oversubscribe: 1
38
+ PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe"
39
+ OMP_PROC_BIND: "false"
40
+ CTEST_OUTPUT_ON_FAILURE: 1
41
+
42
+ jobs:
43
+ cpp:
44
+ name: ubuntu / ${{ matrix.compiler }} / MPI + morton / ${{ matrix.build_type }}
45
+ runs-on: ubuntu-latest
46
+ strategy:
47
+ fail-fast: false
48
+ matrix:
49
+ # `compiler` is a matrix axis so the include entries only ADD cc/cxx to each combination.
50
+ # (An include with keys outside the matrix overwrites: the previous form silently produced
51
+ # two clang jobs and no gcc job.)
52
+ compiler: [gcc, clang]
53
+ build_type: [Debug, Release]
54
+ include:
55
+ - compiler: gcc
56
+ cc: gcc
57
+ cxx: g++
58
+ - compiler: clang
59
+ cc: clang
60
+ cxx: clang++
61
+ env:
62
+ CC: ${{ matrix.cc }}
63
+ CXX: ${{ matrix.cxx }}
64
+ steps:
65
+ # Sibling layout, exactly as in the suite checkout: core/CMakeLists.txt auto-detects ../morton.
66
+ - uses: actions/checkout@v4
67
+ with:
68
+ path: core
69
+ - name: Checkout morton (pinned tag)
70
+ uses: actions/checkout@v4
71
+ with:
72
+ repository: computational-chemical-engineering/peclet-morton
73
+ ref: ${{ env.MORTON_TAG }}
74
+ path: morton
75
+
76
+ - name: Install MPI
77
+ run: |
78
+ sudo apt-get update
79
+ sudo apt-get install -y libopenmpi-dev openmpi-bin
80
+
81
+ - name: Configure
82
+ run: cmake -S core -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
83
+
84
+ - name: Build
85
+ run: cmake --build build -j
86
+
87
+ - name: Test (serial + MPI np=1,2,4; np8 + bench excluded, see header)
88
+ run: |
89
+ ctest --test-dir build -N
90
+ OMP_NUM_THREADS=1 ctest --test-dir build -LE "np8|bench" --timeout 1200 --output-on-failure -j1
91
+
92
+ kokkos-openmp:
93
+ name: ubuntu / gcc / Kokkos OpenMP + MPI + morton + Python / Release
94
+ runs-on: ubuntu-latest
95
+ steps:
96
+ - uses: actions/checkout@v4
97
+ with:
98
+ path: core
99
+ - name: Checkout morton (pinned tag)
100
+ uses: actions/checkout@v4
101
+ with:
102
+ repository: computational-chemical-engineering/peclet-morton
103
+ ref: ${{ env.MORTON_TAG }}
104
+ path: morton
105
+
106
+ - name: Install toolchain
107
+ run: |
108
+ sudo apt-get update
109
+ sudo apt-get install -y cmake ninja-build libomp-dev libopenmpi-dev openmpi-bin \
110
+ python3-dev python3-pip
111
+ # nanobind is located through the interpreter (cmake/SuiteNanobind.cmake); mpi4py builds
112
+ # against the apt OpenMPI just installed (same MPI the modules link).
113
+ python3 -m pip install "nanobind==${NANOBIND_VERSION}" numpy pytest mpi4py
114
+
115
+ - name: Cache Kokkos install
116
+ id: kokkos-cache
117
+ uses: actions/cache@v4
118
+ with:
119
+ path: ${{ github.workspace }}/kokkos-install
120
+ key: kokkos-${{ env.KOKKOS_TAG }}-openmp-cxx20-${{ runner.os }}
121
+
122
+ - name: Build Kokkos (OpenMP + Serial)
123
+ if: steps.kokkos-cache.outputs.cache-hit != 'true'
124
+ run: |
125
+ git clone --depth 1 --branch "$KOKKOS_TAG" https://github.com/kokkos/kokkos.git /tmp/kokkos
126
+ cmake -S /tmp/kokkos -B /tmp/kokkos/build -G Ninja \
127
+ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 \
128
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
129
+ -DKokkos_ENABLE_OPENMP=ON -DKokkos_ENABLE_SERIAL=ON \
130
+ -DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/kokkos-install"
131
+ cmake --build /tmp/kokkos/build -j
132
+ cmake --install /tmp/kokkos/build
133
+
134
+ - name: Configure (PECLET_CORE_ENABLE_KOKKOS=ON)
135
+ run: |
136
+ cmake -S core -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
137
+ -DPECLET_CORE_ENABLE_KOKKOS=ON \
138
+ -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/kokkos-install"
139
+
140
+ - name: Build
141
+ run: cmake --build build -j
142
+
143
+ - name: Test single-rank (OMP_NUM_THREADS=2)
144
+ run: |
145
+ ctest --test-dir build -N
146
+ OMP_NUM_THREADS=2 ctest --test-dir build -LE "mpi|bench" --timeout 1200 --output-on-failure -j1
147
+
148
+ - name: Test MPI np=1,2,4 (OMP_NUM_THREADS=1; np8 excluded, see header)
149
+ run: OMP_NUM_THREADS=1 ctest --test-dir build -L mpi -LE "np8|bench" --timeout 1200 --output-on-failure -j1
150
+
151
+ - name: Build the Python modules (peclet.core.mpi / geom)
152
+ run: |
153
+ cmake -S core/python -B build_py -G Ninja -DCMAKE_BUILD_TYPE=Release \
154
+ -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/kokkos-install" \
155
+ -DPython_EXECUTABLE="$(which python3)"
156
+ cmake --build build_py -j
157
+ PYTHONPATH=$PWD/build_py python3 -c "import peclet.core.mpi, peclet.core.geom; print('peclet.core import OK')"
158
+
159
+ - name: Test Python (test_mpi.py np=1,2,4; state_hash; ndarray interop)
160
+ run: |
161
+ ctest --test-dir build_py -N
162
+ OMP_NUM_THREADS=1 ctest --test-dir build_py -LE np8 --timeout 1200 --output-on-failure -j1
163
+
164
+ no-mpi:
165
+ name: ubuntu / gcc / no MPI (mpi_stub) + morton / Release
166
+ runs-on: ubuntu-latest
167
+ steps:
168
+ - uses: actions/checkout@v4
169
+ with:
170
+ path: core
171
+ - name: Checkout morton (pinned tag)
172
+ uses: actions/checkout@v4
173
+ with:
174
+ repository: computational-chemical-engineering/peclet-morton
175
+ ref: ${{ env.MORTON_TAG }}
176
+ path: morton
177
+
178
+ - name: Configure (PECLET_CORE_ENABLE_MPI=OFF)
179
+ run: cmake -S core -B build -DCMAKE_BUILD_TYPE=Release -DPECLET_CORE_ENABLE_MPI=OFF
180
+
181
+ - name: Build
182
+ run: cmake --build build -j
183
+
184
+ - name: Test (single-rank stub)
185
+ run: |
186
+ ctest --test-dir build -N
187
+ OMP_NUM_THREADS=2 ctest --test-dir build -LE bench --timeout 1200 --output-on-failure -j1
@@ -0,0 +1,50 @@
1
+ name: Documentation
2
+
3
+ # Build the Doxygen API docs (README.md + the header-only C++20 API in include/) and
4
+ # 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
+ - 'docs/**'
13
+ - 'README.md'
14
+ - '.github/workflows/docs.yml'
15
+ workflow_dispatch:
16
+
17
+ permissions:
18
+ contents: read
19
+ pages: write
20
+ id-token: write
21
+
22
+ # allow one concurrent deployment; cancel an in-progress run for a newer push
23
+ concurrency:
24
+ group: pages
25
+ cancel-in-progress: true
26
+
27
+ jobs:
28
+ build:
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ - name: Install Doxygen + Graphviz
33
+ run: sudo apt-get update && sudo apt-get install -y doxygen graphviz
34
+ - name: Build documentation
35
+ run: doxygen docs/Doxyfile
36
+ - name: Upload Pages artifact
37
+ uses: actions/upload-pages-artifact@v5
38
+ with:
39
+ path: docs/html
40
+
41
+ deploy:
42
+ needs: build
43
+ runs-on: ubuntu-latest
44
+ environment:
45
+ name: github-pages
46
+ url: ${{ steps.deployment.outputs.page_url }}
47
+ steps:
48
+ - name: Deploy to GitHub Pages
49
+ id: deployment
50
+ 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 (since 2026-09-08, suite/docs/QUALITY_PLAN.md §3.D.7): clang-format is pinned to 18.1.8
5
+ # (the suite venv's version, installed from PyPI as morton does — the apt package drifts) and the tree
6
+ # is formatted against the suite-wide 62-line .clang-format over the whole tree (the AMR subtree that
7
+ # was excluded until 2026-09-10 is the peclet-amr package now).
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,legacy,notebooks"
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,67 @@
1
+ name: Release
2
+
3
+ # Publish peclet-core to PyPI on a version tag via Trusted Publishing (OIDC) — configure the publisher
4
+ # on PyPI first; no API token secret needed. SDIST ONLY: peclet-core's Python surface is the MPI particle
5
+ # halo (peclet.core.mpi), which links MPI, whose ABI makes a portable binary wheel impossible (the
6
+ # Kokkos AMR octree is the peclet-amr package since 2026-09-10). Consumers `pip install peclet-core`
7
+ # and build against their site MPI, or use the suite containers. See ../docs/RELEASE.md.
8
+
9
+ on:
10
+ push:
11
+ tags: ["v*"]
12
+ workflow_dispatch:
13
+
14
+ jobs:
15
+ sdist:
16
+ name: sdist - peclet-halo
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@v7
26
+ with:
27
+ name: sdist
28
+ path: dist/*.tar.gz
29
+
30
+ # This repository publishes TWO distributions since the boundary split
31
+ # (suite/docs/CORE_BOUNDARY.md): peclet-halo from pyproject.toml above, and the pure-Python
32
+ # peclet-core compatibility SHELL from packaging/pyproject-core.toml, which keeps
33
+ # `import peclet.core.{geom,mpi}` working until 2.0.0. Same `cp packaging/... pyproject.toml`
34
+ # pattern the umbrella uses for peclet-cu13.
35
+ shell:
36
+ name: wheel+sdist - peclet-core (compatibility shell)
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - uses: actions/setup-python@v6
41
+ with:
42
+ python-version: "3.12"
43
+ - run: pip install build
44
+ - name: Build the shell from packaging/pyproject-core.toml
45
+ run: |
46
+ cp packaging/pyproject-core.toml pyproject.toml
47
+ python -m build # pure Python: wheel + sdist, no compiler needed
48
+ - uses: actions/upload-artifact@v7
49
+ with:
50
+ name: shell
51
+ path: |
52
+ dist/*.whl
53
+ dist/*.tar.gz
54
+
55
+ publish:
56
+ needs: [sdist, shell]
57
+ runs-on: ubuntu-latest
58
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
59
+ environment: pypi
60
+ permissions:
61
+ id-token: write # required for trusted publishing
62
+ steps:
63
+ - uses: actions/download-artifact@v8
64
+ with:
65
+ path: dist
66
+ merge-multiple: true
67
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,17 @@
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
+
16
+ # Build / configure logs (build_td_*.log and friends)
17
+ *.log
@@ -0,0 +1,37 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it using the metadata below."
3
+ title: "peclet-core: shared infrastructure for GPU-accelerated, parallel transport-phenomena simulation"
4
+ abstract: >-
5
+ Header-only C++20 + MPI infrastructure shared across the peclet suite: ORB block domain decomposition,
6
+ asynchronous ghost-layer exchange (NBX + persistent neighborhood-collective engines, GPU-resident
7
+ variant), Lagrangian particle migration and ghosts, SDF geometry with VTI I/O, an AMR octree, and
8
+ dynamic (weighted-ORB) load balancing. Optional Kokkos GPU backends and Python bindings.
9
+ type: software
10
+ authors:
11
+ - family-names: Peters
12
+ given-names: "E.A.J.F."
13
+ alias: Frank
14
+ orcid: "https://orcid.org/0000-0001-6099-3583"
15
+ email: e.a.j.f.peters@tue.nl
16
+ affiliation: "Eindhoven University of Technology"
17
+ version: 1.0.2
18
+ date-released: 2026-09-16
19
+ license: MIT
20
+ doi: 10.5281/zenodo.21132435
21
+ identifiers:
22
+ - type: doi
23
+ value: 10.5281/zenodo.21132435
24
+ description: "Concept DOI (all versions) — always resolves to the latest release"
25
+ - type: doi
26
+ value: 10.5281/zenodo.21132436
27
+ description: "Version DOI for v0.2.0"
28
+ repository-code: "https://github.com/computational-chemical-engineering/peclet-core"
29
+ keywords:
30
+ - domain decomposition
31
+ - MPI
32
+ - ghost-layer exchange
33
+ - signed distance function
34
+ - adaptive mesh refinement
35
+ - load balancing
36
+ - Kokkos
37
+ - GPU computing