Preserve bounded validation evidence and historical failures

This commit is contained in:
Frank14f committed 2026-10-15 10:13:51 +08:00
1 parent cdbb9c42f6
commit 263f3b0c7a
239 files changed
+74191

No files matched your search

@@ -0,0 +1,137 @@
Fixed 2:1 patch preparation — implementation handoff, 2026-10-13
Delivered: one production module, src/CelerisLab/lbm/refinement.py (138 lines),
and tests/unit/test_refinement.py (167 lines). No existing code was modified.
The API produces real layer geometry and compact exchange tables. It does not
advance a coupled simulation; numerical coupling remains a joint review item.
Usage (existing config, no CUDA required):
from CelerisLab.config import load_lbm_config
from CelerisLab.lbm.refinement import FixedPatch2D
cfg = load_lbm_config()
patch = FixedPatch2D.from_config(cfg, (4, 4, 12, 12))
patch.check_synchronization(0, 0, phase="postcollision_g")
The supplied configuration must satisfy the documented initial backend subset.
Bounds are (x0,y0,x1,y1), half-open, in coarse cells. Shapes are (ny,nx).
Current architecture and data path
Simulation
-> LBMConfig -> compiler_v2 -> generated per-domain module
-> LBMField: Q-major GPU DDF buffers, flags, host mirror, macro buffers
-> LBMStepper: OneStep + buffer swap, completed coarse-step count
-> pull -> physical BC -> collision -> stored postcollision_g
New opt-in preparation path (no change to the above path):
LBMConfig -> FixedPatch2D.from_config
-> copied/validated config; coarse/fine tau and layer dimensions
-> fine_kind: active / inner halo / outer halo (uint8)
-> paired ghost_fine/ghost_coarse cell indices (uint32)
-> coalesce_coarse + four coalesce_fine population slots (uint64)
-> future transfer/step kernels (not implemented in this increment)
Choices and actual implementation
The initial contract is D2Q9/SRT/FP32/unshifted/double_buffer, without LES.
Existing Python lattice descriptors and CUDA Q-major index conventions are
reused. Existing configuration is copied before validation; both layers must
respect its omega guards. Fixed 2:1 acoustic scaling gives tau_f=.5+2*(tau_c-.5).
Fine coordinates use the patch's physical offset, dx=dt=.5 and a four-cell halo.
Only the outer coarse ring is searched for closed-midpoint coalescence targets;
all eight corner-pass links are included. No coarse-domain-sized masks or DDF
arrays are allocated. Standard [4,12)^2 patch tables total 7136 bytes; enlarging
only the coarse grid leaves table size unchanged. Arrays are contiguous/read-only.
An explicit import enables the API; no eager package imports or default-path
branches were added. No tree, dynamic AMR framework, new solver, field hierarchy,
fake stepper, fine LBMField allocation or premature config/runtime switches.
The synchronization method checks count/phase metadata only. It does not inspect
populations or prove that a caller's buffer really holds g. Two coarse cells of
geometric margin certify donor indices, not fluid ownership or physical BC safety.
Runtime forcing, objects and domain BCs still need explicit coupling validation.
Numerical coupling proposal for Claude/Grok joint review — NOT implemented
Let F_n be the reference arrival state and G_n=C(F_n) the production state.
Start from stored G_n, without re-colliding it:
1. Explode coarse G_n into fine halo once (unscaled, as in pinned CPUREF).
2. Fine hop 1 -> arrival F_(n+1/2); collide fine active cells once.
3. Fine hop 2 -> arrival F_(n+1); fine halo ghosts never collide.
4. Coarse pull -> provisional arrival; replace incoming interface populations
with the four-child fine-halo average, including corner-pass links.
5. Collide coarse active cells once and fine active cells a second time,
publishing synchronized G_(n+1). Equivalent fusion may preserve this order.
Thus each coarse interval has one coarse collision and two fine collisions.
Initialization must establish G_0 consistently; no extra per-step collision may
be added to match a reference plot. Comparing C(F_ref) to production G is a test
observation conversion, not a production step. Do not overwrite postcollision
coarse slots with uncollided coalescence after ordinary OneStep has finished.
The current fused kernel therefore needs a reviewed insertion point before its
collision, with masks preserving covered/halo semantics. Its normal inlet ghost
collision behavior is separate from the fine-halo rule above.
First numerical scope proposed: fixed, unforced, object-free doubly periodic
patch, same baseline tau pair; <=8-step same-phase CPU/GPU comparison after
the coupling design is jointly reviewed. Reuse existing collision/layout
helpers rather than reproduce a solver. Simulation currently constructs channel
flags/wall corrections, so reusing its default initializer does NOT create this
periodic fixture. Boundary selection and level-module ownership must be agreed
before attaching a coupled backend to Simulation. No GPU budget was requested
or consumed in this architecture-only increment; any later GPU run needs an
occupancy check and a specific allocation budget before execution.
The observed ~2.9% excess shear decay does not block topology preparation or a
bounded equivalence implementation, but remains an interface-accuracy concern.
Neither a future <=8-step comparison nor this geometry test establishes 32-step
accuracy, convergence or a stress-transfer mechanism. No nonequilibrium scaling
or time-interpolated ghosts were mixed into the pinned route. Claude's previous
local_stress implementation-code review remains incomplete.
Reference/architecture guard traceability
Read .github/skills/lbm-ref-architecture-guard/SKILL.md; no applicable AGENTS.md
was found in the project/source/test ancestor paths. Concrete source findings:
- src/CelerisLab/lbm/descriptors.py and kernels/core/layout.cuh define paired
D2Q9 and q*N+y*nx+x; maps use them rather than a second direction convention.
- src/CelerisLab/lbm/kernels/step/one_step_double.cu fuses pull/BC/collision;
src/CelerisLab/lbm/stepper.py swaps the stored g buffers afterward.
- src/CelerisLab/lbm/field.py builds channel topology and allocates full field
resources: unsuitable as an implicit fine-patch initializer.
- ref/lbmpy/src/lbmpy/relaxationrates.py: relaxation_rate_scaling agrees with
tau_f=.5+2*(tau_c-.5); no population rescaling is inferred from this formula.
- ref/palabos/src/multiGrid/multiGridGenerator2D.hh: two fine substeps and
separate interface processors support keeping topology separate from steps.
Its interpolation/rescaling is a different scheme and was NOT adopted.
- Pinned CPUREF-0.3 supplies the reviewed closed-corner volumetric geometry.
Its SHA remains bba2a06a9f6517b32079ffff15e4060d8c3b7ed35f16ca134e1877226c9e4e1e.
Review and validation
Independent local subagent /root/refinement_review read the production module
and related sources and found no blocking issue. Its two suggestions were
adopted: explicitly distinguish fine halo ghosts from inlet ghosts, and cover
the smallest 1x1 patch at the two-coarse-cell margin. This is not a completed
Claude/Grok review of the new coupling proposal.
Ran only tests/unit/test_refinement.py: 9/9 passed, no numerical advance.
Coverage: all exchange maps against pinned reference, eight corner passes,
400 unique fine-slot reads, translated rectangle geometry/child centers,
minimal halo edges, tau/config isolation, compact read-only arrays, index
overflow rejection before allocation, unsupported backend/omega guards,
phase/count rejection, exact source provenance and no CUDA/Simulation imports.
No old diagnostics, physical matrix, Jet replay or GPU tests were rerun.
Python 3.10.13 / NumPy 1.26.4 from existing pycuda_3_10 environment.
PYTHONPATH=/home/frank14f/CelerisLab/src; process-only BLAS thread=1, bytecode
disabled, user site disabled, assertions enabled. Parent and child limited by
prlimit to 256 MiB address space, 2 MiB output file and core=0.
Peak child RSS 36.00390625 MiB, parent 18.5 MiB; child elapsed .274485 s;
combined test stdout/stderr 873 bytes. Full commands, times and source hash
are in validation.json; actual unittest output is validation.txt.
Audit artifacts
baseline.json freezes HEAD, full dirty status and 303 old-file hashes, including
all preceding validation materials. Scope excludes read-only ref, symlinks and
bytecode, as stated in the baseline. incremental.patch is only the two new code
files, relative to the preserved starting tree. manifest.json records final old
file checks and new paths/sizes/SHA. No staging, commit, push or DynamisLab work.
Stopped at the numerical coupling joint-review point.
Authorization, verbatim as relayed by the coordinating thread
<transcript_evidence>
user(Sentinel_ed1ee5edd5e88191a1aaa4d710ce523f): 推进吧,~/CelerisLab就是开发环境,可以改动,只要符合架构风格。遇到问题可以用undermind看文献,也可以让grok搜索互联网信息,还可以参考开源项目。
user(Sentinel_d0d3a42b2c088191aa8aebc105fb1b27): 允许,你用GPU验证都行
</transcript_evidence>
@@ -0,0 +1,311 @@
{
"created_utc": "2026-10-13T07:06:32.791804+00:00",
"head": "6e3756c587ec08ab6a55c4a1a5f4671822d3f0a0",
"git_status": " M pyproject.toml\n M setup.py\n M src/CelerisLab/__init__.py\n M src/CelerisLab/body/__init__.py\n M src/CelerisLab/body/ddf_patch.py\n M src/CelerisLab/body/manager.py\n M src/CelerisLab/body/preprocess/flag_overlay.py\n M src/CelerisLab/common/__init__.py\n M src/CelerisLab/common/checkpoint.py\n M src/CelerisLab/config.py\n M src/CelerisLab/configs/CONFIG.md\n M src/CelerisLab/cuda/__init__.py\n M src/CelerisLab/cuda/compiler_v2.py\n M src/CelerisLab/cuda/context.py\n M src/CelerisLab/lbm/__init__.py\n M src/CelerisLab/lbm/curved_links.py\n M src/CelerisLab/lbm/field.py\n M src/CelerisLab/lbm/initializers.py\n M src/CelerisLab/lbm/kernels/boundary/bounce_back.cuh\n M src/CelerisLab/lbm/kernels/boundary/curved_boundary.cuh\n M src/CelerisLab/lbm/kernels/boundary/inlet/common.cuh\n M src/CelerisLab/lbm/kernels/boundary/inlet/zou_he_local.cuh\n M src/CelerisLab/lbm/kernels/boundary/inlet_outlet.cuh\n M src/CelerisLab/lbm/kernels/config/config_grid.h\n M src/CelerisLab/lbm/kernels/config/config_method.h\n M src/CelerisLab/lbm/kernels/config/config_objects.h\n M src/CelerisLab/lbm/kernels/config/config_physics.h\n M src/CelerisLab/lbm/kernels/kernel_v2.cu\n M src/CelerisLab/lbm/kernels/operators/collision_mrt.cuh\n M src/CelerisLab/lbm/kernels/operators/collision_trt.cuh\n M src/CelerisLab/lbm/kernels/operators/forcing_guo.cuh\n M src/CelerisLab/lbm/kernels/step/aux_kernels.cu\n M src/CelerisLab/lbm/kernels/step/esopull_sync.cu\n M src/CelerisLab/lbm/kernels/step/init_flow.cu\n M src/CelerisLab/lbm/kernels/step/one_step_double.cu\n M src/CelerisLab/lbm/kernels/step/one_step_esopull.cu\n M src/CelerisLab/lbm/kernels/streaming/esopull_semantic_helpers.cuh\n M src/CelerisLab/lbm/stepper.py\n M src/CelerisLab/simulation.py\n M tests/integration/test_body_sync_e2e.py\n M tests/integration/test_ddf_patch.py\n M tests/integration/test_sync_bodies_skeleton.py\n M tests/integration/test_unified_obs.py\n M tests/postproc/experiment.ipynb\n M tests/validation/run_kan99b_rotating_cylinder.py\n M tests/validation/run_sah04_st_matrix.py\n M tests/validation/test_sensor_accuracy.py\n?? docs/design/README.md\n?? docs/design/integrated_architecture.md\n?? docs/design/multi_level_grid_architecture.md\n?? docs/design/multi_level_summary.md\n?? docs/design/multi_level_visual_reference.md\n?? docs/design/spatial_coupling_refinement.md\n?? docs/multilevel_grid_architecture_analysis.md\n?? research/audit-2026-10-09/REVIEW.zh-CN.md\n?? research/audit-2026-10-09/architecture-cpu-results.json\n?? research/audit-2026-10-09/architecture-report.md\n?? research/audit-2026-10-09/numerical-report.md\n?? research/audit-2026-10-09/numerical_collision_results.json\n?? research/audit-2026-10-09/numerical_compile_results.json\n?? research/audit-2026-10-09/numerical_semantics_results.json\n?? research/audit-2026-10-09/root-initializers-report.md\n?? research/audit-2026-10-09/state-report.md\n?? research/audit-2026-10-09/state_results.json\n?? research/design-2026-10-09/Contracts.lean\n?? research/design-2026-10-09/PLAN.zh-CN.md\n?? research/design-2026-10-09/api-architecture-study.md\n?? research/design-2026-10-09/grid-study.md\n?? research/design-2026-10-09/jet-study.md\n?? research/design-2026-10-09/jet_closure_check.py\n?? research/design-2026-10-09/jet_closure_results.json\n?? research/design-2026-10-09/math-and-history.md\n?? research/design-2026-10-09/math-checks.json\n?? research/design-2026-10-09/math_checks.py\n?? research/j1-2026-10-12/REVIEW.md\n?? research/j1-2026-10-12/baseline-status.txt\n?? research/j1-2026-10-12/baseline.json\n?? research/j1-2026-10-12/incremental.diff\n?? research/j1-2026-10-12/results.json\n?? research/j2-slot-2026-10-12/REVIEW.md\n?? research/j2-slot-2026-10-12/baseline-status.txt\n?? research/j2-slot-2026-10-12/baseline.json\n?? research/j2-slot-2026-10-12/incremental.diff\n?? research/j2-slot-2026-10-12/results.json\n?? research/j3-coverage-2026-10-12/REVIEW.md\n?? research/j3-coverage-2026-10-12/baseline-status.txt\n?? research/j3-coverage-2026-10-12/baseline.json\n?? research/j3-coverage-2026-10-12/incremental.diff\n?? research/j3-coverage-2026-10-12/negative-budget-20744.h5\n?? research/j3-coverage-2026-10-12/negative-end-20760.h5\n?? research/j3-coverage-2026-10-12/restart-21280.h5\n?? research/j3-coverage-2026-10-12/restart-reference-21296.h5\n?? research/j3-coverage-2026-10-12/results.json\n?? research/j3-coverage-2026-10-12/verification.json\n?? research/j3-lag-2026-10-12/REVIEW.md\n?? research/j3-lag-2026-10-12/baseline-status.txt\n?? research/j3-lag-2026-10-12/baseline.json\n?? research/j3-lag-2026-10-12/end-21280.h5\n?? research/j3-lag-2026-10-12/incremental.diff\n?? research/j3-lag-2026-10-12/results.json\n?? research/j3-lag-2026-10-12/start-20760.h5\n?? research/j3-lag-2026-10-12/trajectory.h5\n?? research/j3-offline-2026-10-12/REVIEW.md\n?? research/j3-offline-2026-10-12/lags.csv\n?? research/j3-offline-2026-10-12/localization.png\n?? research/j3-offline-2026-10-12/regions.csv\Line truncated
"hash_scope": "Tracked/nonignored regular project files plus prior baseline; excludes ref, symlinks, bytecode.",
"hashes": {
".cursor/rules/cuda-style.mdc": "5810cf8cff793a11ba5dedafaa8a4e7d7d3debb728d837ca1903ff6dc8d6fdb9",
".cursor/rules/project-layout.mdc": "aeed1cd9d48447bcfcfb6a77250af7c5a3d500de4c6b2591c5684696fa04c3ec",
".cursor/rules/python-style.mdc": "ece75cb724d7dc46cb8dab7ecf8d710a90b503001da0d506ea4bf772ce395e21",
".cursorignore": "9f072faa815a6c6d4dc791a424201404f0f623338681ae3d2fcbdf86db1bd035",
".gitignore": "de25151f4cfdf29ca64032e509398e1829c7ded2449ccff803b2fd87d859ae6c",
"LICENSE": "e98392425e9a0007d0d69f0f7c912c2dc1b59061a6197223962aac45599c76ea",
"README.md": "982d0df8b766b1d5017ba702b75e8b3cec8d22f57af8f434be27ea251652596c",
"docs/audit/audit_round2.md": "0f14ad073a0725134e6391f961c324fd0013c7791fd410713e94ed1ad40b7385",
"docs/audit/body_refactor_notes.md": "8f978d7b01c9f49dca9eeaff0d163cec6da085e2f99ee5a5e803d72306e7a72f",
"docs/audit/config_diagnosis.md": "b601652df0cac36a8faf2b317b11853221353716a25184cd9b2dc41373a7f183",
"docs/audit/kernel_layer_audit.md": "89893c98ed7c2699157bf728ec0e79b0dd6aff4008ee5c7b77eb052de24033f1",
"docs/design/README.md": "98242c6960866d9b75aaf363f703edf02c4210bc38da1a340e9f6add49c6a3ce",
"docs/design/integrated_architecture.md": "c26b0d301321fe4b86d83d11c7e0b8d0c0545ee2995afa563966f004e9788132",
"docs/design/multi_level_grid_architecture.md": "e56a67d9129f2e3c311342e21a3fb2ed14bd492dd881949b251d5d9ac577bdee",
"docs/design/multi_level_summary.md": "eebf23e0bec9b154e5ce2128e2806e7558a7d4824b2c700cfd16afd1158b2354",
"docs/design/multi_level_visual_reference.md": "cad4bfbd561e5650ec297334529334b662a1ed35f7373c61f34ee22ecf1f66bd",
"docs/design/spatial_coupling_refinement.md": "36c878c7afad524999d89fa842297a98a0433e0283e78b36ca734ddbf8723ed8",
"docs/multilevel_grid_architecture_analysis.md": "90309730b1759d63531cb258c30db990ab71ca1b56ae47d0bbe2f4e2ae52012c",
"docs/performance_analysis.md": "ba01aaa4d3c02b61a8dc55fd00518ac291ebbed79b6574190d6b7234a1158fcb",
"docs/tests_overview.md": "ffc9591fd7baa4261b2c1ce9cfa7aa13a3554a8d5df712035806266a5eaade3f",
"docs/validation_specs/Force_region.md": "3092080afe4a30665fe1b721803621ba9d0dd5d20ad17826984d94efc160fdac",
"docs/validation_specs/Force_region_validation.md": "279a4484d1bfca0fd67aed4de3282d547aa048f89389420d8e5f2fd86db54fc2",
"docs/validation_specs/Kan99b_validation.md": "0d8bf74f2361f863809af1979bf8807adaa423f98321e1104a3d86d8c7a863cf",
"docs/validation_specs/Sah04_validation.md": "1d122d29e281b7f50801b148f3314a0e35fdc27ee7d757c0a661243aa6185fb0",
"docs/validation_specs/exp_ctrl_matrix.md": "b7250576c23292988b6ef4bcfd080f611d41edc413c3cebd0eadcc8596049470",
"docs/validation_specs/streakline_notes.md": "cd342d214c07eb608ac2e5b8697322c44c31dbf4d27dfdb5409de46ef474df4b",
"output/round3_compatibility_summary.md": "319f2e6abde4b34cc4ec90ef461d8ebb85dd5a3ac1736cfa7a3fb110f2a69df9",
"pyproject.toml": "f24ab9ad3a6a728a9382b1bce2e721612fc76635f35c6f96dfddaa853b6e5a9c",
"research/audit-2026-10-09/REVIEW.zh-CN.md": "2841fd3aa7a6baedbe1079d90915c8b05212b133824ed6abccaa1f09656eaefe",
"research/audit-2026-10-09/architecture-cpu-results.json": "e1b809210005c8765b13fddbb5ed710d15f6fcbb4c5788a4064f3e88808433ef",
"research/audit-2026-10-09/architecture-report.md": "861079dc3f4ced9fdc41bfb22002d32e190c0d630d3ba2f138f9dc7a949b8371",
"research/audit-2026-10-09/numerical-report.md": "970330b3a593f79f09866ce6ae82bc0ddd81226230d0a6ff06ae8ae756ee80da",
"research/audit-2026-10-09/numerical_collision_results.json": "51e5c263bb8cde82cedef2ccfdbf5ef657742a80218d7896b1ff877516e59693",
"research/audit-2026-10-09/numerical_compile_results.json": "c3b0ae02072a2ec408ada7513b542ec255f6855cb743a3ed7f91bd8f31504f44",
"research/audit-2026-10-09/numerical_semantics_results.json": "b95b065b594aa2911740dab216f87936c9bf7f7fa25acfda93b5738443564035",
"research/audit-2026-10-09/root-initializers-report.md": "ca448457c444949d5d0e1e10fa7121064510b77fc4c3512580900f0299219867",
"research/audit-2026-10-09/state-report.md": "f8708807efc2e109810c5955f7c1884a932668c0b3cb2963c2df3b09f2a3d5c4",
"research/audit-2026-10-09/state_results.json": "da9170df3e11231c73f20e5e79ed68e08966673d1dd52004ea6b6a279afc0dcd",
"research/design-2026-10-09/Contracts.lean": "2442d9a778ef20e8af3fecf23be6fea6d73c6299ff744c9664b652bc5ee3f034",
"research/design-2026-10-09/PLAN.zh-CN.md": "0341dd7ee306a040340c8e5dedb07a109e931c27dbf3c994d072aa78e3b6bc67",
"research/design-2026-10-09/api-architecture-study.md": "d6fb45ec784f0e1db55fb9f34e137b9f551db0b9b39fd4f0ef247a78fc34eedf",
"research/design-2026-10-09/grid-study.md": "4435dc1275ec5e15b118becc6ac391f306195d1e5beaa58037b1aff3bb2465c7",
"research/design-2026-10-09/jet-study.md": "a362142ef04a5ad5dbb4c9db9d221b1199dccec53780c8f2da49a15201cfe529",
"research/design-2026-10-09/jet_closure_check.py": "fde45d0f8518740ef5c0bf0fe7635d6adaf9a2e789927dd4e68e991c138ddc30",
"research/design-2026-10-09/jet_closure_results.json": "12cf7d400a206f9f9ec9ea6ad251fe6bb0232e27bcbed22fbc1ead2c0fc7d249",
"research/design-2026-10-09/math-and-history.md": "64f8c82e4949d6f58b46faa09800958714859c36cad20bbeeae8b449ae7a6099",
"research/design-2026-10-09/math-checks.json": "94750381954317cde8d649db26beaed8ea945666572a05030ca2b4d97d384011",
"research/design-2026-10-09/math_checks.py": "4254983a783fe4bad8888b3d7c243c87d991c7bbf242edb0f56f25cbaefee890",
"research/j1-2026-10-12/REVIEW.md": "13004a4f140acdcf59acb57e9e2dda1bb95763d30060f822a7c206c94b813a9f",
"research/j1-2026-10-12/baseline-status.txt": "ac398360e05b746b89ae0c3acfe202b5122e650a3bb1ff234ab26f874a303e64",
"research/j1-2026-10-12/baseline.json": "ad7afdf7b3913d11c07343e971fe2f43c2d1a2b99e3d5904a6ba89e3bb0b24fb",
"research/j1-2026-10-12/checkpoint-gpu.log": "adfe3d77d2e6c6f6184dccc0267b4404b20a7709505d5ff5affed0ed4a618083",
"research/j1-2026-10-12/cpu.log": "60cac097f7c4f11401df2aacb43a248640555e7628d2829c4680c71db34e9640",
"research/j1-2026-10-12/gpu-validation.log": "d1e9f2aea17a85eddcd94b81c700738ce073214857b55c28abd1219ff1edbed7",
"research/j1-2026-10-12/gpu.log": "8659a78ea52bbf8eb923d46ea71636ce63cd322352d5c98a74f631e666dd8cfb",
"research/j1-2026-10-12/incremental.diff": "a454c23da7b0011645949c0fbf64d0c41ecfdab5642b1b7c5119868005d3c721",
"research/j1-2026-10-12/results.json": "449f8a17dacac0fc6d2489c4b10bac330dbbbdb38fad3ce54f739ac8c6d48e85",
"research/j2-slot-2026-10-12/REVIEW.md": "10c4a94ffc32e0a2c4e0f6593b7cfc28479b5869f279f0b9d0b708fa3a47d1e6",
"research/j2-slot-2026-10-12/baseline-status.txt": "812616e2d941efcf854e1b37d6e662dda1aaf2b69074fcc04017133e13b72166",
"research/j2-slot-2026-10-12/baseline.json": "e82a1844145fd0cbc585c581b29f80b56193f122cfe1dfa7578f26904a720285",
"research/j2-slot-2026-10-12/cli.log": "9482ad7101d501f27f92e204b2f3ae5c6d91bd887b525aa31cb4a2a188f3cb92",
"research/j2-slot-2026-10-12/cpu.log": "91aba5961006909fbbb860429a9d3cfc930112a0d74c7788bc51c0a5897b47e5",
"research/j2-slot-2026-10-12/gpu-serialization-failure.log": "df804e53b35e7ddaad79a17842b4b5fd9d834e29ca2d56edb00e835848d09200",
"research/j2-slot-2026-10-12/gpu-validation.log": "223351b52c70fa4523289f3a1b3db435a11286379253280470900ffe397580a6",
"research/j2-slot-2026-10-12/incremental.diff": "c9e391bc91438cd912c1ed5a419705d4388522f672c67a066cfc055e814e699f",
"research/j2-slot-2026-10-12/results.json": "7d35ca7989aed5380e0a45de7f583972566fc516a051da63c53b35514e267494",
"research/j3-coverage-2026-10-12/REVIEW.md": "7293f3f3442855c8521698605aab504e026915a7bf1e77f5a24710d89a812443",
"research/j3-coverage-2026-10-12/baseline-status.txt": "31c949b11b20d7cd4202dba16882b5712aa1653da0cb2da2f0ebd69bf488040e",
"research/j3-coverage-2026-10-12/baseline.json": "d8844104f2665a25bfc417ee29becf89ab3955fac9105b5ddb12cfb1fe2a55b0",
"research/j3-coverage-2026-10-12/gpu-validation.log": "505cd5a5db46d7984aefb2a614151c25c4ace0e7d2a52e02c3e4f9792fd8eb95",
"research/j3-coverage-2026-10-12/incremental.diff": "98aa7855d5d6b91b4509a924c8a5aabab4339ba29c7e7dc2d91262c48e3848ca",
"research/j3-coverage-2026-10-12/negative-budget-20744.h5": "c09d75fc4a2cff68039a0956bd9d32b79b9cd3a6b386c72b4db54c214b110cd8",
"research/j3-coverage-2026-10-12/negative-end-20760.h5": "bd0bd063579d625e358762b1fdde5ac11bfcf739646a847fb77a4a2031011b9b",
"research/j3-coverage-2026-10-12/restart-21280.h5": "3e89c12c16f91f76ca9acd909e0fa7d42df6fbb5e870b299aa08ca42bc3e3dc9",
"research/j3-coverage-2026-10-12/restart-reference-21296.h5": "7192f510dd7820675aa1de130f55514136fba782cf77f92545189918a7e0c328",
"research/j3-coverage-2026-10-12/results.json": "02460981ad49c9cc13b4246abad1d8afd2599c61bfb545a6e32da9bbcd5c0db1",
"research/j3-coverage-2026-10-12/verification.json": "205986efd2b41635721b7fd20288be982348c765180102c7102750ba088f3a28",
"research/j3-lag-2026-10-12/REVIEW.md": "f388b64b0cc0413dc9865afda90ed24de666dda0d6cdb821b4363ce1b73631b3",
"research/j3-lag-2026-10-12/baseline-status.txt": "e0b69879084f54afac1a3bc3701f1de9819068190c815ae84421f02f83cad9f7",
"research/j3-lag-2026-10-12/baseline.json": "5e9a920813fe3d775110af85af92970d5245a7040ace804445e432353b77e489",
"research/j3-lag-2026-10-12/end-21280.h5": "19a94e9e8db6dd9ac981effe06032c351992250b58768d9c090409193893d588",
"research/j3-lag-2026-10-12/gpu-availability.log": "b227a519b8286849cfdf842573bd451803da048c6b27af9517f6b8964cd3aa39",
"research/j3-lag-2026-10-12/gpu-diagnostic.log": "97956b517072b7c34e2e29e2a23f87eafb19b9eda786a4b8149e4a2eaed76ee9",
"research/j3-lag-2026-10-12/host-check.log": "b2b6d262934b3abf9e0f0bdbde14b339cb977f7bffe391c17b51b5d067862dda",
"research/j3-lag-2026-10-12/incremental.diff": "ebdf66c72daf17b926482f79a1a30bf0eb2d27fc930a7bb62e5449ebcf72fcc7",
"research/j3-lag-2026-10-12/results.json": "00435ac7e402943e55e702fac1beb5af8cafe71967999658bcde2b29077b1fa8",
"research/j3-lag-2026-10-12/start-20760.h5": "6c4cba5928c77566c2afc32231311a3986831c18fea766faadebb101243399e2",
"research/j3-lag-2026-10-12/trajectory.h5": "2b51f8ec5e0cc8ca72c73ac1b51dd611158368e6d6de791d85150fa111ea1986",
"research/j3-offline-2026-10-12/REVIEW.md": "d9902c58498e73c29e054b23adb968f7e1e14421cba5c58d03bbc5a50159ae79",
"research/j3-offline-2026-10-12/cpu-analysis.log": "bc02a9b197fc15ae1b503ca54655a7622d4361f9b45b7848ff9c387ea3665f11",
"research/j3-offline-2026-10-12/lags.csv": "fbd9addd413f24c47f4411317e872265bb774e8e1724fe169412befa860ae94d",
"research/j3-offline-2026-10-12/localization.png": "a72907638e32b0ecfc2205bea438e7b408f40aad86217ce6ad9b4877840c9cfc",
"research/j3-offline-2026-10-12/regions.csv": "3a8fc640b61d70e3b7f73d2bf8ac2bd3f720adf39a90dfda6180430e0489efae",
"research/j3-offline-2026-10-12/results.json": "cdb857bea6f4e06ed15acf773505ce6d5147f8cb8ce0a53cc368ee267cde6361",
"research/j3-reservoir-2026-10-12/REVIEW.md": "1ea5f860728584ea6cbe40ba3994e40471102d8e2cf6d93e28fe47222cba0cab",
"research/j3-reservoir-2026-10-12/baseline-status.txt": "0ef1a8c9878c4053ebc1a7d4bace6d4ec38bf27ace167b4239ddbb1c6c897e20",
"research/j3-reservoir-2026-10-12/baseline.json": "847fefd1eae971985d34d04d89ee6d6f1c91f6940c54fe351d112faba7bc6838",
"research/j3-reservoir-2026-10-12/cpu.log": "b33f6c1a1b0ee67968c4cff85d491e46e30e0d6c796b552629714ab8b5dcead0",
"research/j3-reservoir-2026-10-12/gpu-availability-sandbox.log": "1d58470512e583a0acfabf6896ee5f31e5b493b8231aed54b864f64eb275b02c",
"research/j3-reservoir-2026-10-12/gpu-validation.log": "ff04024db197e332f37c912a96413e3251fd0186947348ffbc33af6f4a899f2c",
"research/j3-reservoir-2026-10-12/incremental.diff": "fae312831d71e46dd477a640b06ed927853a9e735d26bf9f5868927fa31cfa56",
"research/j3-reservoir-2026-10-12/results.json": "49685de7679a14860258abf1753aaa6d116ad709b868d907ddb40e74c9b845ea",
"research/repair-2026-10-10/TRON_HANDOFF.md": "f8aaa3d99cd133c2055d4adf396a0a57d14f6006aea19e87611bd1c2c1b53a88",
"research/repair-2026-10-10/baseline-hashes.json": "d6a7d5f9ec5bceb0e7927d55603d9c5e70105982cd945723454659b19ab476e6",
"research/repair-2026-10-10/baseline-status.txt": "074088d793014e3b8154c58718058c7d300fb45595f5129fa957ef1e4cec38e2",
"research/repair-2026-10-10/checkpoint-domain-2026-10-12.diff": "292b4bafe7a62d4fbbf7c165eb99929336edfcaa16b15f34f72ab71fcd928391",
"research/repair-2026-10-10/classic-results.json": "a5d15305f516fd378b54cf9029102be58a83a55a7bad4b8e058fcfe0cc9898f4",
"research/repair-2026-10-10/classic-signals.npz": "820c9a0b0713d7455f0a5839ac2cd5ee706086d1a26461225dcdb095673421e2",
"research/repair-2026-10-10/final-gpu.log": "988bb97256d17b88c14f3793b15880d727ecb285abe62e7d2ae27a16729651c3",
"research/repair-2026-10-10/final-unit.log": "a892a39ecf88125558538cadce2cb5dc46d106b993b164e03da4ebb0eee68cef",
"research/repair-2026-10-10/original-user-files/src/CelerisLab/lbm/kernels/config/config_grid.h": "8be3a7cf74ba30d7fd3074fed79e63dbda7311c4d03b454ea641bf298ffeaa8d",
"research/repair-2026-10-10/original-user-files/src/CelerisLab/lbm/kernels/config/config_method.h": "3db4e16ef2c6b22349d04e6aa8ab04bdfe0eb784f9f3a98277e15dbed1835d81",
"research/repair-2026-10-10/original-user-files/src/CelerisLab/lbm/kernels/config/config_objects.h": "dbb93c063586da278c15d95e23f84c12e728f4f5f1bbc3980fe9cedaa6fff90e",
"research/repair-2026-10-10/original-user-files/src/CelerisLab/lbm/kernels/config/config_physics.h": "26df33c2960ba36f3283e19b55b4ea92e50e4efda705f9ebfbf3f875a4092c59",
"research/repair-2026-10-10/original-user-files/tests/postproc/experiment.ipynb": "c6b45db1c57200f0777213ef8d44cb4996c1aa7a5fb42b968b77e56f51b4fca4",
"research/repair-2026-10-10/provenance.json": "a81b7e32ecf7182c9617df1b39bbb063a05ef89290ad501bac4573cd5e8a6832",
"research/repair-2026-10-10/repair-architecture.md": "49be42ff5c994017f3175e17efda14d84f0b68f8ecd239f66ccee38415b60c5a",
"research/repair-2026-10-10/repair-numerical.md": "0272ebfa8c519aad161c520542cf53156574661609b91fd5ccad7955fdf2bd7b",
"research/repair-2026-10-10/repair-state.md": "4d4aa1ec0c11a87d2c8380912e7ed74cf5c910ae42e5cc529effde36c9020969",
"research/repair-2026-10-10/simplification-checks.log": "c9f15e870d02003480adf1a7f2fe4a9aca66c1934c4477619f05c8a4798ba85b",
"setup.py": "bf07df7ec19de56710d2bb5f61873e09710cd059d46837dc3aa54f3e09ff9e06",
"src/CelerisLab/__init__.py": "21cc469bd6e970a1f9ff5970c8eea4602065e41fc881854759ee565ee55c10c6",
"src/CelerisLab/body/__init__.py": "d6ec221d51eaf7b1da11ef320b399599cf5b9422e5bc271a7264a273033e6928",
"src/CelerisLab/body/action_smoother.py": "b1a23ee6bbd4850b172cb8738c5c3546ee465a54189e6af9d8044f023d4687dc",
"src/CelerisLab/body/coupling/__init__.py": "c931f7eb318d48408c3e2febcc6917c88c8dcc1697cbf4329b1f340d94c35763",
"src/CelerisLab/body/coupling/soa_packer.py": "8ec26fd55ef74801bbd5ab6bd3d0a7dabc750cbd498aaac2ca4c61a0108ad3c9",
"src/CelerisLab/body/ddf_patch.py": "60fcfb7441e73bf290bcff41ca3a83da3e7ddad765d7247464e8f02e3043b4e2",
"src/CelerisLab/body/geometry/__init__.py": "ada88980ab672959aca9aa3a4c4aade3219524b2ab68110cd2a2f41e3e0ca90a",
"src/CelerisLab/body/geometry/base.py": "cceca14361ca2f34d34a3e43730e1a79b8ca81be00f0dd62e884db32b479419f",
"src/CelerisLab/body/geometry/circle.py": "7605ca7c21103f1d801ac73ab8dd18dffbdac425b2dee7b8858b283628a9e436",
"src/CelerisLab/body/manager.py": "eac22c9ac92c26e89c10bb089fb3c4156e4eb7bd0c1b1f6fe6dd32e2940a020e",
"src/CelerisLab/body/objects.py": "71692d098ebb5ab2d0e614cb9b7854f048b8b33fbe6707e61fd0e8ac35745017",
"src/CelerisLab/body/preprocess/__init__.py": "dfd9d58bc07f626ab23a70053e31b88a6d9165d2e4c76a4e9f48abe674d3d2ec",
"src/CelerisLab/body/preprocess/flag_overlay.py": "831fc9e9736b758847759a085ff133eb49ec91318ace4fda76f85960138ee300",
"src/CelerisLab/body/registry.py": "fbb7327780adbdc6da15ebdb799980daf32df22ee974af0893d7409f177bbb68",
"src/CelerisLab/body/sync_plan.py": "a73ac9ee361b2120d0b7bbebeaa2ccbf924ba27bd95d4dd4b383c10a39b2a409",
"src/CelerisLab/common/__init__.py": "d4dbde78bc97fccc9eabac9abae8f0f15c112c10ff8e9b45bd9401d4723df1ef",
"src/CelerisLab/common/_types.py": "aad2ff1a9033d4fd68783ad7123afb47201ddc58785cb6dc0246947037072a5f",
"src/CelerisLab/common/checkpoint.py": "5b7caf3896167a3f37c539b58837de6eb3f8085fa7bf5f821a09666cc16d43a4",
"src/CelerisLab/common/pathline.py": "a1b6efcc0a076d0f1dc8d49a595779426d7d5626b00072a59bac710ff02ad046",
"src/CelerisLab/common/preprocess.py": "7fc78a08857cf8e98519500b094a1d896af189b6b15658ff9b388ed51bed4515",
"src/CelerisLab/common/render.py": "0e055476257eb2bcd11e733766e52195de02f8fad228f570a3511a7c831bdc29",
"src/CelerisLab/common/streakline/__init__.py": "13ff1cfa416fdd721a08a659e76b5a5a99b8d3201add10a83b7b0bc654bc1eec",
"src/CelerisLab/common/streakline/_config.py": "a9185ef68e9c7b5d5a1dc0b04a28341e2ad91d13c145a7c106636a878cf0a605",
"src/CelerisLab/common/streakline/_integrate.py": "3fbd4368b2c8d0e7fda40dc65aac5df02b085008b4c68acd83cb7ae45d33a13b",
"src/CelerisLab/common/streakline/_render.py": "236cd637414ee318c4d66f9aed32110d8dc42a100d65fde06172f7cd0ba62c65",
"src/CelerisLab/common/streakline/_streakline.py": "1a3e08daa706b5f83cdeb337e9a945a36ddf7583c40af1d0bb9d825ac954df37",
"src/CelerisLab/config.py": "2f1bba7515f5bc08cb3a8d140bcafe7fa0689e01b3b06494697bb2956a71530e",
"src/CelerisLab/configs/CONFIG.md": "41cafdbe525366c08aa9d0416ea026ccf0026ba7123b8a9b65f968a80d928e3a",
"src/CelerisLab/configs/config_body.json": "055f261f0828ca1d4f2bb694bd15b72bbcabe31d552326208f28e37f761adab1",
"src/CelerisLab/configs/config_lbm.json": "17e4311f1f250c6ece59177a8b6ff856b69a016c7c10267e774b030a0a390865",
"src/CelerisLab/configs/config_lbm_flume_mrt_zouhe.json": "8f593321db05a563a42931603a228d61cbcba06dfbe113262d5cd0ad93c0fe79",
"src/CelerisLab/configs/config_lbm_flume_trt_regularized.json": "f4bba8e6a4339fc3c4eb14f6e2f57c4b22993c73703c773d853edfbe34736e56",
"src/CelerisLab/configs/config_lbm_three_cylinder_triangle.json": "eeb8e7149dbe4aa6b3a9562802735aa950750dfbe2d972a0727e788573afa817",
"src/CelerisLab/cuda/__init__.py": "0d01dff9f0399c8baba822aab5ca0122a135f011008ed8a499ebd9f7e5b06aea",
"src/CelerisLab/cuda/compiler_v2.py": "c4cc3ec4445c8d75e6a253dd87963877117a722bc73b9d4811806fc6045d08c1",
"src/CelerisLab/cuda/context.py": "013dd4ec6d01d2fbd11afdfb103eac6a273bd9f798d663d761b851eeb27885e9",
"src/CelerisLab/cuda/obs_layout.py": "5ffb2c3aeeaaaaeb64f2cd8febfbcf4ad9919e5414020ad753cfade0683b21c2",
"src/CelerisLab/lbm/__init__.py": "7f60fb3aaae81501b510d08c2fedff44fcb05657260eb10b6f5cc91e7204306b",
"src/CelerisLab/lbm/curved_links.py": "587f3f4638688c09c0850bef2f314780d03f06c9211abc5fd773fbeecabc3326",
"src/CelerisLab/lbm/descriptors.py": "c9f025dfc14da43b989047b84cc22bd05d5cc92c9ec695c1da68fdfb788e3f2b",
"src/CelerisLab/lbm/equilibrium.py": "2fb2f2bb7ff326d23abce80fc2a4c0907b17740ea3e29fe6ae079c5044783826",
"src/CelerisLab/lbm/field.py": "0e727eacc3706add4d8d15c418e9b631050871f831698d3ac689dd5f2c701b9b",
"src/CelerisLab/lbm/initializers.py": "dacf9586963e862d6d0a98ef1a066036be6f91e9d423720661d8ef2c1fb2df6a",
"src/CelerisLab/lbm/kernels/boundary/bounce_back.cuh": "aba3748c564ed91b161d268ef8b737b7c7be96a823063d201f3da684dd845233",
"src/CelerisLab/lbm/kernels/boundary/curved_boundary.cuh": "4bd761e81b32f4bb3238fbb1f6ea890cde0cc987cd8bbeb54e9df8b0e1b57914",
"src/CelerisLab/lbm/kernels/boundary/esopull_curved_helpers.cuh": "b9b474bc4edaff05681c5443235472d04072d0d775fc0eb9c5967faef52b0258",
"src/CelerisLab/lbm/kernels/boundary/ibm_kernels.cuh": "e6909b547dc8d64cdd8a76a90660243a8f5fee535caa161b52b4dd8b7c29934b",
"src/CelerisLab/lbm/kernels/boundary/inlet/channel_stabilized.cuh": "efe077afcbb6b731256a987c2fd79a1dbc470c902f87070d60421ea6cb13d4e2",
"src/CelerisLab/lbm/kernels/boundary/inlet/common.cuh": "f3cec54c8873c65b3dca4375605d2c89a8727765884d3954c235242fdff9c6ba",
"src/CelerisLab/lbm/kernels/boundary/inlet/equilibrium.cuh": "f0964c811b2c41a5aaa1c6d99c490b06e850c634eb8749f1f05ef61f93c2de1d",
"src/CelerisLab/lbm/kernels/boundary/inlet/regularized.cuh": "943d4a571818bacb89c70bccfaac202691121e3e385803ce6309123a0a03ddaf",
"src/CelerisLab/lbm/kernels/boundary/inlet/zou_he_local.cuh": "e73e66b853b1e4e0e30d8f4185d832aa414ce670a1813ce2b5459f2887f71f89",
"src/CelerisLab/lbm/kernels/boundary/inlet_outlet.cuh": "de8b213a6da42c2e5e9f8966199fc66ea4541b85144a90f3f5dbad3c6ab63b97",
"src/CelerisLab/lbm/kernels/boundary/outlet/pressure_neq.cuh": "c8b2adc66d12fe602076ddc9693c5c208711fcaddb58aa9a31401a269f51c4c4",
"src/CelerisLab/lbm/kernels/boundary/planar_velocity.cuh": "0b2f9e0bd483c199637e5672dc0ffc460bc383dd1804805befbeb4c5d8c708d1",
"src/CelerisLab/lbm/kernels/config.h": "7d1124125e0b354558297934460e64c760fb68cdd7bf6d01a1238bb2eaab8c37",
"src/CelerisLab/lbm/kernels/config/config_grid.h": "8be3a7cf74ba30d7fd3074fed79e63dbda7311c4d03b454ea641bf298ffeaa8d",
"src/CelerisLab/lbm/kernels/config/config_method.h": "3db4e16ef2c6b22349d04e6aa8ab04bdfe0eb784f9f3a98277e15dbed1835d81",
"src/CelerisLab/lbm/kernels/config/config_objects.h": "dbb93c063586da278c15d95e23f84c12e728f4f5f1bbc3980fe9cedaa6fff90e",
"src/CelerisLab/lbm/kernels/config/config_obs.h": "c11e2249359145b5c4cbaaf0487506fa77c1f4b82c7c169ddc574aa0babcd727",
"src/CelerisLab/lbm/kernels/config/config_physics.h": "26df33c2960ba36f3283e19b55b4ea92e50e4efda705f9ebfbf3f875a4092c59",
"src/CelerisLab/lbm/kernels/core/descriptors.cuh": "8440bc14857da9007982650f828a23608eec9f7cc4bf772e8c8dc1239cb45356",
"src/CelerisLab/lbm/kernels/core/flags.cuh": "0025705f24710330d9d9195f713879bfb650a85a3449baef0e196b831af104ab",
"src/CelerisLab/lbm/kernels/core/layout.cuh": "1fbd820021c89ac3efcde24145996cb0147769e607e498e61f308ed3e0b13706",
"src/CelerisLab/lbm/kernels/core/obs.cuh": "b742b77c9f61e1f020fe9922c3838ae9d855e17b381154958b58f10a22938922",
"src/CelerisLab/lbm/kernels/core/params.cuh": "6e18bf730d936d940e3d85452f0714a2eaae31bf41002f9fd520ec5b372878dd",
"src/CelerisLab/lbm/kernels/core/precision.cuh": "849df14b4cce50af52399e4b8f3e997196f3ae5f1163f68e28df3e6b2507a8c4",
"src/CelerisLab/lbm/kernels/kernel_v2.cu": "c7bd3fb705b77261ba2441c52a24a7e6a7865c165cba088a1b75201c4d29c408",
"src/CelerisLab/lbm/kernels/operators/collision_mrt.cuh": "aee444eb60c47a3fd518dca975d1af05425a0818a0ec6c3fb3f6150f60c2cb44",
"src/CelerisLab/lbm/kernels/operators/collision_srt.cuh": "6b7ff842f392c8f853d2d1a97cc69bfe50f21283f73e659404da07cf6c95f5e1",
"src/CelerisLab/lbm/kernels/operators/collision_trt.cuh": "9725b9840b9ad8b4ec7be61ff5d06d3151e86d1a87585c13f2fbf934d0d2c5f6",
"src/CelerisLab/lbm/kernels/operators/forcing_guo.cuh": "969a430c1af03f32e3bd0df95d805e64f56334717c44dd4ba208ba503062a24b",
"src/CelerisLab/lbm/kernels/operators/helpers.cuh": "0b3a4d95d7d19f5fec09e5423b8f4cc99f8a226b541967425967330da5a051ec",
"src/CelerisLab/lbm/kernels/operators/macro.cuh": "e27c1c410dc857be98da4596568e405eeaf88701d291ac0e398aa9cd23dee740",
"src/CelerisLab/lbm/kernels/operators/turbulence_smag.cuh": "ff7f000297ee0817e255ad9fcb6a13b647e3ddd5b206518d35f38d2895a9f501",
"src/CelerisLab/lbm/kernels/step/aux_kernels.cu": "bb7f07d898f0d5151e5bd0f45e6bd819c5e83a345a265b73204906ac3cc29db4",
"src/CelerisLab/lbm/kernels/step/esopull_macro.cu": "c73116020ca217ede1e4de27c8269c31f9d91e33433ac8252a21e9b14187c50f",
"src/CelerisLab/lbm/kernels/step/esopull_sync.cu": "c0ff3e72900c3ab89a05dd03684e96d3b740cf1672d565727fc2af165933d087",
"src/CelerisLab/lbm/kernels/step/init_flow.cu": "305be3bb12fc0d039acec1701baabcf0e8a35e683c49c34f2af8ca9867d2b29c",
"src/CelerisLab/lbm/kernels/step/one_step_double.cu": "f9f8242b38e8e0cf8425b75e2b0215bc15363c62eaa0fb43c761b8e0931bfdc9",
"src/CelerisLab/lbm/kernels/step/one_step_esopull.cu": "aa223b2744ae6c9125673df311a96ce588032c1ba58bebb11fd33ecb990f8ed4",
"src/CelerisLab/lbm/kernels/streaming/esopull_semantic_helpers.cuh": "dd5a9091628b079efd97e53fd49e52d09dcee88529235db77a5648e02937af6e",
"src/CelerisLab/lbm/kernels/streaming/esopull_single_buffer.cuh": "77ed4ab9a0ebc5ff62a91a7c39066ef395391ae36e9040a69fb2bd8b1626dc79",
"src/CelerisLab/lbm/kernels/streaming/pull_double_buffer.cuh": "b65d741ed78b7b62f99531ba0c0ce1936663d8dc9640e7d7d16c707f1baf6549",
"src/CelerisLab/lbm/stepper.py": "e9e51e3a902fbda086d4707c0487e7b1dea6246fab290a24d82bd52d4296410e",
"src/CelerisLab/simulation.py": "34d69e71844f553790c5a2bed0f8fbfb912a9498e95b500d1ef2ad41cae3b424",
"tests/audit/Force_region.md": "3092080afe4a30665fe1b721803621ba9d0dd5d20ad17826984d94efc160fdac",
"tests/audit/Force_region_validation.md": "279a4484d1bfca0fd67aed4de3282d547aa048f89389420d8e5f2fd86db54fc2",
"tests/audit/body\u5220\u51cf\u529f\u80fd.md": "e9f308a8cd0f0e7df5441c32a15f84c0bae50bc0e56b8728f6c6f2cf78596673",
"tests/audit/body\u91cd\u6784\u7b14\u8bb0.md": "8f978d7b01c9f49dca9eeaff0d163cec6da085e2f99ee5a5e803d72306e7a72f",
"tests/audit/\u517c\u5bb9\u6027\u6d4b\u8bd5.md": "9c1721a33b381b9c3810545772b022913da06617711b5ba13a3c2c991b81a7f7",
"tests/audit/\u5ba1\u8ba1.md": "0f14ad073a0725134e6391f961c324fd0013c7791fd410713e94ed1ad40b7385",
"tests/audit/\u5ba1\u8ba1\u62a5\u544a_kernel_layer.md": "89893c98ed7c2699157bf728ec0e79b0dd6aff4008ee5c7b77eb052de24033f1",
"tests/conftest.py": "fa0ec26667872c9c1011d608310d2551fd24719b5d216f06d923ff4c74c73237",
"tests/integration/__init__.py": "c354e43ba09b55a8013a2df2069438740b5f48b5917d855e52e33ab5d7da5a6c",
"tests/integration/_cases.py": "ab76ca1096d2d10fb05b3539aa8ed3c7e549619bae6900ac98723f6c3c908f2d",
"tests/integration/test_body_sync_e2e.py": "d29f01771f3512a4b3ad06fae4ee952327d7fd9f0476942402fe92e9e327fcec",
"tests/integration/test_ddf_patch.py": "dda2abba32ca13e17098232f2831a0b1b66439c35f8931d9997a0257250c1281",
"tests/integration/test_numerical_gpu.py": "002a6745929bd5ee86a9491ea9bc3f97602fb825ea17262ea190c9311881100e",
"tests/integration/test_runtime_contracts_gpu.py": "775e578e2e8072af32fc740b2698abbb79454235a0f3ee929ac4c75d747f8db5",
"tests/integration/test_state_gpu.py": "dde0948941e8abbc5ea10a3acb3a35abbaea576f36ecee0f1120fbcf7454d60b",
"tests/integration/test_sync_bodies_skeleton.py": "65f55a0980659b49ae0027f0642a27e2ebaead226ef083f233e878150884b07c",
"tests/integration/test_unified_obs.py": "4a681536099741d92bdc258525fe3374cbdbeba0d49996e53808381a1b6a13fa",
"tests/postproc/experiment.ipynb": "c6b45db1c57200f0777213ef8d44cb4996c1aa7a5fb42b968b77e56f51b4fca4",
"tests/postproc/run_exp_ctrl_matrix_streakline.py": "529d5f31a3862080f890c65177502b589710b2d960ddf131abaf7dc2f9e2a96f",
"tests/postproc/run_exp_ctrl_matrix_vorticity.py": "b7e0c4113111b9b677f321750c0055656ccfa4f45c25fe7846f3ed22f30d1467",
"tests/postproc/run_kan99b_streakline.py": "a2bbf3fc629ea170d2d4879317dbf2b81c43378a328100ac1f2ee8d9895666cb",
"tests/postproc/run_stealth_steady_sweep.py": "3c32c4dede7da77fd6cfbd3f7b1ff43bb11390aaba621883ec96c6c7fdad5af7",
"tests/postproc/streakline_triangle_clean.png": "aa6669de7af6f82e98af25698a15f494e9cea20cb911ad9a30fe52597d33bb79",
"tests/postproc/vorticity_triangle_clean.png": "f831b8143b50f038d5920a0658469622655f34176d30cf7216feff108aa2ecaf",
"tests/screening/run_config_sweep.py": "5030c99923815ed6ad39110cb56f748c579ff4c66c7c1a368ad1a6008017e2ff",
"tests/specs/Kan99b_validation.md": "0d8bf74f2361f863809af1979bf8807adaa423f98321e1104a3d86d8c7a863cf",
"tests/specs/Sah04_validation.md": "1d122d29e281b7f50801b148f3314a0e35fdc27ee7d757c0a661243aa6185fb0",
"tests/specs/exp_ctrl_matrix.md": "5d9dd2e703582572eb68afe3a7096ea43ec82aa03418d20ed283c5365031e433",
"tests/specs/kan99b.md": "b7e0669f0a6b677d902204f3427d1b3ac254bfe70c37d9cf995fb3e8f1fedfb1",
"tests/specs/sah04.md": "33dbe5e0fd63738abd055c4aa403c191b6de04e6efdbc568f1942c6d23c7459f",
"tests/specs/streakline_notes.md": "cd342d214c07eb608ac2e5b8697322c44c31dbf4d27dfdb5409de46ef474df4b",
"tests/unit/__init__.py": "17f57920d9c1ff46096ceb2af008eb38c4b98dc81ffa3c3d310e758e80ca1cd4",
"tests/unit/cpp/collision_regression.cpp": "f17acdff74ab82a62dc5402b42e3f6a149c262e89b140494164d6ebd630f5e14",
"tests/unit/cpp/planar_velocity.cpp": "8dea266984edc69d4e0e68007e038d7a587e99f84e33478d6656a66a56680933",
"tests/unit/cpp/reservoir.cpp": "c3eacaf0271400eb45ad559b571a8f7faa2a809d5f1857ffeb5592addce2cd0c",
"tests/unit/cpp/semantic_regression.cpp": "99dba074c0c0a32ea76026e7d54fc60af8e6d3dc5315c8900c470b4518878f39",
"tests/unit/cpp/slot_profile.cpp": "31ac58ccab175bf79fa59fc46d4c0842df18ab0a5e5916be84760d9da2b75788",
"tests/unit/test_body_flags.py": "ac6409157924e15a13a3d2cc2f1a09014b8b0198ba17c824f412ff20b19e2aac",
"tests/unit/test_build_contracts.py": "7bb237425e8bb481f312fa4841c484e280731e13c7cbb9a53dad3e7f98984ac3",
"tests/unit/test_context_ownership.py": "299fed30dd0f9bd4dadd8b27f50df2a6367bdb0ab2ca3f391f215fde7241f35a",
"tests/unit/test_equilibrium.py": "1ecbcc4547b1c846b75320463d828d6a36b6aae73208084fae476b1001c1bb50",
"tests/unit/test_initializers.py": "8b4e3358d925614984265ae73c142006b48fd1c3918cf84901f18afd9fe68c3a",
"tests/unit/test_numerical_operators.py": "6d1d560ef553a2af7adac7db3e325d96d7fe39073d5fe3e0e982439537385b27",
"tests/unit/test_pending_edits.py": "905a0dff23b123e8e38aaf364984c810fe51c39acd64aa271e343a4701d3d024",
"tests/unit/test_planar_velocity.py": "b656da0880b4234b1db805544edbe0d2473cbcc7c2c869c71d8251337f62a982",
"tests/unit/test_reservoir.py": "e718c78a53c3941aba7feb8ae4e8bb0b1726c1145de84febf91220c1917991c9",
"tests/unit/test_simulation_lifecycle.py": "77abdc33218c35e9c8b62dbd99ceddbaccd8417e7f0b539ea8859ea0175c663a",
"tests/unit/test_slot_velocity.py": "6a9494de9a32c350389ccbed58af48951f6b25a21a258537d2e8b73eb67cb11d",
"tests/unit/test_state_regressions.py": "0f69cfeb83428192f95688c76abcae7e5b9cf5f27c52bca4ac20c7f320044374",
"tests/unit/test_sync_plan.py": "983313ef783143231fa5a392f85f3bac011184773ccaf5d946504c206cabb721",
"tests/validation/analyze_j3_saved_frames.py": "438f67dac682b94c4950626f8de4fdcde48c3a4e9ecf8fdf1b0ada4b6e0e781a",
"tests/validation/diagnose_j3_lags.py": "286fcd65b3261667a847b9b26e213d0af92cf459faa6bbd774f78c8479ce31d7",
"tests/validation/multigrid/MULTIGRID_VERIFICATION_STRATEGY.md": "d4f3473da44abee6031a0e1bd4d0ca589077a18f15d2461836e4d2ebb98e458a",
"tests/validation/multigrid/cpu_reference.py": "bba2a06a9f6517b32079ffff15e4060d8c3b7ed35f16ca134e1877226c9e4e1e",
"tests/validation/multigrid/cpu_reference_v0.2.py": "b6adbad7da625ef6a6b97958ea9625030ed92676d0cada48e061c87bcf7ca8c9",
"tests/validation/multigrid/cpuref_0_3_evidence/README.txt": "1947ee0232b88b3cc2c506d0b0af5ba051ecc94aa8f7f09228ef3939cc95919b",
"tests/validation/multigrid/cpuref_0_3_evidence/README_grok.md": "065947e15b2242bce7d3eb05a3acdbb59939c621dcd5d31540ad4a1bd4416818",
"tests/validation/multigrid/cpuref_0_3_evidence/baseline.json": "0daaccee41cabeb17a00e2405e2c7fd0b80d36f2d01778eb39c9fd22b13d2d47",
"tests/validation/multigrid/cpuref_0_3_evidence/manifest.json": "2850ecaf2e19d010ba35eb54162371d82cc1a092831e08a03b6adf75a614988b",
"tests/validation/multigrid/cpuref_0_3_evidence/results_horsea.json": "914389afc39752bcd4132aa21fc8d5cbcf0ca75b1efd6a49becab15c2fa3361b",
"tests/validation/multigrid/cpuref_0_3_evidence/stdout_grok.txt": "73e4ef01138842981daaa534390f1463839e63833c11f4e8872f94f8eaadc717",
"tests/validation/multigrid/cpuref_0_3_evidence/stdout_horsea.txt": "457f1d2173496554c87ca6e61df518c0b8f1e0a28cdfd94b94ebbb61bc459d70",
"tests/validation/multigrid/local_stress_observable_v1.py": "0e2777990359a7cf2bb29884173b7b01de37c49bcf49e1f29fc59fe83d62b456",
"tests/validation/multigrid/local_stress_v1_evidence/README.txt": "4f62314876047ee437bb9ecbf84798d2a9f6e85f6a3aef260277b85bcdb35fae",
"tests/validation/multigrid/local_stress_v1_evidence/TABLE_local_stress_observable_v1.md": "d8ff0568d9c473a4bb09396a8948ddc8dc5af2f0f3a23ac84d238814fc779501",
"tests/validation/multigrid/local_stress_v1_evidence/baseline.json": "64f6541447afbd15b1b15d802ad6f1b5042aaf84e7d4d2414e4ed4c52cf70507",
"tests/validation/multigrid/local_stress_v1_evidence/comparison.json": "be236671a501c31c06f7e266f6e0c0c2a89aede321a483452050ff37bf84c84a",
"tests/validation/multigrid/local_stress_v1_evidence/manifest.json": "3a9fa8c7d691c1b8c24f05940eb724d30b890dd8ed636551068d2633d7db2f70",
"tests/validation/multigrid/local_stress_v1_evidence/results_horsea.json": "f17b4644d19eb75d55deb7021ab679cb9e7922a2b46f1cacf8b6da6bfb9a2690",
"tests/validation/multigrid/local_stress_v1_evidence/run_once.py": "e629800291ef65ffea8555f66ec80bf15200552540b2a493a677bfb53d0830b3",
"tests/validation/multigrid/local_stress_v1_evidence/source_manifest.json": "d2cf90b73458f493c665c9a281d06aef0c190cf0d143639fb77ab838c78f020c",
"tests/validation/multigrid/local_stress_v1_evidence/stdout_horsea.txt": "882f2cfb1dbdf82cce63c011397e7c2e6307bbcfec42a3510648d328cd6ddcfe",
"tests/validation/multigrid/local_stress_v1_evidence/stdout_local_stress_observable_v1.txt": "6a826e5ad729ce45af6879a07a1c659d8b4a21403fde5b9c6d9696cc6a5b09d4",
"tests/validation/multigrid/shear_diagnostic_v0_2.py": "a8b1cf2f7abd00efc4d068bbd27bb2317144a6ca4c545d9b2e0dcf421eadebc6",
"tests/validation/multigrid/shear_v0_2_evidence/README.txt": "4306a34b6896bd6e7a5c2ca71d68e18450359239d0c7ad7a67a4e83e7155959a",
"tests/validation/multigrid/shear_v0_2_evidence/baseline.json": "98a7853341ea732762c7506694e3a867a7259bf110e9e461ea84f741fd9ab829",
"tests/validation/multigrid/shear_v0_2_evidence/comparison.json": "41c00372099dd04b6d323785e9eaf4fec09da1753d3d150ffa230800f904142f",
"tests/validation/multigrid/shear_v0_2_evidence/joint_report.md": "1860b8082108c8b8a87998af90cd0b81dce1c04e9f6c67b41e0912f9fef6cc9c",
"tests/validation/multigrid/shear_v0_2_evidence/manifest.json": "e42aa19e91608164698bea42da88fbbfab8b0f87cc37b27c5baf165453a4fdb0",
"tests/validation/multigrid/shear_v0_2_evidence/results_horsea.json": "c2d7ce8d16a0f47baff0788a153353dcf67088da974d9cd3d521b04ecd91ee05",
"tests/validation/multigrid/shear_v0_2_evidence/run_once.py": "6698a2e040c56be949b809387d4518eb0ba82d34cc9d99640da4f8bf3c35c23f",
"tests/validation/multigrid/shear_v0_2_evidence/source_manifest.json": "56fbd0259ff3d4dbd14ace52f64e249a435e9df91732b0e4027def2c344c2e6a",
"tests/validation/multigrid/shear_v0_2_evidence/stdout_grok.txt": "28ddd1267ca91a772f5a6bfc65d949c9a4ea7dac5c9ba3a0bdb168492810b670",
"tests/validation/multigrid/shear_v0_2_evidence/stdout_horsea.txt": "0577df5b3f5cb3c7b6e1ef2de71344f8fd3e6d959117487a06cbaf7f2afa3dea",
"tests/validation/multigrid/test_cpu_reference.py": "ade5d4827f971aed7174b59d83769e7aa542338e625a9fc8db1e8b1805cb74ca",
"tests/validation/multigrid/test_open_corner_negative_control.py": "59a6f8ca80cdd63cb7827fbebf9b4b555c3793f19dd6bca801544ec10b5cbe1b",
"tests/validation/multigrid/test_tron_additions.py": "8e7a6a90b85e64c7326719e7b8bca2f6d34fb4c80690f0685f7e291ab93bd2a4",
"tests/validation/run_j1.py": "51b758a271ff358f931b3140a80082294a67e66c2fec0f8c19319e37f92aadc4",
"tests/validation/run_j2_slot.py": "b7d2d3aa06fcafc3ac62ed4a50892afbdb7f86e5720ce75a39ce317b6f571dad",
"tests/validation/run_j3_coverage.py": "329869519b7078e854d96241a7aad8ef93f35ac9be83f0be502c3a93523c3b13",
"tests/validation/run_j3_reservoir.py": "47535bc3569ce68c888d38978bc4f9077fd763a17829c20c081be52bb18a2903",
"tests/validation/run_kan99b_rotating_cylinder.py": "323186429a100f36b41ab9b81ade2da6a47e93be3ccb7034a3a6b97f4ee8eb00",
"tests/validation/run_perf_baseline.py": "93dde2eb1132f45ea69e1e285ff421dc97a83651a22c79571f299c1909650721",
"tests/validation/run_poiseuille.py": "e529288e2ffa8e00d281a9006723954d60a96ae4d025e8f28656c09287d4ff46",
"tests/validation/run_sah04_st_matrix.py": "9b9c0ce063e07a316846635ee769b837ed26be6bf039f78f4219c10b516f8006",
"tests/validation/test_sensor_accuracy.py": "c6038a9e7a597a1738814bd15e6ecf357cfd271cdc2a132d47943c5280ac0ef9"
}
}
@@ -0,0 +1,317 @@
diff --git a/src/CelerisLab/lbm/refinement.py b/src/CelerisLab/lbm/refinement.py
new file mode 100644
index 0000000..0a6f563
--- /dev/null
+++ b/src/CelerisLab/lbm/refinement.py
@@ -0,0 +1,138 @@
+"""CPU preparation for one fixed D2Q9 2:1 patch; no coupled stepper yet.
+
+Cell indices use y*nx+x; population slots use q*(nx*ny)+cell, matching
+core/layout.cuh. Bounds are half-open (x0, y0, x1, y1) in coarse cells.
+The four fine halo cells implement the pinned CPUREF volumetric geometry.
+Topology does not encode physical boundary conditions or obstacle safety.
+"""
+from dataclasses import dataclass, replace
+from numbers import Integral
+
+import numpy as np
+
+from ..config import LBMConfig
+from .descriptors import D2Q9_EX, D2Q9_EY
+
+ACTIVE, INNER_GHOST, OUTER_GHOST = 0, 1, 2
+HALO = 4
+
+
+def _readonly(values, dtype):
+ array = np.ascontiguousarray(values, dtype=dtype)
+ array.setflags(write=False)
+ return array
+
+
+@dataclass(frozen=True, eq=False)
+class FixedPatch2D:
+ """Layer metadata and compact exchange tables, constructed by from_config.
+
+ Shapes are (ny, nx), including the fine halo. ``fine_origin`` is its lower
+ cell edge in coarse physical units, with coarse dx=dt=1 and fine dx=dt=.5.
+ ``ghost_fine`` and ``ghost_coarse`` pair fine cells with coarse donors.
+ ``coalesce_coarse`` contains incoming population slots; each corresponding
+ row of ``coalesce_fine`` contains four fine slots in (dy, dx) row order.
+ Weights are all 1/4. Closed corner links are included even when the coarse
+ donor is uncovered. These tables contain no DDF data and allocate no GPU.
+
+ This is preparation, not permission to advance these levels with OneStep:
+ its channel boundaries and fused collision do not implement patch coupling.
+ """
+ coarse_shape: tuple[int, int]
+ bounds: tuple[int, int, int, int]
+ tau_coarse: float
+ tau_fine: float
+ fine_kind: np.ndarray
+ ghost_fine: np.ndarray
+ ghost_coarse: np.ndarray
+ coalesce_coarse: np.ndarray
+ coalesce_fine: np.ndarray
+
+ @classmethod
+ def from_config(cls, cfg: LBMConfig, bounds) -> "FixedPatch2D":
+ """Prepare maps without changing cfg or allocating coarse-sized tables.
+
+ The initial backend contract is D2Q9/SRT/FP32/unshifted/double_buffer,
+ without LES. Two coarse cells of margin keep all halo donors in bounds;
+ this does NOT certify that those donors are fluid or periodic.
+ """
+ checked = replace(cfg)
+ checked.validate()
+ if (not checked.is_d2q9 or checked.collision != "SRT"
+ or checked.streaming != "double_buffer"
+ or checked.store_precision != "FP32"
+ or checked.ddf_shifting or checked.les_enabled):
+ raise ValueError("FixedPatch2D requires D2Q9/SRT/FP32/unshifted/double_buffer without LES")
+ bounds = tuple(bounds)
+ if len(bounds) != 4 or any(isinstance(v, (bool, np.bool_))
+ or not isinstance(v, Integral) for v in bounds):
+ raise ValueError("bounds must be four integers: (x0, y0, x1, y1)")
+ x0, y0, x1, y1 = bounds = tuple(map(int, bounds))
+ nx, ny = checked.nx, checked.ny
+ if not (2 <= x0 < x1 <= nx - 2 and 2 <= y0 < y1 <= ny - 2):
+ raise ValueError("patch must be nonempty with a two-coarse-cell margin")
+ fx, fy = 2 * (x1 - x0) + 2 * HALO, 2 * (y1 - y0) + 2 * HALO
+ if max(nx * ny, fx * fy) > np.iinfo(np.uint32).max:
+ raise ValueError("layer cell counts exceed uint32 indexing")
+ tau_c = 3.0 * checked.viscosity + 0.5
+ tau_f = 6.0 * checked.viscosity + 0.5
+ if not checked.omega_min <= 1.0 / tau_f <= checked.omega_max:
+ raise ValueError("fine relaxation rate lies outside configured omega guards")
+
+ kind = np.full((fy, fx), OUTER_GHOST, dtype=np.uint8)
+ kind[2:-2, 2:-2] = INNER_GHOST
+ kind[HALO:-HALO, HALO:-HALO] = ACTIVE
+ gy, gx = np.nonzero(kind != ACTIVE)
+ ghost_fine = gy * fx + gx
+ ghost_coarse = (y0 + (gy - HALO) // 2) * nx + x0 + (gx - HALO) // 2
+
+ targets, sources = [], []
+ # Only the outside ring can receive fine-to-coarse populations.
+ # Integer doubled midpoints include all eight diagonal corner passes.
+ for y in range(y0 - 1, y1 + 1):
+ xs = range(x0 - 1, x1 + 1) if y in (y0 - 1, y1) else (x0 - 1, x1)
+ for x in xs:
+ for q in range(1, 9):
+ mx, my = 2 * x + 1 - D2Q9_EX[q], 2 * y + 1 - D2Q9_EY[q]
+ if 2 * x0 <= mx <= 2 * x1 and 2 * y0 <= my <= 2 * y1:
+ targets.append(q * nx * ny + y * nx + x)
+ a, b = HALO + 2 * (x - x0), HALO + 2 * (y - y0)
+ sources.append([q * fx * fy + (b + dy) * fx + a + dx
+ for dy in (0, 1) for dx in (0, 1)])
+ return cls((ny, nx), bounds, tau_c, tau_f,
+ _readonly(kind, np.uint8),
+ _readonly(ghost_fine, np.uint32),
+ _readonly(ghost_coarse, np.uint32),
+ _readonly(targets, np.uint64),
+ _readonly(sources, np.uint64).reshape(-1, 4))
+
+ @property
+ def fine_shape(self) -> tuple[int, int]:
+ return self.fine_kind.shape
+
+ @property
+ def fine_origin(self) -> tuple[float, float]:
+ return self.bounds[0] - HALO / 2, self.bounds[1] - HALO / 2
+
+ @property
+ def table_bytes(self) -> int:
+ return sum(a.nbytes for a in (self.fine_kind, self.ghost_fine,
+ self.ghost_coarse, self.coalesce_coarse,
+ self.coalesce_fine))
+
+ def check_synchronization(self, coarse_steps: int, fine_steps: int, *, phase: str) -> None:
+ """Check a proposed backend handoff; does not convert or collide data.
+
+ Production storage is g=C(f), while CPUREF returns arrival_f. A future
+ g-to-g coarse step must collide coarse cells once and fine cells twice;
+ fine halo ghosts never collide. Coalescence must precede coarse collision.
+ Converting reference f to g for comparison is an observation operation,
+ not an additional production collision. Counts here are completed steps.
+ """
+ if phase != "postcollision_g":
+ raise ValueError("patch backend handoff requires postcollision_g")
+ for value in (coarse_steps, fine_steps):
+ if isinstance(value, (bool, np.bool_)) or not isinstance(value, Integral) or value < 0:
+ raise ValueError("step counts must be nonnegative integers")
+ if fine_steps != 2 * coarse_steps:
+ raise ValueError("levels are not synchronized: fine_steps must equal 2*coarse_steps")
diff --git a/tests/unit/test_refinement.py b/tests/unit/test_refinement.py
new file mode 100644
index 0000000..bfe8e74
--- /dev/null
+++ b/tests/unit/test_refinement.py
@@ -0,0 +1,167 @@
+"""CPU geometry/contracts only: no time stepping, CUDA or reference edits."""
+import hashlib
+import importlib.util
+from pathlib import Path
+import sys
+import unittest
+
+import numpy as np
+
+from CelerisLab.config import LBMConfig
+from CelerisLab.lbm import refinement
+from CelerisLab.lbm.descriptors import D2Q9_EX, D2Q9_EY
+from CelerisLab.lbm.refinement import ACTIVE, INNER_GHOST, OUTER_GHOST, FixedPatch2D
+
+ROOT = Path(__file__).resolve().parents[2]
+
+
+def config(**kwargs):
+ return LBMConfig(**dict(nx=16, ny=16, viscosity=.1, **kwargs))
+
+
+class FixedPatchTests(unittest.TestCase):
+ def test_source_and_cpu_import_boundary(self):
+ self.assertEqual(Path(refinement.__file__).resolve(),
+ ROOT / "src/CelerisLab/lbm/refinement.py")
+ self.assertFalse(any(name == "pycuda" or name.startswith("pycuda.") for name in sys.modules))
+ self.assertNotIn("CelerisLab.simulation", sys.modules)
+ self.assertNotIn("CelerisLab.lbm.field", sys.modules)
+
+ def test_all_tables_match_pinned_reference_without_advancing(self):
+ path = ROOT / "tests/validation/multigrid/cpu_reference.py"
+ self.assertEqual(hashlib.sha256(path.read_bytes()).hexdigest(),
+ "bba2a06a9f6517b32079ffff15e4060d8c3b7ed35f16ca134e1877226c9e4e1e")
+ spec = importlib.util.spec_from_file_location("refinement_geometry_reference", path)
+ ref = importlib.util.module_from_spec(spec)
+ sys.modules[spec.name] = ref
+ spec.loader.exec_module(ref)
+ maps = ref.build_maps(ref.make_spec(collision="srt"))
+ p = FixedPatch2D.from_config(config(), (4, 4, 12, 12))
+ np.testing.assert_array_equal(p.fine_kind, maps.fine_class)
+ gy, gx = np.nonzero(~maps.fine_active)
+ np.testing.assert_array_equal(p.ghost_fine, gy * 24 + gx)
+ np.testing.assert_array_equal(p.ghost_coarse,
+ maps.fine_parent[gy] * 16 + maps.fine_parent[gx])
+ targets = [q * 256 + y * 16 + x for q, y, x in maps.coalesce]
+ sources = [[q * 576 + b * 24 + a
+ for b in (4 + 2 * (y - 4), 5 + 2 * (y - 4))
+ for a in (4 + 2 * (x - 4), 5 + 2 * (x - 4))]
+ for q, y, x in maps.coalesce]
+ np.testing.assert_array_equal(p.coalesce_coarse, targets)
+ np.testing.assert_array_equal(p.coalesce_fine, sources)
+ self.assertEqual(len(targets), 100)
+ self.assertEqual(len(set(p.coalesce_fine.ravel().tolist())), 400)
+ self.assertEqual(np.count_nonzero(p.fine_kind == ACTIVE), 256)
+ self.assertEqual(len(p.ghost_fine), 320)
+ self.assertEqual(self.corner_pass_count(p), 8)
+
+ @staticmethod
+ def corner_pass_count(p):
+ ny, nx = p.coarse_shape
+ x0, y0, x1, y1 = p.bounds
+ count = 0
+ for slot in p.coalesce_coarse.tolist():
+ q, cell = divmod(slot, nx * ny)
+ y, x = divmod(cell, nx)
+ sx, sy = x - D2Q9_EX[q], y - D2Q9_EY[q]
+ count += not (x0 <= sx < x1 and y0 <= sy < y1)
+ return count
+
+ def test_rectangular_shifted_patch_against_geometric_definition(self):
+ p = FixedPatch2D.from_config(LBMConfig(nx=22, ny=18, viscosity=.1), (7, 6, 13, 10))
+ expected = set()
+ for y in range(18):
+ for x in range(22):
+ if 7 <= x < 13 and 6 <= y < 10:
+ continue
+ for q, (cx, cy) in enumerate(zip(D2Q9_EX, D2Q9_EY)):
+ if q and 7 <= x + .5 - cx / 2 <= 13 and 6 <= y + .5 - cy / 2 <= 10:
+ expected.add(q * 22 * 18 + y * 22 + x)
+ self.assertEqual(set(p.coalesce_coarse.tolist()), expected)
+ self.assertEqual(p.fine_shape, (16, 20))
+ self.assertEqual(p.fine_origin, (5., 4.))
+ fy, fx = p.fine_shape
+ for coarse_slot, children in zip(p.coalesce_coarse.tolist(), p.coalesce_fine.tolist()):
+ q, cell = divmod(coarse_slot, 22 * 18)
+ y, x = divmod(cell, 22)
+ centers = []
+ for slot in children:
+ fq, fine_cell = divmod(slot, fy * fx)
+ b, a = divmod(fine_cell, fx)
+ self.assertEqual(fq, q)
+ self.assertEqual(p.fine_kind[b, a], INNER_GHOST)
+ centers.append((p.fine_origin[0] + (a + .5) / 2,
+ p.fine_origin[1] + (b + .5) / 2))
+ np.testing.assert_array_equal(np.mean(centers, axis=0), (x + .5, y + .5))
+ self.assertEqual(self.corner_pass_count(p), 8)
+
+ def test_smallest_patch_and_extreme_halo_margin(self):
+ p = FixedPatch2D.from_config(LBMConfig(nx=5, ny=5, viscosity=.1), (2, 2, 3, 3))
+ self.assertEqual(p.fine_shape, (10, 10))
+ self.assertEqual(p.fine_origin, (0., 0.))
+ self.assertEqual((int(p.ghost_coarse.min()), int(p.ghost_coarse.max())), (0, 24))
+ self.assertEqual(np.count_nonzero(p.fine_kind == ACTIVE), 4)
+ self.assertEqual(self.corner_pass_count(p), 8)
+ self.assertTrue(np.all(p.fine_kind.ravel()[p.coalesce_fine % 100] == INNER_GHOST))
+
+ def test_config_and_level_scaling_are_isolated(self):
+ cfg = config()
+ before = vars(cfg).copy()
+ p = FixedPatch2D.from_config(cfg, (4, 4, 12, 12))
+ self.assertEqual(vars(cfg), before)
+ self.assertAlmostEqual(p.tau_coarse, .8)
+ self.assertAlmostEqual(p.tau_fine, 1.1)
+ self.assertAlmostEqual((p.tau_coarse - .5) / 3,
+ (p.tau_fine - .5) / 3 * .5)
+ cfg.nx = 999
+ self.assertEqual(p.coarse_shape, (16, 16))
+
+ def test_tables_are_compact_contiguous_and_readonly(self):
+ small = FixedPatch2D.from_config(config(), (4, 4, 12, 12))
+ large = FixedPatch2D.from_config(LBMConfig(nx=512, ny=256, viscosity=.1), (4, 4, 12, 12))
+ self.assertEqual(small.table_bytes, large.table_bytes)
+ self.assertEqual(small.table_bytes, 7136)
+ for name, dtype in (("fine_kind", np.uint8), ("ghost_fine", np.uint32),
+ ("ghost_coarse", np.uint32), ("coalesce_coarse", np.uint64),
+ ("coalesce_fine", np.uint64)):
+ array = getattr(small, name)
+ self.assertEqual(array.dtype, dtype)
+ self.assertTrue(array.flags.c_contiguous)
+ with self.assertRaises(ValueError):
+ array.flat[0] = 0
+
+ def test_invalid_geometry_and_index_overflow_rejected_before_allocation(self):
+ for bounds in ((4, 4, 4, 12), (12, 4, 4, 12), (1, 4, 12, 12),
+ (4, 4, 15, 12), (4., 4, 12, 12), (True, 4, 12, 12),
+ (np.bool_(True), 4, 12, 12), (4, 4, 12)):
+ with self.subTest(bounds=bounds), self.assertRaises(ValueError):
+ FixedPatch2D.from_config(config(), bounds)
+ for nx, ny, bounds in ((2**32, 10, (2, 2, 3, 3)),
+ (50000, 50000, (2, 2, 49998, 49998))):
+ with self.assertRaisesRegex(ValueError, "uint32"):
+ FixedPatch2D.from_config(LBMConfig(nx=nx, ny=ny, viscosity=.1), bounds)
+
+ def test_unsupported_backend_and_fine_relaxation_rejected(self):
+ for kwargs in ({"collision": "TRT"}, {"collision": "MRT"}, {"streaming": "esopull"},
+ {"ddf_shifting": True}, {"les_enabled": True},
+ {"store_precision": "FP16S"}, {"lattice_model": "D3Q19"},
+ {"data_type": "FP64"}, {"omega_min": 1.0}):
+ cfg = config(**kwargs)
+ before = vars(cfg).copy()
+ with self.subTest(kwargs=kwargs), self.assertRaises(ValueError):
+ FixedPatch2D.from_config(cfg, (4, 4, 12, 12))
+ self.assertEqual(vars(cfg), before)
+
+ def test_handoff_rejects_wrong_phase_and_unsynchronized_counts(self):
+ p = FixedPatch2D.from_config(config(), (4, 4, 12, 12))
+ p.check_synchronization(0, 0, phase="postcollision_g")
+ p.check_synchronization(8, 16, phase="postcollision_g")
+ for c, f, phase in ((8, 16, "arrival_f"), (8, 15, "postcollision_g"),
+ (-1, -2, "postcollision_g"), (1., 2, "postcollision_g"),
+ (True, 2, "postcollision_g"), (1, np.bool_(True), "postcollision_g")):
+ with self.subTest(c=c, f=f, phase=phase), self.assertRaises(ValueError):
+ p.check_synchronization(c, f, phase=phase)
+
+
+if __name__ == "__main__":
+ unittest.main(verbosity=2)
@@ -0,0 +1,59 @@
{
"verified_utc": "2026-10-13T07:17:04.249396+00:00",
"head": "6e3756c587ec08ab6a55c4a1a5f4671822d3f0a0",
"old_files_checked": 303,
"old_files_changed": [],
"old_git_status_entries_removed": [],
"only_authorized_new_paths": true,
"reference_sha256": "bba2a06a9f6517b32079ffff15e4060d8c3b7ed35f16ca134e1877226c9e4e1e",
"tests_passed": 9,
"numerical_steps": 0,
"gpu_used": false,
"numerical_coupling_implemented": false,
"single_grid_path_modified": false,
"review": "Independent local subagent review completed; numerical coupling proposal awaits coordinating Claude/Grok joint review. Prior Claude local_stress code review remains incomplete.",
"new_files_except_this_manifest": [
{
"path": "research/refinement_prepare_20261013/README.txt",
"bytes": 8939,
"lines": 137,
"sha256": "eee46f01add6ed7a5da76da76c98da628e13b930cfc49785399d7afbedbfd95f"
},
{
"path": "research/refinement_prepare_20261013/baseline.json",
"bytes": 46348,
"lines": 311,
"sha256": "5cc3c35faac9bb43a0017d83ddfca330d7da93f1e6407391da56b2e9df3b28b6"
},
{
"path": "research/refinement_prepare_20261013/incremental.patch",
"bytes": 15751,
"lines": 317,
"sha256": "df01345b8e2c33ebf6cdcbbb5104f02c4d7c239a6e6cafab1833228791bfa9a7"
},
{
"path": "research/refinement_prepare_20261013/validation.json",
"bytes": 3567,
"lines": 55,
"sha256": "945f4c3604ae0eae91c29741a39588207cfff3e05646e03a12d074a299956c2f"
},
{
"path": "research/refinement_prepare_20261013/validation.txt",
"bytes": 873,
"lines": 14,
"sha256": "5b5a8e9d455d37064c6709dcfd14e89ba66f51f09a11a9863b5cab67ac651d42"
},
{
"path": "src/CelerisLab/lbm/refinement.py",
"bytes": 6593,
"lines": 138,
"sha256": "554735c5613129eb29f339c6aeeb4f3a3bbc5aba67558be51fbf7c2fb6ac442a"
},
{
"path": "tests/unit/test_refinement.py",
"bytes": 8470,
"lines": 167,
"sha256": "90751142f920f1c5e988577a45afa94871a6617009cdc78323a87fc7795f4634"
}
]
}
@@ -0,0 +1,55 @@
{
"started_utc": "2026-10-13T07:13:02.579165+00:00",
"parent_command": [
"env",
"PYTHONPATH=/home/frank14f/CelerisLab/src",
"OPENBLAS_NUM_THREADS=1",
"PYTHONDONTWRITEBYTECODE=1",
"PYTHONNOUSERSITE=1",
"PYTHONOPTIMIZE=0",
"/usr/bin/prlimit",
"--as=268435456",
"--fsize=2097152",
"--core=0",
"--",
"/home/frank14f/anaconda3/envs/pycuda_3_10/bin/python",
"-B",
"-c",
"\nimport datetime,hashlib,importlib.metadata,json,os,resource,subprocess,sys,time\nfrom pathlib import Path\nroot=Path('/home/frank14f/CelerisLab'); e=root/'research/refinement_prepare_20261013'\nlimits=['/usr/bin/prlimit','--as=268435456','--fsize=2097152','--core=0','--']\nenv={k:os.environ[k] for k in ('PYTHONPATH','OPENBLAS_NUM_THREADS','PYTHONDONTWRITEBYTECODE','PYTHONNOUSERSITE','PYTHONOPTIMIZE')}\nassert env['PYTHONPATH']==str(root/'src')\nassert resource.getrlimit(resource.RLIMIT_AS)==(268435456,268435456)\nassert resource.getrlimit(resource.RLIMIT_FSIZE)==(2097152,2097152)\ncommand=limits+[sys.executable,'-B',str(root/'tests/unit/test_refinement.py')]\nresult={'started_utc':datetime.datetime.now(datetime.timezone.utc).isoformat(),'parent_command':['env']+[k+'='+v for k,v in env.items()]+limits+sys.orig_argv,'command':command,'cwd':str(root),'environment':env,'python':sys.version,'numpy':importlib.metadata.version('numpy'),'limits':{'address_space_bytes':268435456,'file_bytes':2097152,'core_bytes':0},'numerical_steps':0,'GPU_used':False,'kernel_source_read_only':str(root/'src/CelerisLab/lbm/kernels'),'source_sha256':hashlib.sha256((root/'src/CelerisLab/lbm/refinement.py').read_bytes()).hexdigest()}\nwith (e/'validation.txt').open('xb',buffering=0) as log:\n start=time.monotonic()\n run=subprocess.run(command,cwd=root,stdout=log,stderr=subprocess.STDOUT,check=False)\n result.update(returncode=run.returncode,elapsed_seconds=time.monotonic()-start,child_peak_rss_MiB=resource.getrusage(resource.RUSAGE_CHILDREN).ru_maxrss/1024,parent_peak_rss_MiB=resource.getrusage(resource.RUSAGE_SELF).ru_maxrss/1024,completed_utc=datetime.datetime.now(datetime.timezone.utc).isoformat())\nresult['stdout_bytes']=(e/'validation.txt').stat().st_size\nwith (e/'validation.json').open('x') as f:json.dump(result,f,indent=2);f.write('\\n')\nprint(json.dumps({k:v for k,v in result.items() if k not in ('parent_command','environment')},indent=2))\nassert result['stdout_bytes']<2097152\nsys.exit(run.returncode)\n"
],
"command": [
"/usr/bin/prlimit",
"--as=268435456",
"--fsize=2097152",
"--core=0",
"--",
"/home/frank14f/anaconda3/envs/pycuda_3_10/bin/python",
"-B",
"/home/frank14f/CelerisLab/tests/unit/test_refinement.py"
],
"cwd": "/home/frank14f/CelerisLab",
"environment": {
"PYTHONPATH": "/home/frank14f/CelerisLab/src",
"OPENBLAS_NUM_THREADS": "1",
"PYTHONDONTWRITEBYTECODE": "1",
"PYTHONNOUSERSITE": "1",
"PYTHONOPTIMIZE": "0"
},
"python": "3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0]",
"numpy": "1.26.4",
"limits": {
"address_space_bytes": 268435456,
"file_bytes": 2097152,
"core_bytes": 0
},
"numerical_steps": 0,
"GPU_used": false,
"kernel_source_read_only": "/home/frank14f/CelerisLab/src/CelerisLab/lbm/kernels",
"source_sha256": "554735c5613129eb29f339c6aeeb4f3a3bbc5aba67558be51fbf7c2fb6ac442a",
"returncode": 0,
"elapsed_seconds": 0.2744845859706402,
"child_peak_rss_MiB": 36.00390625,
"parent_peak_rss_MiB": 18.5,
"completed_utc": "2026-10-13T07:13:02.866335+00:00",
"stdout_bytes": 873
}
@@ -0,0 +1,14 @@
test_all_tables_match_pinned_reference_without_advancing (__main__.FixedPatchTests) ... ok
test_config_and_level_scaling_are_isolated (__main__.FixedPatchTests) ... ok
test_handoff_rejects_wrong_phase_and_unsynchronized_counts (__main__.FixedPatchTests) ... ok
test_invalid_geometry_and_index_overflow_rejected_before_allocation (__main__.FixedPatchTests) ... ok
test_rectangular_shifted_patch_against_geometric_definition (__main__.FixedPatchTests) ... ok
test_smallest_patch_and_extreme_halo_margin (__main__.FixedPatchTests) ... ok
test_source_and_cpu_import_boundary (__main__.FixedPatchTests) ... ok
test_tables_are_compact_contiguous_and_readonly (__main__.FixedPatchTests) ... ok
test_unsupported_backend_and_fine_relaxation_rejected (__main__.FixedPatchTests) ... ok
----------------------------------------------------------------------
Ran 9 tests in 0.072s
OK