Tests load research drivers via importlib under unique module names
instead of a bare 'import run' (shared-process collision between the
Dütsch and VIV drivers). lifecycle.md qualifies immutable geometry and the
host-only get_flags for translating circles; supported_settings.md points to
the dense-only moving-circle feature; leontini_viv_predeclare.md is renamed
viv_re150_predeclare.md (Re 150 Kolahdouz/Qin case) with references updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/moving_bodies.md gains a current status/user-guide section; the staged
contract below it is kept unchanged as the design record.
configs/CONFIG.md states the single dense outer-boundary package.
docs/validation/moving_bodies_stage1.md summarizes the Dütsch and VIV
evidence with SHAs and binding limitations. One stale source comment fixed
(comment only).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seed quiet check reads states y_t, t in [n_seed - 5 T_n, n_seed); an
exception sets status 'error: ...' before the report is written; an output
directory that already holds report.json or steps.npy is refused; --max-steps
gives a plumbing smoke that is never scored. Predeclare states the code's
actual uniform-U fluid initial condition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
viv.py: exact undamped harmonic update under the last completed force,
y = 0 response cycles with eligibility, 10-cycle blocks, settle/score with
deterministic restart, conditional velocity seed, scoring metrics. run.py:
Simulation-API driver (set_body + run(1)), RHS = CME + Wen from the moving
diagnostics, raw CME/obs/node terms logged, fail-closed bounds, caps and
input rejection, outputs outside the checkout. CPU tests for the logic and
the real config loader. Predeclare: stale failure sentence removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At the first step of each scored phase bin in the declared cycles, write a
near-body crop (±8D × ±6D, float32 ux, uy, rho + fluid mask), an 8x
fluid-weighted downsample of the whole domain, the same-step force and the
analytic centre; at every bin read, append fluid-mean rho/ux/uy and crop,
inlet- and outlet-strip means to trend.npy. Fail closed if the crop leaves the
domain or clips the swept body. Without --dump-fields nothing changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage and no_donor/eq_only totals now stop at the horizon; HF energy
uses one-sided Parseval weights (interior bins x2, DC/Nyquist x1). Focused
regressions for both. run.py, src and thresholds unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Default (no --horizon) keeps the original cap-11 scoring. --horizon N
requires complete cycles 1..N in every case, passes the horizon to
common_window and labels the JSON. The unqualified phase-locked HF force
component is reported per case. Protocol section 6b declares the D40/60D
31-cycle duration-only diagnostic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generated config failed the real loader (KeyError: cuda). It now copies
src/CelerisLab/configs/config_lbm.json and overrides only grid, physics,
collision/streaming/storage, y walls, LES off and uniform inlet profile;
inlet scheme and outlet mode stay the template's and are recorded in
case.json. New CPU test loads the generated file with load_lbm_config.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
common_window requires every pair from each case's own K_case to K+2;
a-priori domain criteria against the 60 D reference (separate from Table 1);
bilinear sampling returns the original fluid corner weight sum; analysis
time-averages bin samples, reports coverage/missing points and fails closed
on an empty common profile set; cases run to the end of cycle 11.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
protocol.py holds the pure arithmetic (phase/cycle bookkeeping from the right
turning point, 1-degree bins, interval-averaged Morison bases and fit with
added-mass c_i, solid-aware bilinear sampling, settling and common-window
rules). run.py drives the existing Simulation API (set_body + run(1) +
read_force + moving_diagnostics; macroscopic fields and flags only inside the
three phase bins) and writes raw data outside the checkout. analyze.py builds
the cycle ledger, K_case, the common window, Morison fits, Fy sanity and the
cross-resolution waveform difference. CPU tests cover the §6a arithmetic.
Carries the protocol doc from claude/duetsch-protocol 8c1f3c4d.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
memcpy_htod_async needs page-locked host memory. MovingTables allocates one
pinned FP64 buffer at construction (manager.py action pattern) and rewrites
it only when the records change; every upload is followed by a stream sync
in Simulation._run_moving before the next one, so no copy is in flight when
it is reused. The advance test fixture now binds the real LBMStepper.step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests cover failures at the first upload, the step-group sync, the no_donor
check, the hold-record upload and its asynchronous sync: before the commit
point the target stays pending, after it applied matches the moved device;
in every case run and direct stepper reuse are refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MovingCircleCells reclassifies swept-band cells from immutable old/new FP64
predicates: covered cells add their raw momentum and mass to diagnostics and
become solid; uncovered cells are refilled in all nine slots from donors
fluid in both geometries (mean density, NEQ from the best-aligned donor,
wall velocity at the cell), counting eq_only and no_donor. MovingCircleLinks
adds the translation velocity to the wall velocity. Simulation.run(1)
uploads the motion record, runs M1 then M2, synchronizes, rejects a nonzero
no_donor count and only then commits the target and uploads the hold
record; any failure marks the Simulation failed. Targets block direct
stepper calls and multi-step runs. get_flags reads device flags back when
translating circles exist. Contract section 10b.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
moving_diagnostics is context_bound, so stream synchronization and the
DTOH copy run inside one owner activation. Tests: owner stays active
through sync and download; launch order moving -> static curved -> OneStep
with a real static link count and the buffer swap between steps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MovingCircleLinks computes the cut links of each translating circle from an
FP64 {cx, cy, r} table over its swept band (same q/hit/clamp/fallback order
as build_cut_links, explicit _rn operations) and applies the unchanged
apply_bouzidi_link with spin wall velocity. obs keeps its contract; a
separate per-body diagnostics buffer records CME, the Wen term u_w*dm,
link_dm and the link count. Moving tables are built at initialize and
attached to the stepper, which then launches the kernel before the static
curved kernel; until then direct and run steps stay blocked. Displacement
is disabled: set_body offset/vx/vy on a translating circle raises before
mutation. Contract section 10a documents S2a and the S3 pending rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_failed_moving_step_marks_simulation_failed uses an owner double that
refuses activation after close like CudaContext and expects 'CUDA context
is closed'; test_passive_overlap_failure_keeps_live_state binds the real
moving-body validation methods and a stepper double.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No reachable path leaves a stale latch (Grok review): initialize and
_recompile recompute it, and post-init removal of a translating circle
cannot commit. simulation.py is back to b448bc3f; the latch-only test is
dropped. The recompile, close-retry and tightened after-close tests stay.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps the stationary add/remove path unchanged (test_surface_actuation builds
a Simulation without a stepper).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One helper sets stepper.blocked from _moving_bodies() after add_body,
pre-init remove_body, initialize and stepper recreation, so the latch never
disagrees with motion ownership. Tests: latch follows add/remove; the
after-close assertion checks the actual refusal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LBMStepper.step raises before any launch or buffer swap when the owner has
set 'blocked'; Simulation sets it when a translating circle is declared, at
initialize and after stepper recreation. Tests: direct-stepper guard (zero
launches, no swap, unchanged step count), spin/multi-step/checkpoint run
variants, run(0) keeps the pending target, static runs proceed, mixed
moving/static packing parity with the moving id absent, failure refusal of
checkpoint calls, no retry and no re-entry after close.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed MovingCircle.advance now calls the owner hook, so the Simulation
is marked failed (Jet lifecycle) and refuses run/step/sync until close().
Adds host tests for set_body routing on real objects, initialize band and
mode rejections before mutation, exclusion from static link packing, and
the Simulation failure lifecycle. Contract status line updated for S1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MovingCircle keeps the applied offset and an optional pending target apart,
validates targets against the applied offset (box, Euclidean 0.5-cell step,
speed, no sliding hold) and commits only after upload, step and sync succeed;
any failure after the upload attempt is fail-closed. Simulation.add_body
(translation=...) declares one; moving circles are excluded from the packed
static links, unsupported modes and swept-band placement are rejected at
initialize, and every positive-step run raises before any device write until
the moving kernels exist. Host tests include a refill-donor enumeration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Carries the reviewed S0 draft into the S1 branch and fixes: applied stores
only the offset, explicit 'pending is not None', reject a hold target with
nonzero translational velocity, single Euclidean 0.5-cell bound.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stage history and verification, historical label on the migration map,
host-preparation/device order, pair accessors, per-level state split into
fixed plan structure / mutable boundary data / runtime _Level, the two
block_collide families, and the deferred items with their evidence needs.
Doc-only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final private names (_device_boundaries/_level_jets/_exchange_*/_level_blocks
-> _boundaries record fields / layout.block), public boundaries = host view,
and the plan-versus-device (_Level) lifecycle. Doc-only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>