research: VIV driver — fail closed on any non-finite recorded output

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-10-30 15:39:19 +00:00
co-authored by Claude Opus 5.5
parent a9ca6a9a16
commit fb507aa1f2
3 changed files with 18 additions and 4 deletions
+8
View File
@@ -86,3 +86,11 @@ def test_viv_config_passes_the_real_loader(tmp_path):
assert (cfg.nx, cfg.ny) == (nx, ny) == (3000, 2400)
assert cfg.collision == "MRT" and cfg.y_wall_bc == "free_slip" and cfg.velocity == .04
assert math.isclose(cfg.viscosity, .04 * 40 / 150)
def test_finite_rejects_any_nonfinite_recorded_output():
row = (3, .1, .2, .3, .4, .5, .6, .7, 0.0)
assert viv.finite(row)
for i in range(len(row)):
for bad in (float("nan"), float("inf"), -float("inf")):
assert not viv.finite(row[:i] + (bad,) + row[i + 1:])