From 3a6923b77df4ff804f8a464ffb417d1c5569cc31 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 3 Jul 2026 21:57:10 +0800 Subject: [PATCH] Finalize Shell 0.6.1 gates and documentation --- CMakeLists.txt | 9 +++++ README.md | 5 ++- docs/06_test_and_verification_plan.md | 35 +++++++++++++++++- docs/09_release_history.md | 52 +++++++++++++++++++++++++-- docs/11_benchmark_matrix.md | 33 +++++++++++++++-- tests/source_size_exceptions.txt | 1 + todo.md | 48 ++++++++++++------------- 7 files changed, 153 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a470fc5..a9a9505 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -849,3 +849,12 @@ add_test( --exceptions "${CMAKE_CURRENT_SOURCE_DIR}/tests/source_size_exceptions.txt" ) set_tests_properties(solid_051_source_size PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") + +add_test( + NAME shell_061_source_size + COMMAND "${Python3_EXECUTABLE}" + "${CMAKE_CURRENT_SOURCE_DIR}/tools/testing/check_source_size.py" + --root "${CMAKE_CURRENT_SOURCE_DIR}" + --exceptions "${CMAKE_CURRENT_SOURCE_DIR}/tests/source_size_exceptions.txt" +) +set_tests_properties(shell_061_source_size PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/README.md b/README.md index e863e50..f5aa1b6 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,11 @@ SPHLite 的编译和测试要求应与 FEMLite 保持一致风格: - 0.6.0 新增 Shell material/section 输入、厚度/3 点和 5 点积分、剪切修正、Shell material 错误路径、未绑定 Shell material warning 和 active Shell 缺失 Shell section error。 - 0.6.0 新增 Shell 粒子级状态数组、厚度积分点状态数组、active Shell 默认初始化、非 Shell 安全默认值和 3/5 点厚度积分规则。 - `Shell` 在 0.6.0 只交付输入与状态基线,不交付 director/转动更新、Mindlin-Reissner 应变路径、Shell 材料点更新、内力、显式推进、restart、公开 API 或生产计算路径。 -- 0.6.1 进入 Shell director 输入/推断、局部基、角速度、参考面积/惯量和 Mindlin-Reissner 小变形运动学开发。 +- 0.6.1 新增 Shell 显式 director、`*ORIENTATION`、section orientation、三角形/四边形参考面推断、参考面积、等效转动惯量和 director 质量诊断。 +- 0.6.1 新增 Shell 局部 `e1/e2/e3` 坐标系、角速度/角加速度状态、`*SPHLITE SHELL ROTATION` 输入和 director 小转动更新入口。 +- 0.6.1 新增 Mindlin-Reissner 小变形膜应变、弯曲应变、横向剪切应变、厚度积分点应变增量映射和运动学诊断查询入口。 - `Shell` 在 0.6.1 仍不交付材料点更新、内力、显式推进、restart、公开接口或生产计算路径。 - 0.5.0 本地 gate 已通过:完整 CTest 83/83,0.4.1 Explosive 回归 gate 14/14,0.5.0 Solid 专项 gate 17/17,`source_size` 1/1,`git diff --check` 通过。 - 0.5.1 本地 gate 已通过:完整 CTest 99/99,0.5.0 Solid 回归 gate 17/17,0.5.1 Solid 专项 gate 16/16,`source_size`/`solid_source_size`/`solid_051_source_size` 3/3,`git diff --check` 通过。 - 0.6.0 本地 gate 已通过:完整 CTest 103/103,Shell 输入/状态基线专项 gate 4/4,`source_size` 1/1,`git diff --check` 通过。 +- 0.6.1 本地 gate 已通过:完整 CTest 113/113,Shell 运动学专项 gate 13/13,`source_size`/`shell_061_source_size` 2/2,`git diff --check` 通过。 diff --git a/docs/06_test_and_verification_plan.md b/docs/06_test_and_verification_plan.md index 2878e36..40bca76 100644 --- a/docs/06_test_and_verification_plan.md +++ b/docs/06_test_and_verification_plan.md @@ -296,6 +296,39 @@ git diff --check 0.6.0 不验收完整 `Shell` 动力学闭环,不验收真实水-气-结构工程爆炸响应,不验收真实 FEM-SPH 联合运行,也不验收工程级船舱破坏 benchmark。0.6.0 的 Shell gate 只证明 Shell material/section 输入、厚度/积分点/剪切修正校验、Shell 粒子状态数组和厚度积分点状态数组在小型模型内可构建、可检查。 +## 7.7 0.6.1 Release Gate + +0.6.1 在 0.6.0 `Shell` 输入与状态基线之上新增 director 输入/推断、局部坐标、转动状态、参考面积/惯量、Mindlin-Reissner 小变形膜/弯曲/横向剪切应变和厚度积分点应变增量映射。当前 gate 仍限定为小型运动学链路,不把 Shell 材料点更新、Shell 内力、Shell 内力矩、完整显式推进、restart、公开接口或工程响应纳入验收。 + +0.6.1 Shell 运动学专项 gate 包含: +- `input_shell_section` +- `input_shell_errors` +- `shell_state_build` +- `shell_section_integration` +- `shell_director_input` +- `shell_reference_geometry` +- `shell_director_update` +- `shell_rotation_kinematics` +- `shell_local_frame` +- `shell_membrane_strain` +- `shell_bending_strain` +- `shell_shear_strain` +- `shell_ip_strain_increment` +- `shell_061_source_size` + +0.6.1 本地 release gate: +```powershell +cmake --build build-codex-unix --parallel +ctest --test-dir build-codex-unix --output-on-failure +ctest --test-dir build-codex-unix -R "^(input_shell_section|input_shell_errors|shell_state_build|shell_section_integration|shell_director_input|shell_reference_geometry|shell_director_update|shell_rotation_kinematics|shell_local_frame|shell_membrane_strain|shell_bending_strain|shell_shear_strain|shell_ip_strain_increment)$" --output-on-failure +ctest --test-dir build-codex-unix -R "^(source_size|shell_061_source_size)$" --output-on-failure +git diff --check +``` + +2026-07-03 本地结果:完整 CTest 113/113 通过,0.6.1 Shell 运动学专项 gate 13/13 通过,`source_size`/`shell_061_source_size` 2/2 通过,`git diff --check` 通过。 + +0.6.1 不验收完整 `Shell` 动力学闭环,不验收 Shell 材料点更新、内力、内力矩、稳定时间步、显式推进生产路径、restart、公开 C ABI/C++/Python/CLI 诊断字段、真实水-气-结构工程爆炸响应、真实 FEM-SPH 联合运行或工程级船舱破坏 benchmark。 + ## 8. Source Size 门禁 从第一版开始设置 source size 门禁。建议沿用 FEMLite 风格: @@ -305,7 +338,7 @@ git diff --check - 必要例外登记到例外清单。 - stale exception 应被检查。 -0.6.0 当前只新增 Shell 输入与状态基线测试,尚未新增 Shell 接口层膨胀。`src/solid/sph_solid.f90` 继续作为 Solid 输入/material 表 owner,并在例外清单中登记说明;后续若拆分 Solid material ownership 应同步移除此例外。Shell 后续进入 director、材料点、内力、restart 和接口层时,应按实际膨胀情况拆分模块并追加专门 source size gate。 +0.6.1 当前新增 Shell 运动学路径,`src/shell/sph_shell.f90` 暂作为 Shell 输入、状态和运动学 owner 登记说明性例外,并新增 `shell_061_source_size` gate 保持 stale exception 检查。后续进入 Shell 材料点、内力、restart 或接口层前,应优先拆分 Shell geometry/kinematics/diagnostics 模块,减少主文件例外范围。`src/solid/sph_solid.f90` 继续作为 Solid 输入/material 表 owner,并在例外清单中登记说明;后续若拆分 Solid material ownership 应同步移除此例外。 具体阈值可在实现阶段与 FEMLite 保持一致或按 SPHLite 文件结构微调。 diff --git a/docs/09_release_history.md b/docs/09_release_history.md index d82c352..bdfa94a 100644 --- a/docs/09_release_history.md +++ b/docs/09_release_history.md @@ -1,10 +1,10 @@ # 09 版本历史与验收记录 -文档状态:0.6.0 本地验收记录 +文档状态:0.6.1 本地验收记录 ## 1. 当前状态 -SPHLite 当前发布 0.6.0 `Shell` 输入与状态基线版本。本版本在 0.5.1 已完成的 Solid 稳定化和结构算法加固基础上,新增 Shell material/section 输入、厚度/积分点/剪切修正校验、Shell 粒子级状态数组和厚度积分点状态数组。0.6.0 不交付完整 Shell 动力学闭环、真实水-气-结构工程爆炸响应、真实 FEM-SPH 联合运行或工程级船舱破坏 benchmark。 +SPHLite 当前发布 0.6.1 `Shell` 运动学基线版本。本版本在 0.6.0 Shell 输入与状态基线之上,新增 Shell director、section orientation、参考面积/转动惯量、局部坐标系、角速度/角加速度状态、director 小转动更新、Mindlin-Reissner 小变形应变和厚度积分点应变增量映射。0.6.1 不交付完整 Shell 动力学闭环、Shell 材料点更新、Shell 内力/内力矩、真实水-气-结构工程爆炸响应、真实 FEM-SPH 联合运行或工程级船舱破坏 benchmark。 ## 2. 规划版本线 @@ -436,6 +436,54 @@ cmake --build build-codex-unix - 0.6.0 已于 2026-07-03 完成本地发布记录提交,并准备标记 `v0.6.0`。 +### 0.6.1 本地验收记录 + +记录日期:2026-07-03 + +本地构建目录:`build-codex-unix` + +版本定位: + +- 0.6.1 是 0.6 `Shell` 板壳粒子版本线的运动学基线版本。 +- 0.6.1 在 0.6.0 Shell 输入与状态基线之上新增显式 director 输入、`*ORIENTATION` 解析、Shell section orientation 引用和未使用 orientation warning。 +- 0.6.1 支持从显式 set、section orientation、三角形/四边形参考面或局部粒子云推断 active Shell director,并记录 director 来源、退化数量和长度偏差诊断。 +- 0.6.1 新增 active Shell 参考面积、等效转动惯量、局部 `e1/e2/e3` 坐标系、角速度、角加速度、最大角速度和 director 小转动更新入口。 +- 0.6.1 新增 Mindlin-Reissner 小变形膜应变、弯曲应变、横向剪切应变、厚度积分点应变增量映射和运动学诊断查询入口。 +- 0.6.1 的 Shell 发布范围仍是可测运动学基线,不是完整 Shell 结构动力学闭环。 + +验收结果: + +- `cmake --build build-codex-unix --parallel` 通过。 +- `ctest --test-dir build-codex-unix --output-on-failure` 通过:113/113。 +- 0.6.0 Shell 输入/状态基线专项 gate 通过:4/4。 +- 0.6.1 Shell 运动学专项 gate 通过:13/13。 +- `ctest --test-dir build-codex-unix -R "^(source_size|shell_061_source_size)$" --output-on-failure` 通过:2/2。 +- `git diff --check` 通过。 +- 代码、构建脚本、测试和工具目录中未新增 FEMLite 直接依赖。 + +不交付范围: + +- 0.6.1 不交付 Shell Johnson-Cook 材料点更新。 +- 0.6.1 不交付 Shell 内力、Shell 内力矩或 Shell 稳定时间步。 +- 0.6.1 不交付完整显式推进生产路径、Shell restart、公开 C ABI、C++ wrapper、Python ctypes 或 CLI 诊断字段。 +- 0.6.1 不交付真实水-气-结构工程爆炸响应、真实 FEM-SPH 接触耦合或连续体耦合。 +- 0.6.1 不交付工程级船舱破坏 benchmark、复杂撕裂面追踪、穿孔、碎片云、焊缝失效库、大规模并行或 GPU 后端。 + +已知限制: + +- Shell 小变形路径当前只形成运动学基线和积分点应变映射,不驱动材料点、内力或显式推进生产计算。 +- `src/shell/sph_shell.f90` 暂作为 0.6.1 Shell 输入、状态、几何和运动学 owner 保留说明性 source size 例外,后续在材料点、内力、restart 或接口层进入前应优先拆分 geometry、kinematics 和 diagnostics 子模块。 +- Shell 厚度积分点应变增量已经可测,但尚未用于真实厚度积分材料更新或失效演化。 + +发布建议: + +- 建议将 0.6.1 作为 Shell 运动学基线版本发布。 +- 0.6.1 发布后,后续主线应优先完成 Shell 材料点、内力/内力矩、稳定时间步和最小显式推进闭环;若 `sph_shell.f90` 继续增长,应先完成 Shell 子模块拆分。 + +发布记录: + +- 0.6.1 已于 2026-07-03 完成本地验收记录准备,并等待发布提交。 + 后续每个版本应记录: - 完成能力。 diff --git a/docs/11_benchmark_matrix.md b/docs/11_benchmark_matrix.md index d4a04e6..0095474 100644 --- a/docs/11_benchmark_matrix.md +++ b/docs/11_benchmark_matrix.md @@ -1,10 +1,10 @@ # 11 Benchmark 与验收矩阵 -文档状态:0.6.0 gate 记录 +文档状态:0.6.1 gate 记录 ## 1. 当前状态 -0.6.0 在 0.5.1 `Solid` 稳定化 gate 基础上新增 Shell 输入与状态基线 gate,并继续保留工程 benchmark 矩阵作为长期规划。本版本的 Shell material/section 输入、厚度/积分点/剪切修正校验、粒子级状态数组和厚度积分点状态数组只用于小规模链路检查,不作为工程精度 benchmark。 +0.6.1 在 0.6.0 Shell 输入与状态基线 gate 基础上新增 Shell director、参考几何、局部坐标系、转动状态、Mindlin-Reissner 小变形应变和厚度积分点应变增量 gate,并继续保留工程 benchmark 矩阵作为长期规划。本版本的 Shell 运动学能力只用于小规模链路检查和后续材料点/内力开发前置验收,不作为工程精度 benchmark。 ## 2. 0.1.0 Release Gate @@ -348,6 +348,35 @@ |---|---|---| | 2026-07-03 | `build-codex-unix` | 完整 CTest 103/103 通过,0.6.0 Shell 输入/状态基线 gate 4/4 通过,`source_size` 1/1 通过,`git diff --check` 通过 | +## 2.12 0.6.1 Release Gate + +0.6.1 默认 gate 在 0.6.0 Shell 输入/状态基线 gate 基础上新增 Shell director、参考几何、局部坐标系、转动状态、Mindlin-Reissner 小变形应变和厚度积分点应变增量验收。当前 gate 只覆盖 Shell 运动学基线,不验收完整 Shell 动力学闭环。 + +| 测试名 | 类型 | 验收点 | +|---|---|---| +| `input_shell_section` | Fortran input | 0.6.0 Shell material、section、厚度积分规则和剪切修正输入回归 | +| `input_shell_errors` | Fortran input | 0.6.0 Shell 输入错误路径回归 | +| `shell_state_build` | Fortran module | 0.6.0 Shell 粒子级状态数组和非 Shell 安全默认值回归 | +| `shell_section_integration` | Fortran module | 0.6.0 3 点/5 点厚度积分规则和积分点状态数组回归 | +| `shell_director_input` | Fortran input/module | 显式 Shell director、section orientation、非法向量错误和未使用 orientation warning | +| `shell_reference_geometry` | Fortran module | 三角形/四边形参考面 director、参考面积、等效转动惯量和非 Shell 默认值 | +| `shell_director_update` | Fortran module | Shell 内部角速度设置、小转动 director 更新、归一化保护和无 Shell no-op | +| `shell_rotation_kinematics` | Fortran input/module | `*SPHLITE SHELL ROTATION` 输入、角加速度默认值、最大角速度和 Solid 隔离 | +| `shell_local_frame` | Fortran module | Shell 局部 `e1/e2/e3` 正交、右手性、orientation/reference tangent 选择和非 Shell 默认值 | +| `shell_membrane_strain` | Fortran module | 刚体平动零膜应变、单轴膜应变、简单剪切膜应变和膜应变诊断 | +| `shell_bending_strain` | Fortran module | 均匀 director 零弯曲、受控曲率弯曲应变和弯曲诊断 | +| `shell_shear_strain` | Fortran module | 横向剪切应变、Shell/Solid 隔离和 failed Shell 跳过 | +| `shell_ip_strain_increment` | Fortran module | 3 点/5 点厚度积分点应变增量映射、未使用积分点清零、诊断和 Gas no-op | +| `shell_061_source_size` | 工具门禁 | Shell 0.6.1 source size、说明性例外和 stale exception 检查 | + +0.6.1 不验收 Shell Johnson-Cook 材料点更新、Shell 内力、Shell 内力矩、稳定时间步、完整显式推进、restart、公开接口层或生产计算路径,也不验收真实水-气-结构工程爆炸响应和真实 FEM-SPH 联合运行。Shell 0.6.1 gate 只证明运动学基线和积分点应变映射可测,不代表工程级板壳变形、损伤或撕裂预测能力。 + +本地验收记录: + +| 日期 | 构建目录 | 结果 | +|---|---|---| +| 2026-07-03 | `build-codex-unix` | 完整 CTest 113/113 通过,0.6.0 Shell 输入/状态基线 gate 4/4 通过,0.6.1 Shell 运动学 gate 13/13 通过,`source_size`/`shell_061_source_size` 2/2 通过,`git diff --check` 通过 | + ## 3. 基础数值矩阵 | 领域 | 测试或 benchmark | 验收点 | diff --git a/tests/source_size_exceptions.txt b/tests/source_size_exceptions.txt index 527849a..a925662 100644 --- a/tests/source_size_exceptions.txt +++ b/tests/source_size_exceptions.txt @@ -6,6 +6,7 @@ src/database/sph_database.f90 src/gas/sph_gas.f90 # Gas material/EOS dispatch owner; source handling split to sph_gas_source.f90. src/input/sph_input_reader.f90 src/interface/sph_api.f90 +src/shell/sph_shell.f90 # Shell 0.6.1 input/state/kinematics owner; geometry/kinematics split planned after baseline. src/solid/sph_solid.f90 # Solid input/material table owner; dynamics/API/restart are split separately. src/output/sph_restart.f90:sph_restart_read tests/module/test_restart.f90:assert_restart_file_content diff --git a/todo.md b/todo.md index 051b0a1..6353a67 100644 --- a/todo.md +++ b/todo.md @@ -172,27 +172,27 @@ ## 阶段 F:门禁、source size、文档和发布准备 -- [ ] 复核 `src/shell/sph_shell.f90` 文件规模。 -- [ ] 判断是否需要拆分 Shell geometry 模块。 -- [ ] 判断是否需要拆分 Shell kinematics 模块。 -- [ ] 判断是否需要拆分 Shell diagnostics 模块。 -- [ ] 如需拆分,新增 Shell 模块并保持 Fortran API 语义不变。 -- [ ] 如需拆分,更新 CMake 中 Shell 源文件列表。 -- [ ] 新增 `shell_061_source_size` 检查。 -- [ ] 将 `shell_061_source_size` 接入 CTest。 -- [ ] 更新 `tests/source_size_exceptions.txt` 中必要的 Shell 说明性例外。 -- [ ] 运行完整 CTest。 -- [ ] 运行 0.6.0 Shell 输入与状态基线专项 gate。 -- [ ] 运行 0.6.1 Shell 运动学专项 gate。 -- [ ] 运行 source size 相关 gate。 -- [ ] 运行 `git diff --check`。 -- [ ] 更新 README 中 0.6.1 当前状态和不交付范围。 -- [ ] 更新 `docs/06_test_and_verification_plan.md` 的 0.6.1 release gate。 -- [ ] 更新 `docs/09_release_history.md` 的 0.6.1 本地验收记录。 -- [ ] 更新 `docs/11_benchmark_matrix.md` 的 0.6.1 gate 矩阵。 -- [ ] 确认 0.6.1 文档不宣称完整 Shell 动力学闭环。 -- [ ] 确认 0.6.1 文档不宣称真实水-气-结构工程爆炸响应。 -- [ ] 确认 0.6.1 文档不宣称真实 FEM-SPH 联合运行。 -- [ ] 确认输出目录、CSV、VTK、restart 和临时结果未提交。 -- [ ] 确认代码、构建脚本、测试和工具目录未新增 FEMLite 直接依赖。 -- [ ] 准备 0.6.1 发布提交说明。 +- [x] 复核 `src/shell/sph_shell.f90` 文件规模。 +- [x] 判断是否需要拆分 Shell geometry 模块。 +- [x] 判断是否需要拆分 Shell kinematics 模块。 +- [x] 判断是否需要拆分 Shell diagnostics 模块。 +- [x] 如需拆分,新增 Shell 模块并保持 Fortran API 语义不变。 +- [x] 如需拆分,更新 CMake 中 Shell 源文件列表。 +- [x] 新增 `shell_061_source_size` 检查。 +- [x] 将 `shell_061_source_size` 接入 CTest。 +- [x] 更新 `tests/source_size_exceptions.txt` 中必要的 Shell 说明性例外。 +- [x] 运行完整 CTest。 +- [x] 运行 0.6.0 Shell 输入与状态基线专项 gate。 +- [x] 运行 0.6.1 Shell 运动学专项 gate。 +- [x] 运行 source size 相关 gate。 +- [x] 运行 `git diff --check`。 +- [x] 更新 README 中 0.6.1 当前状态和不交付范围。 +- [x] 更新 `docs/06_test_and_verification_plan.md` 的 0.6.1 release gate。 +- [x] 更新 `docs/09_release_history.md` 的 0.6.1 本地验收记录。 +- [x] 更新 `docs/11_benchmark_matrix.md` 的 0.6.1 gate 矩阵。 +- [x] 确认 0.6.1 文档不宣称完整 Shell 动力学闭环。 +- [x] 确认 0.6.1 文档不宣称真实水-气-结构工程爆炸响应。 +- [x] 确认 0.6.1 文档不宣称真实 FEM-SPH 联合运行。 +- [x] 确认输出目录、CSV、VTK、restart 和临时结果未提交。 +- [x] 确认代码、构建脚本、测试和工具目录未新增 FEMLite 直接依赖。 +- [x] 准备 0.6.1 发布提交说明。