Finalize 0.3.0 Gas interfaces and gate
This commit is contained in:
@@ -68,6 +68,12 @@ def main() -> int:
|
||||
"water_mass",
|
||||
"max_pressure",
|
||||
"dtcrit",
|
||||
"gas_particles",
|
||||
"gas_volume",
|
||||
"gas_mean_pressure",
|
||||
"gas_max_pressure",
|
||||
"gas_equivalent_radius",
|
||||
"gas_dtcrit",
|
||||
"status",
|
||||
):
|
||||
require_field(inspect.stdout, field)
|
||||
@@ -94,9 +100,25 @@ def main() -> int:
|
||||
raise AssertionError("CLI max pressure mismatch")
|
||||
if float(inspect_fields["dtcrit"]) <= 0.0:
|
||||
raise AssertionError("CLI dtcrit mismatch")
|
||||
if int(inspect_fields["gas_particles"]) != 0:
|
||||
raise AssertionError("CLI water inspect gas particle count mismatch")
|
||||
if inspect_fields["status"] != "ok":
|
||||
raise AssertionError("CLI status field mismatch")
|
||||
|
||||
gas_model = str(Path(args.input).parent / "gas_ideal_minimal_030.inp")
|
||||
gas_inspect = run_command([exe, gas_model])
|
||||
gas_fields = read_fields(gas_inspect.stdout)
|
||||
if int(gas_fields["gas_particles"]) != 4:
|
||||
raise AssertionError("CLI gas particle count mismatch")
|
||||
if float(gas_fields["gas_volume"]) <= 0.0:
|
||||
raise AssertionError("CLI gas volume mismatch")
|
||||
if float(gas_fields["gas_max_pressure"]) <= 0.0:
|
||||
raise AssertionError("CLI gas pressure mismatch")
|
||||
if float(gas_fields["gas_equivalent_radius"]) <= 0.0:
|
||||
raise AssertionError("CLI gas radius mismatch")
|
||||
if float(gas_fields["gas_dtcrit"]) <= 0.0:
|
||||
raise AssertionError("CLI gas dt mismatch")
|
||||
|
||||
check = run_command([exe, model, "--check"])
|
||||
if "mode: check" not in check.stdout:
|
||||
raise AssertionError("check mode not reported")
|
||||
|
||||
Reference in New Issue
Block a user