Extend Gas restart and interfaces

This commit is contained in:
Codex
2026-07-03 11:04:59 +08:00
parent c834006eaf
commit 4203170bea
16 changed files with 620 additions and 31 deletions
+8
View File
@@ -29,6 +29,8 @@ def main() -> int:
raise AssertionError("Python wrapper is not using the C ABI library")
if not hasattr(solver.lib, "sphlite_get_gas_summary"):
raise AssertionError("Python wrapper is missing Gas C ABI diagnostics")
if not hasattr(solver.lib, "sphlite_get_gas_extended_summary"):
raise AssertionError("Python wrapper is missing Gas extended C ABI diagnostics")
if solver.version() != (0, 3, 1):
raise AssertionError("Python version mismatch")
@@ -49,6 +51,8 @@ def main() -> int:
raise AssertionError("inspect helper did not include Water diagnostics")
if "gas_volume" not in solid_summary or "gas_dtcrit" not in solid_summary:
raise AssertionError("inspect helper did not include Gas diagnostics")
if "gas_source_mass" not in solid_summary or "gas_density_range" not in solid_summary:
raise AssertionError("inspect helper did not include Gas extended diagnostics")
solver.set_output_directory(root / "build-codex-unix")
solver.write_output(0, 0.0)
restart = root / "build-codex-unix" / "python_restart.tmp"
@@ -101,6 +105,10 @@ def main() -> int:
raise AssertionError("gas bubble radius mismatch")
if gas_summary["gas_dtcrit"] <= 0.0:
raise AssertionError("gas dt mismatch")
if gas_summary["gas_mass"] <= 0.0:
raise AssertionError("gas extended mass mismatch")
if gas_summary["gas_source_energy"] != 0.0:
raise AssertionError("gas source summary default mismatch")
finally:
gas.finalize()