From d96817549117102cdf7637f72161bdd73eb0c0b8 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 2 Jul 2026 21:44:57 +0800 Subject: [PATCH] Document SPHLite 0.2.0 gate --- README.md | 20 +++++++++---------- docs/09_release_history.md | 25 +++++++++++++++++++++-- docs/11_benchmark_matrix.md | 34 +++++++++++++++++++++++++++++-- todo.md | 40 ++++++++++++++++++------------------- 4 files changed, 85 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index c5aab5f..158d6a3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ SPHLite 是一个面向船舶水下接触爆炸的轻量级 SPH 多物理仿真软件。项目目标是支持水、爆炸产物气体、实体结构粒子、板壳结构粒子、破裂损伤,以及通过外部耦合模块与 FEMLite 进行接触和连续体耦合。 -当前目标版本:0.1.1。该版本定位为框架加固和接口闭合版,在 0.1.0 工程骨架基础上完善输入元数据、粒子状态查询、C ABI/C++/Python/CLI、output、restart 和 CouplingInterface 占位测试,不交付生产级水下爆炸、气泡脉动、结构破裂或 FEM-SPH 联合计算能力。 +当前目标版本:0.2.0。该版本定位为 `Water` 基础 SPH 最小闭环版,在 0.1.1 工程框架和接口闭合基础上交付 3D 水相弱可压 SPH 的核函数、邻域搜索、Tait EOS、人工黏性、连续性方程、显式推进、诊断输出、restart、CLI/API 和 pressure wave smoke。不交付 `Gas`、`Explosive`、`Solid`、`Shell` 的生产路径,也不交付真实 FEM-SPH 联合运行。 代码仓库地址: @@ -63,13 +63,13 @@ SPHLite 的编译和测试要求应与 FEMLite 保持一致风格: ## 当前状态 -0.1.1 当前实现重点包括: +0.2.0 当前实现重点包括: -- CMake/CTest 工程骨架。 -- Fortran 95 核心库、C ABI、C++ 头文件薄包装和 Python `ctypes` 调试入口。 -- Abaqus `.inp` 明确子集的元数据占位解析。 -- 粒子状态查询和常量一致性检查。 -- Velocity-Verlet 显式推进骨架加固。 -- CSV output 和 restart 占位闭环。 -- Water、Gas、Explosive、Solid、Shell 和 CouplingInterface 的占位模块。 -- 0.1.1 release gate 与 source size 门禁。 +- CMake/CTest 工程骨架和 Fortran 95 核心库。 +- C ABI、C++ 头文件薄包装和 Python `ctypes` 调试入口。 +- Abaqus `.inp` 明确子集解析,以及 `*SPHLITE EOS`、`*SPHLITE VISCOSITY`、`*SPHLITE PARTICLE CONTROL`、`*SPHLITE BODY FORCE`。 +- 3D Water 粒子的 Wendland/Cubic 核函数、uniform cell 邻域搜索、Tait EOS、Monaghan 人工黏性、连续性方程和 Velocity-Verlet 显式推进。 +- Water summary、稳定时间步诊断、CSV output、restart 和 pressure wave smoke。 +- CouplingInterface 的中立数据导出、外部粒子力导入和诊断占位;真实 FEM-SPH 联合运行仍由外部 CouplingModule 后续实现。 +- `Gas`、`Explosive`、`Solid`、`Shell` 仍为后续阶段,不在 0.2.0 交付生产计算路径。 +- 0.2.0 release gate 与 source size 门禁。 diff --git a/docs/09_release_history.md b/docs/09_release_history.md index 7126b3c..1f3b38c 100644 --- a/docs/09_release_history.md +++ b/docs/09_release_history.md @@ -1,10 +1,10 @@ # 09 版本历史与验收记录 -文档状态:0.1.1 本地验收通过 +文档状态:0.2.0 本地验收通过 ## 1. 当前状态 -SPHLite 当前完成 0.1.1 框架加固版本的本地验收。该版本只交付可编译、可测试、可扩展的求解器框架和接口闭合,不交付生产级物理算法。 +SPHLite 当前完成 0.2.0 `Water` 基础 SPH 最小闭环版本的本地验收。该版本交付 3D 水相弱可压 SPH 的最小可测试计算路径;`Gas`、`Explosive`、`Solid`、`Shell` 生产路径和真实 FEM-SPH 联合运行仍不在本版本交付范围内。 ## 2. 规划版本线 @@ -73,6 +73,27 @@ cmake --build build-codex-unix --parallel - output、restart 和 CouplingInterface 占位测试通过。 - 文档已明确 0.1.1 不交付生产级 Water、Gas、Explosive、Solid、Shell 物理算法。 +### 0.2.0 本地验收记录 + +记录日期:2026-07-02 + +本地构建目录:`build-codex-unix` + +构建配置: +```powershell +cmake -S . -B build-codex-unix -G "Unix Makefiles" -DCMAKE_C_COMPILER=C:/gcc-16.1.0-64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/gcc-16.1.0-64/bin/g++.exe -DCMAKE_Fortran_COMPILER=C:/gcc-16.1.0-64/bin/gfortran.exe -DCMAKE_MAKE_PROGRAM=C:/gcc-16.1.0-64/bin/make.exe +cmake --build build-codex-unix +``` + +验收结果: +- `sphlite_core`、`sphlite_c`、`sphlite_c_shared`、`sphlite` 和新增测试目标完整编译通过。 +- `ctest --test-dir build-codex-unix --output-on-failure` 通过,18/18。 +- `source_size` 通过。 +- `git diff --check` 通过。 +- `Water` 基础弱可压 SPH 路径通过 kernel、neighbor、EOS、连续性方程、人工黏性、压力力、显式推进、output、restart、pressure wave smoke、C ABI、C++、Python 和 CLI gate。 +- 0.2.0 不交付 `Gas`、`Explosive`、`Solid`、`Shell` 生产路径。 +- 0.2.0 不交付真实 FEM-SPH 联合运行;CouplingInterface 仅提供中立数据导出、外部粒子力导入和诊断占位。 + 后续每个版本应记录: - 完成能力。 diff --git a/docs/11_benchmark_matrix.md b/docs/11_benchmark_matrix.md index b200aeb..0957639 100644 --- a/docs/11_benchmark_matrix.md +++ b/docs/11_benchmark_matrix.md @@ -1,10 +1,10 @@ # 11 Benchmark 与验收矩阵 -文档状态:0.1.1 gate 记录 +文档状态:0.2.0 gate 记录 ## 1. 当前状态 -0.1.1 不交付工程 benchmark,只建立并加固 release gate 和 source size 门禁。后续物理 benchmark 矩阵保留为长期规划。 +0.2.0 交付 `Water` 基础弱可压 SPH 的最小可测试 gate,并继续保留工程 benchmark 矩阵作为长期规划。本版本的 pressure wave smoke 只用于小规模数值链路检查,不作为工程精度 benchmark。 ## 2. 0.1.0 Release Gate @@ -47,6 +47,36 @@ |---|---|---| | 2026-07-02 | `build-codex-unix` | 0.1.1 gate 10/10 通过,`git diff --check` 通过 | +## 2.2 0.2.0 Release Gate + +| 测试名 | 类型 | 验收点 | +|---|---|---| +| `smoke` | Fortran smoke | 版本 0.2.0、生命周期、显式步进错误路径 | +| `input` | Fortran input | Abaqus 子集、Water 关键字、warning/error 路径 | +| `kernel` | Fortran unit | Wendland/Cubic 核函数、梯度、不同 `h(i)` 和错误路径 | +| `neighbor` | Fortran unit | uniform cell/bin 邻域、移动重建、边界和容量错误路径 | +| `water_eos` | Fortran module | Tait EOS、声速、Water summary 和非 Water 跳过 | +| `water_density` | Fortran module | 连续性方程、压缩/拉伸、静止和非 Water 跳过 | +| `water_viscosity` | Fortran module | Monaghan 人工黏性方向、有限性和对称性 | +| `water_force` | Fortran module | 压力力、body force 和非 Water 跳过 | +| `solver_water` | Fortran module | Water 显式步、稳定时间步、Fortran API 和错误路径 | +| `pressure_wave_smoke` | Fortran smoke | 小规模压力扰动传播、质量/动量趋势、输出字段 | +| `output` | Fortran output | 粒子 CSV 和 Water summary CSV | +| `restart` | Fortran restart | Water 状态写入、读回、重建邻域和继续显式步 | +| `coupling_interface` | Fortran coupling | Water 运行后中立导出、外部粒子力导入和诊断占位 | +| `c_api` | C ABI | Water summary/dt limits、错误码和粒子状态 | +| `cpp_api` | C++ wrapper | Water summary/dt limits 薄包装 | +| `python_debug` | Python `ctypes` | Water inspect/run、summary/dt limits 和错误路径 | +| `cli` | CLI | 0.2.0 Water inspect/check/run/output/error 字段 | +| `source_size` | 工具门禁 | Fortran/C/C++/Python 文件大小和 stale exception | + +0.2.0 不验收 `Gas`、`Explosive`、`Solid`、`Shell` 的生产级物理结果,也不验收真实 FEM-SPH 联合运行。 + +本地验收记录: +| 日期 | 构建目录 | 结果 | +|---|---|---| +| 2026-07-02 | `build-codex-unix` | 0.2.0 gate 18/18 通过,`git diff --check` 通过 | + ## 3. 基础数值矩阵 | 领域 | 测试或 benchmark | 验收点 | diff --git a/todo.md b/todo.md index 401c5e2..e78a7c0 100644 --- a/todo.md +++ b/todo.md @@ -417,29 +417,29 @@ - [x] 为新增大文件登记必要例外。 - [x] 确认 stale exception 检查有效。 - [x] 运行 `kernel` 测试。 -- [ ] 运行 `neighbor` 测试。 -- [ ] 运行 `water_eos` 测试。 -- [ ] 运行 `water_density` 测试。 -- [ ] 运行 `water_viscosity` 测试。 -- [ ] 运行 `water_force` 测试。 -- [ ] 运行 `solver_water` 测试。 -- [ ] 运行 `pressure_wave_smoke` 测试。 -- [ ] 运行 0.1.1 既有接口测试。 -- [ ] 运行 `source_size` 测试。 -- [ ] 运行 `git diff --check`。 +- [x] 运行 `neighbor` 测试。 +- [x] 运行 `water_eos` 测试。 +- [x] 运行 `water_density` 测试。 +- [x] 运行 `water_viscosity` 测试。 +- [x] 运行 `water_force` 测试。 +- [x] 运行 `solver_water` 测试。 +- [x] 运行 `pressure_wave_smoke` 测试。 +- [x] 运行 0.1.1 既有接口测试。 +- [x] 运行 `source_size` 测试。 +- [x] 运行 `git diff --check`。 ## 阶段 S:文档同步 -- [ ] 更新 README 当前版本为 0.2.0。 -- [ ] 更新 README 的 0.2.0 实际能力说明。 -- [ ] 记录 0.2.0 交付 Water 基础弱可压 SPH。 -- [ ] 记录 0.2.0 不交付 Gas 生产路径。 -- [ ] 记录 0.2.0 不交付 Explosive 生产路径。 -- [ ] 记录 0.2.0 不交付 Solid 生产路径。 -- [ ] 记录 0.2.0 不交付 Shell 生产路径。 -- [ ] 记录 0.2.0 不交付真实 FEM-SPH 联合运行。 -- [ ] 更新 `docs/09_release_history.md` 的 0.2.0 条目。 -- [ ] 更新 `docs/11_benchmark_matrix.md` 的 0.2.0 gate。 +- [x] 更新 README 当前版本为 0.2.0。 +- [x] 更新 README 的 0.2.0 实际能力说明。 +- [x] 记录 0.2.0 交付 Water 基础弱可压 SPH。 +- [x] 记录 0.2.0 不交付 Gas 生产路径。 +- [x] 记录 0.2.0 不交付 Explosive 生产路径。 +- [x] 记录 0.2.0 不交付 Solid 生产路径。 +- [x] 记录 0.2.0 不交付 Shell 生产路径。 +- [x] 记录 0.2.0 不交付真实 FEM-SPH 联合运行。 +- [x] 更新 `docs/09_release_history.md` 的 0.2.0 条目。 +- [x] 更新 `docs/11_benchmark_matrix.md` 的 0.2.0 gate。 - [ ] 确认 01-06 文档与 0.2.0 实际能力不冲突。 - [ ] 确认文档使用 UTF-8 without BOM。 - [ ] 确认文档不宣称已实现完整水下爆炸。