Finalize 0.3.0 Gas interfaces and gate
This commit is contained in:
@@ -27,6 +27,8 @@ def main() -> int:
|
||||
raise AssertionError("Python constants are not locked")
|
||||
if not hasattr(solver.lib, "sphlite_get_water_summary"):
|
||||
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 solver.version() != (0, 3, 0):
|
||||
raise AssertionError("Python version mismatch")
|
||||
|
||||
@@ -45,6 +47,8 @@ def main() -> int:
|
||||
raise AssertionError("solid inspect summary mismatch")
|
||||
if "water_mass" not in solid_summary or "dt_cfl" not in solid_summary:
|
||||
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")
|
||||
solver.set_output_directory(root / "build-codex-unix")
|
||||
solver.write_output(0, 0.0)
|
||||
restart = root / "build-codex-unix" / "python_restart.tmp"
|
||||
@@ -82,6 +86,24 @@ def main() -> int:
|
||||
finally:
|
||||
water.finalize()
|
||||
|
||||
gas = SPHLite(args.library)
|
||||
gas.initialize()
|
||||
try:
|
||||
gas_input = root / "tests" / "data" / "gas_ideal_minimal_030.inp"
|
||||
gas_summary = gas.inspect(gas_input)
|
||||
if gas_summary["particles"] != 4:
|
||||
raise AssertionError("gas inspect particle count mismatch")
|
||||
if gas_summary["gas_volume"] <= 0.0:
|
||||
raise AssertionError("gas summary volume mismatch")
|
||||
if gas_summary["gas_max_pressure"] <= 0.0:
|
||||
raise AssertionError("gas summary pressure mismatch")
|
||||
if gas_summary["gas_equivalent_radius"] <= 0.0:
|
||||
raise AssertionError("gas bubble radius mismatch")
|
||||
if gas_summary["gas_dtcrit"] <= 0.0:
|
||||
raise AssertionError("gas dt mismatch")
|
||||
finally:
|
||||
gas.finalize()
|
||||
|
||||
bad_water = SPHLite(args.library)
|
||||
bad_water.initialize()
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user