Expose Solid summary interfaces
This commit is contained in:
@@ -37,6 +37,8 @@ def main() -> int:
|
||||
raise AssertionError("Python wrapper is missing Explosive release C ABI")
|
||||
if not hasattr(solver.lib, "sphlite_set_ignition_point"):
|
||||
raise AssertionError("Python wrapper is missing Explosive ignition C ABI")
|
||||
if not hasattr(solver.lib, "sphlite_get_solid_summary"):
|
||||
raise AssertionError("Python wrapper is missing Solid C ABI diagnostics")
|
||||
if solver.version() != (0, 5, 0):
|
||||
raise AssertionError("Python version mismatch")
|
||||
|
||||
@@ -63,11 +65,18 @@ def main() -> int:
|
||||
raise AssertionError("inspect helper did not include Explosive diagnostics")
|
||||
if "explosive_release_mass_values" not in solid_summary:
|
||||
raise AssertionError("inspect helper did not include Explosive release balance")
|
||||
if solid_summary["solid_particles"] != 4 or solid_summary["solid_mass"] <= 0.0:
|
||||
raise AssertionError("inspect helper did not include Solid diagnostics")
|
||||
if solid_summary["solid_dt_limits"][0] <= 0.0:
|
||||
raise AssertionError("inspect helper did not include Solid dt diagnostics")
|
||||
solver.set_output_directory(root / "build-codex-unix")
|
||||
solver.write_output(0, 0.0)
|
||||
restart = root / "build-codex-unix" / "python_restart.tmp"
|
||||
solver.write_restart(restart)
|
||||
solver.read_restart(restart)
|
||||
restart_summary = solver.solid_summary()
|
||||
if restart_summary["solid_particles"] != 4:
|
||||
raise AssertionError("Solid restart summary mismatch")
|
||||
solver.run_explicit()
|
||||
finally:
|
||||
solver.finalize()
|
||||
|
||||
Reference in New Issue
Block a user