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:
1 parent
a9ca6a9a16
commit
fb507aa1f2
3 files changed
+18
-4
No files matched your search
@@ -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:])
|
||||
Reference in new issue
Block a user