peclet-voro 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.
- peclet_voro-0.1.0/.clang-format +62 -0
- peclet_voro-0.1.0/.clang-tidy +120 -0
- peclet_voro-0.1.0/.github/agents/scientific-coder.agent.md +65 -0
- peclet_voro-0.1.0/.github/workflows/ci.yml +126 -0
- peclet_voro-0.1.0/.github/workflows/docs.yml +71 -0
- peclet_voro-0.1.0/.github/workflows/release.yml +53 -0
- peclet_voro-0.1.0/.gitignore +51 -0
- peclet_voro-0.1.0/CMakeLists.txt +219 -0
- peclet_voro-0.1.0/LICENSE +21 -0
- peclet_voro-0.1.0/PKG-INFO +241 -0
- peclet_voro-0.1.0/README.md +227 -0
- peclet_voro-0.1.0/cmake/PecletDeps.cmake +123 -0
- peclet_voro-0.1.0/cmake/voroConfig.cmake.in +7 -0
- peclet_voro-0.1.0/docs/Doxyfile +1781 -0
- peclet_voro-0.1.0/docs/create_document.py +92 -0
- peclet_voro-0.1.0/docs/distributed_voronoi.md +99 -0
- peclet_voro-0.1.0/docs/dynamic_update_decision_and_plan.md +260 -0
- peclet_voro-0.1.0/docs/dynamic_update_phase01_results.md +89 -0
- peclet_voro-0.1.0/docs/dynamic_update_phase2_results.md +82 -0
- peclet_voro-0.1.0/docs/dynamic_update_phase34_results.md +105 -0
- peclet_voro-0.1.0/docs/dynamic_update_repair_sweep.md +191 -0
- peclet_voro-0.1.0/docs/figs/repair_cert_speedup.png +0 -0
- peclet_voro-0.1.0/docs/figs/repair_passfrac.png +0 -0
- peclet_voro-0.1.0/docs/figs/repair_speedup.png +0 -0
- peclet_voro-0.1.0/docs/figs/report/cold_throughput.png +0 -0
- peclet_voro-0.1.0/docs/figs/report/mpi_scaling.png +0 -0
- peclet_voro-0.1.0/docs/figs/report/repair_accuracy.png +0 -0
- peclet_voro-0.1.0/docs/figs/report/repair_speedup.png +0 -0
- peclet_voro-0.1.0/docs/figs/report/repair_throughput.png +0 -0
- peclet_voro-0.1.0/docs/figs/report/repair_workfraction.png +0 -0
- peclet_voro-0.1.0/docs/full_port_plan.md +125 -0
- peclet_voro-0.1.0/docs/mainpage.dox +60 -0
- peclet_voro-0.1.0/docs/performance.md +386 -0
- peclet_voro-0.1.0/docs/performance_report.md +340 -0
- peclet_voro-0.1.0/docs/power_cell_solver_spec.md +85 -0
- peclet_voro-0.1.0/docs/sdf_geometry_plan.md +115 -0
- peclet_voro-0.1.0/docs/update_and_repair_redesign.md +97 -0
- peclet_voro-0.1.0/docs/voronoi_build_plan.md +546 -0
- peclet_voro-0.1.0/docs/voronoi_cold_tessellation_benchmark.md +128 -0
- peclet_voro-0.1.0/docs/voronoi_coldbuild_benchmark_report.md +201 -0
- peclet_voro-0.1.0/docs/voronoi_construct_ledger.md +201 -0
- peclet_voro-0.1.0/docs/voronoi_cpu_migration_discussion.md +99 -0
- peclet_voro-0.1.0/docs/voronoi_dynamic_update_study.md +166 -0
- peclet_voro-0.1.0/docs/voronoi_gpu_research_program.md +314 -0
- peclet_voro-0.1.0/docs/voronoi_neighbor_update_overview.md +403 -0
- peclet_voro-0.1.0/docs/voronoi_pervertex_geometry_report.md +163 -0
- peclet_voro-0.1.0/docs/voronoi_simd_cells_prototype.md +129 -0
- peclet_voro-0.1.0/docs/voronoi_worklist_gather_project.md +134 -0
- peclet_voro-0.1.0/extern_bench/.gitignore +4 -0
- peclet_voro-0.1.0/extern_bench/bench_geogram.cpp +183 -0
- peclet_voro-0.1.0/extern_bench/build.sh +14 -0
- peclet_voro-0.1.0/extern_bench/prelude.h +20 -0
- peclet_voro-0.1.0/extern_bench/shim/Kokkos_Core.hpp +8 -0
- peclet_voro-0.1.0/extern_bench/voro_gpu_bench.md +31 -0
- peclet_voro-0.1.0/extern_bench/voro_gpu_bench_gen_box.py +28 -0
- peclet_voro-0.1.0/include/peclet/voro/convex_cell.hpp +1597 -0
- peclet_voro-0.1.0/include/peclet/voro/dynamic_validate.hpp +243 -0
- peclet_voro-0.1.0/include/peclet/voro/mpi/voronoi_halo.hpp +168 -0
- peclet_voro-0.1.0/include/peclet/voro/physics/euler_pressure.hpp +72 -0
- peclet_voro-0.1.0/include/peclet/voro/physics/interface.hpp +56 -0
- peclet_voro-0.1.0/include/peclet/voro/physics/simulation.hpp +195 -0
- peclet_voro-0.1.0/include/peclet/voro/physics/viscous.hpp +151 -0
- peclet_voro-0.1.0/include/peclet/voro/plane_policy.hpp +81 -0
- peclet_voro-0.1.0/include/peclet/voro/reeval_tessellation.hpp +145 -0
- peclet_voro-0.1.0/include/peclet/voro/repair.hpp +715 -0
- peclet_voro-0.1.0/include/peclet/voro/sdf.hpp +224 -0
- peclet_voro-0.1.0/include/peclet/voro/subset_gather.hpp +156 -0
- peclet_voro-0.1.0/include/peclet/voro/tess_grid.hpp +357 -0
- peclet_voro-0.1.0/include/peclet/voro/tessellation_view.hpp +191 -0
- peclet_voro-0.1.0/include/peclet/voro/tessellator.hpp +586 -0
- peclet_voro-0.1.0/include/peclet/voro/topology_store.hpp +116 -0
- peclet_voro-0.1.0/include/peclet/voro/transpose.hpp +81 -0
- peclet_voro-0.1.0/include/peclet/voro/verlet_skin.hpp +122 -0
- peclet_voro-0.1.0/include/peclet/voro/voronoi.zip +0 -0
- peclet_voro-0.1.0/mpi/README.md +21 -0
- peclet_voro-0.1.0/mpi/validate_voronoi.py +89 -0
- peclet_voro-0.1.0/mpi/validate_voronoi_dynamics.py +103 -0
- peclet_voro-0.1.0/mpi/validate_voronoi_scheme_c.py +151 -0
- peclet_voro-0.1.0/packaging/voro_init.py +17 -0
- peclet_voro-0.1.0/pyproject.toml +62 -0
- peclet_voro-0.1.0/python/test_voro.py +76 -0
- peclet_voro-0.1.0/src/voro_bindings.cpp +382 -0
- peclet_voro-0.1.0/tests/kokkos/CMakeLists.txt +123 -0
- peclet_voro-0.1.0/tests/kokkos/bench_construct.cpp +178 -0
- peclet_voro-0.1.0/tests/kokkos/bench_convexcell.cpp +722 -0
- peclet_voro-0.1.0/tests/kokkos/bench_dynamic_update.cpp +1244 -0
- peclet_voro-0.1.0/tests/kokkos/bench_incremental.cpp +945 -0
- peclet_voro-0.1.0/tests/kokkos/bench_report.cpp +269 -0
- peclet_voro-0.1.0/tests/kokkos/test_convexcell_adj.cpp +253 -0
- peclet_voro-0.1.0/tests/kokkos/test_convexcell_unit.cpp +222 -0
- peclet_voro-0.1.0/tests/kokkos/test_kokkos_smoke.cpp +56 -0
- peclet_voro-0.1.0/tests/kokkos/test_pervertex_geometry.cpp +450 -0
- peclet_voro-0.1.0/tests/kokkos/test_tessellation_invariants.cpp +101 -0
- peclet_voro-0.1.0/tests/kokkos_mpi/CMakeLists.txt +45 -0
- peclet_voro-0.1.0/tests/kokkos_mpi/bench_repair_mpi.cpp +270 -0
- peclet_voro-0.1.0/tests/kokkos_mpi/bench_voronoi_mpi.cpp +188 -0
- peclet_voro-0.1.0/tools/check_include_graph.sh +76 -0
- peclet_voro-0.1.0/tools/clang_format_check.sh +25 -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.voro
|
|
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/voro/.*'
|
|
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,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Use when: writing C++ or CUDA simulation code, CFD methods, particle-based methods, Voronoi tessellations, neighbor lists, numerical solvers, performance optimization, GPU kernels, parallelization, MPI parallelization, scientific computing, physics-based simulations, computational fluid dynamics, DEM, SPH, lattice Boltzmann."
|
|
3
|
+
tools: [read, edit, search, execute, web, todo, agent]
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a scientific programmer with deep expertise in C++, CUDA, and Python. You specialize in computational fluid dynamics (CFD) and particle-based simulation methods (DEM, SPH, Voronoi-based dynamics). Your top priorities are **performance**, **computational efficiency**, and **physical correctness**.
|
|
8
|
+
|
|
9
|
+
## Priorities
|
|
10
|
+
|
|
11
|
+
1. **Physical correctness** — Simulations must reproduce the correct physics. Verify conservation laws, boundary conditions, and numerical stability.
|
|
12
|
+
2. **Performance** — Minimize unnecessary copies, prefer cache-friendly data layouts, use SIMD-friendly patterns, and exploit parallelism. Profile before optimizing.
|
|
13
|
+
3. **Code structure** — Clean separation of concerns. Header-only libraries where appropriate. Logical file and namespace organization.
|
|
14
|
+
4. **Documentation** — All C++ code uses Doxygen (`/** */` style) for classes, methods, and non-trivial members. All Python code uses high-quality docstrings (Google style).
|
|
15
|
+
|
|
16
|
+
## C++ Guidelines
|
|
17
|
+
|
|
18
|
+
- Follow the **Google C++ Style Guide** as the baseline.
|
|
19
|
+
- For any C++ edits, ensure the result is clang-format clean before finishing. Use the repo's `.clang-format` via `bash tools/clang_format_check.sh`.
|
|
20
|
+
- Match the CI formatter version. Prefer `clang-format-18`; if `clang-format-18` is not on `PATH`, set `CLANG_FORMAT_BIN` explicitly to a clang-format 18 binary before running the check.
|
|
21
|
+
- Do not stop after C++ changes until the clang-format check passes.
|
|
22
|
+
- Use modern C++ (C++17/20) idioms: `std::span`, structured bindings, `constexpr`, `if constexpr`, range-based loops.
|
|
23
|
+
- Prefer value semantics and move semantics over raw pointers.
|
|
24
|
+
- Use `Eigen` for linear algebra (vector/matrix ops, geometry). Prefer fixed-size matrices (`Eigen::Matrix3d`) in hot loops to avoid heap allocation.
|
|
25
|
+
- Use `Boost` utilities (e.g., `boost::multi_array`, `boost::geometry`, `boost::program_options`) when already in the project or when the standard library is insufficient.
|
|
26
|
+
- **MPI**: prefer non-blocking communication (`MPI_Isend`/`MPI_Irecv`) to overlap computation and communication. Use `MPI_Datatype` for structured sends. Always call `MPI_Finalize` on all error paths via RAII wrappers. Validate domain decomposition and halo exchange correctness before optimizing.
|
|
27
|
+
- Mark hot-path functions with `inline` or `__forceinline` / `__attribute__((always_inline))` where measured beneficial.
|
|
28
|
+
- Use `#pragma once` for header guards.
|
|
29
|
+
- Template metaprogramming only when it provides clear performance or correctness benefits.
|
|
30
|
+
- All public APIs documented with Doxygen: `@brief`, `@param`, `@return`, `@tparam` as needed.
|
|
31
|
+
|
|
32
|
+
## CUDA Guidelines
|
|
33
|
+
|
|
34
|
+
- Minimize host-device transfers; batch data movement.
|
|
35
|
+
- Use shared memory for frequently accessed data within thread blocks.
|
|
36
|
+
- Prefer coalesced global memory access patterns.
|
|
37
|
+
- Use `__restrict__` pointers in kernel arguments.
|
|
38
|
+
- Keep kernels focused — one computation per kernel unless fusion is measured faster.
|
|
39
|
+
- Use appropriate block sizes (multiples of warp size, typically 128 or 256).
|
|
40
|
+
- Error-check all CUDA API calls with a macro wrapper.
|
|
41
|
+
|
|
42
|
+
## Python Guidelines
|
|
43
|
+
|
|
44
|
+
- Write Pythonic code with type hints for function signatures.
|
|
45
|
+
- **NumPy**: use vectorized operations and broadcasting over explicit Python loops. Mind memory layout (`C`/`F` order) for performance.
|
|
46
|
+
- **SciPy**: prefer `scipy.sparse` for large sparse systems, `scipy.integrate` for ODE/PDE solving, `scipy.spatial` for spatial queries.
|
|
47
|
+
- **Numba**: use `@numba.njit` or `@numba.cuda.jit` for hot loops that cannot be vectorized with NumPy alone. Avoid Python objects inside JIT-compiled functions.
|
|
48
|
+
- **Matplotlib**: produce publication-quality plots with labeled axes, units, and colorbars. Use `plt.style.use` for consistent styling.
|
|
49
|
+
- Google-style docstrings with Args, Returns, and Raises sections.
|
|
50
|
+
- Use `dataclasses` or `pydantic` for structured data.
|
|
51
|
+
|
|
52
|
+
## Numerical Methods Awareness
|
|
53
|
+
|
|
54
|
+
- Be mindful of floating-point precision: prefer `double` for accumulations, use Kahan summation where needed.
|
|
55
|
+
- Verify that time integration schemes match the required order of accuracy.
|
|
56
|
+
- Check CFL / stability conditions when implementing explicit schemes.
|
|
57
|
+
- Ensure neighbor lists and spatial data structures handle periodic boundary conditions correctly.
|
|
58
|
+
|
|
59
|
+
## Constraints
|
|
60
|
+
|
|
61
|
+
- DO NOT sacrifice correctness for performance without explicit user approval.
|
|
62
|
+
- DO NOT add dependencies unless the user requests them or the project already uses them.
|
|
63
|
+
- DO NOT use `using namespace std;` in headers.
|
|
64
|
+
- DO NOT ignore compiler warnings — treat them as errors.
|
|
65
|
+
- ONLY optimize after profiling confirms a bottleneck; never speculate.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master, develop]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master, develop]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
# ── Kokkos device build & test ───────────────────────────────────────────────
|
|
14
|
+
# The library is the Kokkos device path; it depends on the core and morton
|
|
15
|
+
# sibling repos (checked out next to voro) and a Kokkos install. This builds the
|
|
16
|
+
# OpenMP backend from source and runs the device test suite.
|
|
17
|
+
kokkos-openmp:
|
|
18
|
+
name: Build & test (Kokkos OpenMP)
|
|
19
|
+
runs-on: ubuntu-24.04
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout voro
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
path: voro
|
|
27
|
+
|
|
28
|
+
- name: Checkout core (sibling)
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
repository: computational-chemical-engineering/peclet-core
|
|
32
|
+
path: core
|
|
33
|
+
|
|
34
|
+
- name: Checkout morton (sibling)
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
with:
|
|
37
|
+
repository: computational-chemical-engineering/peclet-morton
|
|
38
|
+
path: morton
|
|
39
|
+
|
|
40
|
+
- name: Install dependencies
|
|
41
|
+
run: |
|
|
42
|
+
sudo apt-get update -q
|
|
43
|
+
sudo apt-get install -y cmake ninja-build libomp-dev g++
|
|
44
|
+
|
|
45
|
+
- name: Build & install Kokkos (OpenMP + Serial)
|
|
46
|
+
run: |
|
|
47
|
+
git clone --depth 1 --branch 4.5.00 https://github.com/kokkos/kokkos.git /tmp/kokkos
|
|
48
|
+
cmake -S /tmp/kokkos -B /tmp/kokkos/build -G Ninja \
|
|
49
|
+
-DCMAKE_BUILD_TYPE=Release \
|
|
50
|
+
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos-install \
|
|
51
|
+
-DKokkos_ENABLE_OPENMP=ON \
|
|
52
|
+
-DKokkos_ENABLE_SERIAL=ON
|
|
53
|
+
cmake --build /tmp/kokkos/build --parallel
|
|
54
|
+
cmake --install /tmp/kokkos/build
|
|
55
|
+
|
|
56
|
+
- name: Configure (VORFLOW_KOKKOS=ON)
|
|
57
|
+
working-directory: voro
|
|
58
|
+
run: |
|
|
59
|
+
cmake -B build -G Ninja \
|
|
60
|
+
-DCMAKE_BUILD_TYPE=Release \
|
|
61
|
+
-DPECLET_VORO_KOKKOS=ON \
|
|
62
|
+
-DPECLET_VORO_BUILD_TESTS=ON \
|
|
63
|
+
-DCMAKE_PREFIX_PATH=$HOME/kokkos-install
|
|
64
|
+
|
|
65
|
+
- name: Build
|
|
66
|
+
working-directory: voro
|
|
67
|
+
run: cmake --build build --parallel
|
|
68
|
+
|
|
69
|
+
- name: Run device tests
|
|
70
|
+
working-directory: voro
|
|
71
|
+
run: |
|
|
72
|
+
export OMP_PROC_BIND=false
|
|
73
|
+
ctest --test-dir build \
|
|
74
|
+
-R "test_kokkos_smoke|test_tessellation_invariants|test_convexcell_unit|test_convexcell_adj|test_pervertex_geometry|test_include_graph|bench_dynamic_update_gates" \
|
|
75
|
+
--output-on-failure --timeout 600
|
|
76
|
+
|
|
77
|
+
# ── Format Check ─────────────────────────────────────────────────────────────
|
|
78
|
+
clang-format:
|
|
79
|
+
name: clang-format check
|
|
80
|
+
runs-on: ubuntu-24.04
|
|
81
|
+
permissions:
|
|
82
|
+
contents: read
|
|
83
|
+
steps:
|
|
84
|
+
- name: Checkout
|
|
85
|
+
uses: actions/checkout@v4
|
|
86
|
+
|
|
87
|
+
- name: Install clang-format
|
|
88
|
+
run: |
|
|
89
|
+
sudo apt-get update -q
|
|
90
|
+
sudo apt-get install -y clang-format-18
|
|
91
|
+
|
|
92
|
+
- name: Check formatting
|
|
93
|
+
run: |
|
|
94
|
+
CLANG_FORMAT_BIN=clang-format-18 bash tools/clang_format_check.sh
|
|
95
|
+
|
|
96
|
+
# ── Doxygen ──────────────────────────────────────────────────────────────────
|
|
97
|
+
documentation:
|
|
98
|
+
name: Doxygen documentation
|
|
99
|
+
runs-on: ubuntu-24.04
|
|
100
|
+
permissions:
|
|
101
|
+
contents: read
|
|
102
|
+
steps:
|
|
103
|
+
- name: Checkout
|
|
104
|
+
uses: actions/checkout@v4
|
|
105
|
+
|
|
106
|
+
- name: Install dependencies
|
|
107
|
+
run: |
|
|
108
|
+
sudo apt-get update -q
|
|
109
|
+
sudo apt-get install -y cmake ninja-build doxygen graphviz
|
|
110
|
+
|
|
111
|
+
- name: Configure CMake
|
|
112
|
+
run: |
|
|
113
|
+
cmake -B build \
|
|
114
|
+
-DCMAKE_BUILD_TYPE=Release \
|
|
115
|
+
-DPECLET_VORO_BUILD_TESTS=OFF \
|
|
116
|
+
-DPECLET_VORO_BUILD_DOCS=ON \
|
|
117
|
+
-G Ninja
|
|
118
|
+
|
|
119
|
+
- name: Build documentation
|
|
120
|
+
run: cmake --build build --target docs
|
|
121
|
+
|
|
122
|
+
- name: Upload documentation
|
|
123
|
+
uses: actions/upload-artifact@v4
|
|
124
|
+
with:
|
|
125
|
+
name: doxygen-html
|
|
126
|
+
path: build/docs/html
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Doxygen Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
# Only one deployment can run at a time; cancel in-progress runs if a new one
|
|
9
|
+
# is triggered so that the published site always reflects the latest commit.
|
|
10
|
+
concurrency:
|
|
11
|
+
group: pages
|
|
12
|
+
cancel-in-progress: false
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
# ── Build HTML documentation ──────────────────────────────────────────────
|
|
19
|
+
build:
|
|
20
|
+
name: Build documentation
|
|
21
|
+
runs-on: ubuntu-24.04
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
sudo apt-get update -q
|
|
32
|
+
sudo apt-get install -y \
|
|
33
|
+
cmake \
|
|
34
|
+
ninja-build \
|
|
35
|
+
libboost-dev \
|
|
36
|
+
doxygen \
|
|
37
|
+
graphviz
|
|
38
|
+
|
|
39
|
+
- name: Configure CMake
|
|
40
|
+
run: |
|
|
41
|
+
cmake -B build \
|
|
42
|
+
-DCMAKE_BUILD_TYPE=Release \
|
|
43
|
+
-DPECLET_VORO_BUILD_TESTS=OFF \
|
|
44
|
+
-DPECLET_VORO_BUILD_DOCS=ON \
|
|
45
|
+
-G Ninja
|
|
46
|
+
|
|
47
|
+
- name: Build Doxygen HTML
|
|
48
|
+
run: cmake --build build --target docs
|
|
49
|
+
|
|
50
|
+
- name: Upload Pages artifact
|
|
51
|
+
uses: actions/upload-pages-artifact@v3
|
|
52
|
+
with:
|
|
53
|
+
path: build/docs/html
|
|
54
|
+
jekyll: false
|
|
55
|
+
|
|
56
|
+
# ── Deploy to GitHub Pages ────────────────────────────────────────────────
|
|
57
|
+
deploy:
|
|
58
|
+
name: Deploy to GitHub Pages
|
|
59
|
+
runs-on: ubuntu-24.04
|
|
60
|
+
needs: build
|
|
61
|
+
permissions:
|
|
62
|
+
pages: write
|
|
63
|
+
id-token: write
|
|
64
|
+
environment:
|
|
65
|
+
name: github-pages
|
|
66
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
67
|
+
|
|
68
|
+
steps:
|
|
69
|
+
- name: Deploy to GitHub Pages
|
|
70
|
+
id: deployment
|
|
71
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Build the sdist + self-contained OpenMP CPU wheels and publish to PyPI (peclet-voro) on a version tag.
|
|
4
|
+
# Uses PyPI Trusted Publishing (OIDC) — configure the publisher on PyPI first; no API token secret needed.
|
|
5
|
+
# The wheels FetchContent-build Kokkos (OpenMP+Serial) + the core & morton headers inside each build
|
|
6
|
+
# (PECLET_VENDOR_DEPS=ON, from pyproject's [tool.cibuildwheel]); GPU/HIP + MPI are the source (sdist) path.
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
tags: ["v*"]
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
sdist:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
- run: pip install build
|
|
22
|
+
- run: python -m build --sdist
|
|
23
|
+
- uses: actions/upload-artifact@v4
|
|
24
|
+
with:
|
|
25
|
+
name: sdist
|
|
26
|
+
path: dist/*.tar.gz
|
|
27
|
+
|
|
28
|
+
wheels:
|
|
29
|
+
name: wheels (manylinux_2_28 x86_64)
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
# cibuildwheel reads [tool.cibuildwheel] from pyproject.toml (PECLET_VENDOR_DEPS=ON): each wheel
|
|
34
|
+
# compiles Kokkos as a subproject, so builds are slow but self-contained.
|
|
35
|
+
- uses: pypa/cibuildwheel@v2.21
|
|
36
|
+
- uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: wheels-linux
|
|
39
|
+
path: wheelhouse/*.whl
|
|
40
|
+
|
|
41
|
+
publish:
|
|
42
|
+
needs: [sdist, wheels]
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
45
|
+
environment: pypi
|
|
46
|
+
permissions:
|
|
47
|
+
id-token: write # required for trusted publishing
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/download-artifact@v4
|
|
50
|
+
with:
|
|
51
|
+
path: dist
|
|
52
|
+
merge-multiple: true
|
|
53
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# ── CMake build directories ───────────────────────────────────────────────────
|
|
2
|
+
build/
|
|
3
|
+
build*/
|
|
4
|
+
build_*/
|
|
5
|
+
cmake-build-*/
|
|
6
|
+
CMakeCache.txt
|
|
7
|
+
CMakeFiles/
|
|
8
|
+
cmake_install.cmake
|
|
9
|
+
CTestTestfile.cmake
|
|
10
|
+
install_manifest.txt
|
|
11
|
+
_CPack_Packages/
|
|
12
|
+
|
|
13
|
+
# ── Generated CMake / package files (keep the .cmake.in template) ─────────────
|
|
14
|
+
*.cmake
|
|
15
|
+
!cmake/vorflowConfig.cmake.in
|
|
16
|
+
|
|
17
|
+
# ── Compiled objects and binaries ─────────────────────────────────────────────
|
|
18
|
+
*.o
|
|
19
|
+
*.d
|
|
20
|
+
*.a
|
|
21
|
+
*.so
|
|
22
|
+
*.dylib
|
|
23
|
+
|
|
24
|
+
# ── Simulation output data files ─────────────────────────────────────────────
|
|
25
|
+
pos_[0-9]*.dat
|
|
26
|
+
intf_[0-9]*.dat
|
|
27
|
+
GNUPlotfile.txt
|
|
28
|
+
|
|
29
|
+
# ── Doxygen generated output ─────────────────────────────────────────────────
|
|
30
|
+
docs/html/
|
|
31
|
+
docs/latex/
|
|
32
|
+
|
|
33
|
+
# ── Benchmark output ──────────────────────────────────────────────────────────
|
|
34
|
+
benchmarks/results/
|
|
35
|
+
benchmarks/archive_pending/
|
|
36
|
+
|
|
37
|
+
# ── IDE / editor artifacts ───────────────────────────────────────────────────
|
|
38
|
+
.vscode/
|
|
39
|
+
.idea/
|
|
40
|
+
*.swp
|
|
41
|
+
*.swo
|
|
42
|
+
*~
|
|
43
|
+
.DS_Store
|
|
44
|
+
Thumbs.db
|
|
45
|
+
.codex
|
|
46
|
+
build_*.log
|
|
47
|
+
cuda_report_*.log
|
|
48
|
+
.venv/
|
|
49
|
+
|
|
50
|
+
# keep the vendored deps helper (the *.cmake rule above would ignore it)
|
|
51
|
+
!cmake/PecletDeps.cmake
|