feat: 新增 plot_wave_save_gif/plot_wave_save_mp4 开关

- 所有 input.txt 新增 plot_wave_save_gif / plot_wave_save_mp4 参数
- dynamics.py 将参数传入 plot_wave()
- plot_wave.py 根据 save_gif/save_mp4 标志条件保存文件
- 默认均为 0(不输出文件,只显示动画窗口)
This commit is contained in:
2026-06-11 13:31:33 +08:00
parent 131f52fe19
commit 20bfdf2f18
8 changed files with 63 additions and 36 deletions
+5 -1
View File
@@ -507,7 +507,11 @@ def run_case(config_path, runtime_base, input_dir="input", output_dir="output",
try:
import plot_wave as pw
print("[run] 正在绘制波形与能量图…")
pw.plot_wave(str(output_dir_abs))
pw.plot_wave(
str(output_dir_abs),
save_gif=int(config.get("plot_wave_save_gif", 0)),
save_mp4=int(config.get("plot_wave_save_mp4", 0)),
)
except Exception as e:
print(f"[run] 绘制波形图失败: {e}")