Commit Graph

6 Commits

Author SHA1 Message Date
admin 8b82d3c4e4 fix: leapfrog 模式缺少边界反弹导致粒子穿模 2026-06-18 14:28:56 +08:00
admin 80b7467421 fix: leapfrog 模式缺少边界反弹,粒子穿透地板
问题:leapfrog 模式的主循环直接调用 leapfrog_staggered_step,
未经过 apply_motion_update,因此 Limit_in_box(边界反弹)
从未被执行。粒子超出 z<-20 后被 wrap_position 回绕到顶端,
导致物理行为完全错误。

修复:
1. 在预热和记录两个循环中,leapfrog 路径后显式调用
   Limit_in_box(与 apply_motion_update 内的非 leapfrog 路径一致)
2. 移除 apply_motion_update 末尾重复的 Limit_in_box 调用
   (统一到主循环中执行)
2026-06-18 09:28:38 +08:00
admin 20bfdf2f18 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(不输出文件,只显示动画窗口)
2026-06-11 13:31:33 +08:00
admin 80520590d1 feat: 新增波形能量动画系统 plot_wave.py
- 创建 plot_wave.py: 从 display.txt 读取原子位移数据
  绘制纵波(x) + 横波(y) + 横波(z) 波形随时间的动画
  同时绘制系统动能/弹性势能/总能量/输入功率(dE/dt)时变曲线
  输出 wave_animation.gif
- 所有 input.txt 新增 step_plot_wave: 0 开关
- case05 开启 step_plot_wave: 1
- dynamics.py disp_data 新增 bond_stiffness/bond_rest_lengths
- 更新案例文档
2026-06-11 12:39:46 +08:00
admin 854f00ae44 feat: 增加驱动力系统、Marker渲染模式、动画防闪退、案例文档
- 新增 driving_force 驱动力系统(driver.txt 定义,支持周期控制)
- 新增 use_marker 渲染开关(GPU实例化点精灵,提升大量原子性能)
- 修复动画闪退:独立控制台、错误日志、启动存活检测
- 重绘 draw.py 架构:双渲染模式 + 预分配键线缓冲区
- 修复 raw trajectory 采样时间变量遮蔽 bug
- 重构 case05: 60原子一维链 + 驱动力 + 完整案例文档
- 修复所有案例 Readme.md 编码(GBK → UTF-8)
- 所有 input.txt 新增 driver_file / driving_force / use_marker 参数
2026-06-10 15:34:53 +08:00
admin 5de80d4f7e modified: CMakeLists.txt
modified:   INSTALL.md
	modified:   README.md
	modified:   build_release_zip.py
	modified:   compute.py
	new file:   doc/index.html
	modified:   dynamics.py
	modified:   engines/c/main.c
	modified:   engines/cpp/main.cpp
	modified:   engines/fortran/main.f90
	modified:   examples/case01/input/coord.txt
	renamed:    examples/case01/input/parameters.yaml -> examples/case01/input/input.txt
	modified:   examples/case01/run_dynamics.py
	new file:   examples/case02/input/bond.txt
	new file:   examples/case02/input/connection.txt
	new file:   examples/case02/input/coord.txt
	new file:   examples/case02/input/input.txt
	new file:   examples/case02/run_dynamics.py
2026-05-20 16:03:59 +08:00