From f06846dddbb6499ddc1c7778c0b3354f246ac6aa Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 3 Jul 2026 18:46:18 +0800 Subject: [PATCH] Prepare Solid 0.5.1 release gate --- CMakeLists.txt | 19 ++++- Python/sphlite_debug.py | 105 +++-------------------- Python/sphlite_solid.py | 117 ++++++++++++++++++++++++++ README.md | 8 +- docs/06_test_and_verification_plan.md | 39 ++++++++- docs/09_release_history.md | 47 ++++++++++- docs/11_benchmark_matrix.md | 35 +++++++- src/interface/sph_api.f90 | 4 +- src/interface/sph_c_api.c | 105 ----------------------- src/interface/sph_c_api_solid.c | 109 ++++++++++++++++++++++++ src/solid/sph_solid_api.f90 | 108 ++++++++++++++++++++++++ src/solid/sph_solid_dynamics.f90 | 94 --------------------- tests/source_size_exceptions.txt | 1 + todo.md | 50 +++++------ 14 files changed, 512 insertions(+), 329 deletions(-) create mode 100644 Python/sphlite_solid.py create mode 100644 src/interface/sph_c_api_solid.c create mode 100644 src/solid/sph_solid_api.f90 diff --git a/CMakeLists.txt b/CMakeLists.txt index 715a4d5..61b5f30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,6 +93,7 @@ set(SPHLITE_CORE_SOURCES src/solid/sph_solid_material.f90 src/solid/sph_solid.f90 src/solid/sph_solid_dynamics.f90 + src/solid/sph_solid_api.f90 src/solid/sph_solid_restart.f90 src/shell/sph_shell.f90 src/interface/sph_api_state.f90 @@ -106,12 +107,17 @@ set_target_properties(sphlite_core PROPERTIES POSITION_INDEPENDENT_CODE ON ) -add_library(sphlite_c STATIC src/interface/sph_c_api.c) +set(SPHLITE_C_API_SOURCES + src/interface/sph_c_api.c + src/interface/sph_c_api_solid.c +) + +add_library(sphlite_c STATIC ${SPHLITE_C_API_SOURCES}) target_include_directories(sphlite_c PUBLIC include "${SPHLITE_GENERATED_DIR}") target_link_libraries(sphlite_c PUBLIC sphlite_core) set_target_properties(sphlite_c PROPERTIES POSITION_INDEPENDENT_CODE ON) -add_library(sphlite_c_shared SHARED src/interface/sph_c_api.c) +add_library(sphlite_c_shared SHARED ${SPHLITE_C_API_SOURCES}) target_include_directories(sphlite_c_shared PUBLIC include "${SPHLITE_GENERATED_DIR}") target_compile_definitions(sphlite_c_shared PRIVATE SPHLITE_BUILD_SHARED) target_link_libraries(sphlite_c_shared PRIVATE sphlite_core) @@ -756,3 +762,12 @@ add_test( --exceptions "${CMAKE_CURRENT_SOURCE_DIR}/tests/source_size_exceptions.txt" ) set_tests_properties(solid_source_size PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") + +add_test( + NAME solid_051_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(solid_051_source_size PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/Python/sphlite_debug.py b/Python/sphlite_debug.py index dbfead7..f73b680 100644 --- a/Python/sphlite_debug.py +++ b/Python/sphlite_debug.py @@ -3,6 +3,12 @@ from __future__ import annotations import ctypes from pathlib import Path +from sphlite_solid import configure_solid_api +from sphlite_solid import solid_diagnostics as _solid_diagnostics +from sphlite_solid import solid_particle_state as _solid_particle_state +from sphlite_solid import solid_reference_quality as _solid_reference_quality +from sphlite_solid import solid_summary as _solid_summary + PHASE_WATER = 1 PHASE_GAS = 2 PHASE_EXPLOSIVE = 3 @@ -125,32 +131,7 @@ class SPHLite: ctypes.POINTER(ctypes.c_double), ] self.lib.sphlite_get_explosive_release_balance.restype = ctypes.c_int - self.lib.sphlite_get_solid_summary.argtypes = [ctypes.POINTER(ctypes.c_int), - ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_double), ctypes.c_int] - self.lib.sphlite_get_solid_summary.restype = ctypes.c_int - self.lib.sphlite_get_solid_particle_state.argtypes = [ - ctypes.c_int, - ctypes.POINTER(ctypes.c_double), - ctypes.c_int, - ctypes.POINTER(ctypes.c_int), - ctypes.POINTER(ctypes.c_int), - ctypes.POINTER(ctypes.c_int), - ctypes.POINTER(ctypes.c_int), - ctypes.POINTER(ctypes.c_int), - ] - self.lib.sphlite_get_solid_particle_state.restype = ctypes.c_int - self.lib.sphlite_get_solid_diagnostics.argtypes = [ - ctypes.POINTER(ctypes.c_double), - ctypes.c_int, - ] - self.lib.sphlite_get_solid_diagnostics.restype = ctypes.c_int - self.lib.sphlite_get_solid_reference_quality.argtypes = [ - ctypes.POINTER(ctypes.c_int), - ctypes.POINTER(ctypes.c_int), - ctypes.POINTER(ctypes.c_double), - ctypes.c_int, - ] - self.lib.sphlite_get_solid_reference_quality.restype = ctypes.c_int + configure_solid_api(self.lib) self.lib.sphlite_get_particle_state.argtypes = [ ctypes.c_int, @@ -464,80 +445,16 @@ class SPHLite: } def solid_summary(self) -> dict[str, int | float | list[float]]: - active, failed = ctypes.c_int(0), ctypes.c_int(0) - values = (ctypes.c_double * 16)() - self._check(self.lib.sphlite_get_solid_summary( - ctypes.byref(active), ctypes.byref(failed), values, len(values))) - v = list(values) - summary = { - "solid_particles": int(active.value), - "solid_failed_particles": int(failed.value), - "solid_mass": float(v[0]), - "solid_momentum": v[1:4], - "solid_kinetic_energy": float(v[4]), - "solid_internal_energy": float(v[5]), - "solid_max_von_mises": float(v[6]), - "solid_plastic_strain_range": v[7:9], - "solid_damage_range": v[9:11], - "solid_softening_range": v[11:13], - "solid_dt_limits": v[13:16], - } - summary.update(self.solid_diagnostics()) - summary.update(self.solid_reference_quality()) - return summary + return _solid_summary(self) def solid_particle_state(self) -> dict[str, list[float] | list[int]]: - count = self.particle_count() - value_count = 22 - values = (ctypes.c_double * (value_count * count))() - int_array = ctypes.c_int * count - failure_status = int_array() - reference_neighbor_count = int_array() - reference_degenerate = int_array() - correction_status = int_array() - actual = ctypes.c_int(0) - self._check(self.lib.sphlite_get_solid_particle_state( - count, - values, - len(values), - failure_status, - reference_neighbor_count, - reference_degenerate, - correction_status, - ctypes.byref(actual), - )) - return { - "solid_values": list(values), - "solid_failure_status": list(failure_status), - "solid_reference_neighbor_count": list(reference_neighbor_count), - "solid_reference_degenerate": list(reference_degenerate), - "solid_correction_status": list(correction_status), - } + return _solid_particle_state(self) def solid_diagnostics(self) -> dict[str, float]: - values = (ctypes.c_double * 3)() - self._check(self.lib.sphlite_get_solid_diagnostics(values, len(values))) - return { - "solid_max_strain_rate": float(values[0]), - "solid_max_acceleration": float(values[1]), - "solid_internal_force_residual": float(values[2]), - } + return _solid_diagnostics(self) def solid_reference_quality(self) -> dict[str, int | float]: - reference_neighbor_min = ctypes.c_int(0) - correction_status = ctypes.c_int(0) - values = (ctypes.c_double * 1)() - self._check(self.lib.sphlite_get_solid_reference_quality( - ctypes.byref(reference_neighbor_min), - ctypes.byref(correction_status), - values, - len(values), - )) - return { - "solid_reference_neighbor_min": int(reference_neighbor_min.value), - "solid_correction_det_min": float(values[0]), - "solid_correction_status": int(correction_status.value), - } + return _solid_reference_quality(self) def inspect(self, filename: str | Path) -> dict[str, int | float | list[float]]: self.read_inp(filename) diff --git a/Python/sphlite_solid.py b/Python/sphlite_solid.py new file mode 100644 index 0000000..0b7d2ca --- /dev/null +++ b/Python/sphlite_solid.py @@ -0,0 +1,117 @@ +from __future__ import annotations + +import ctypes +from typing import Any + + +def configure_solid_api(lib: ctypes.CDLL) -> None: + lib.sphlite_get_solid_summary.argtypes = [ + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(ctypes.c_double), + ctypes.c_int, + ] + lib.sphlite_get_solid_summary.restype = ctypes.c_int + lib.sphlite_get_solid_particle_state.argtypes = [ + ctypes.c_int, + ctypes.POINTER(ctypes.c_double), + ctypes.c_int, + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(ctypes.c_int), + ] + lib.sphlite_get_solid_particle_state.restype = ctypes.c_int + lib.sphlite_get_solid_diagnostics.argtypes = [ + ctypes.POINTER(ctypes.c_double), + ctypes.c_int, + ] + lib.sphlite_get_solid_diagnostics.restype = ctypes.c_int + lib.sphlite_get_solid_reference_quality.argtypes = [ + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(ctypes.c_int), + ctypes.POINTER(ctypes.c_double), + ctypes.c_int, + ] + lib.sphlite_get_solid_reference_quality.restype = ctypes.c_int + + +def solid_summary(owner: Any) -> dict[str, int | float | list[float]]: + active, failed = ctypes.c_int(0), ctypes.c_int(0) + values = (ctypes.c_double * 16)() + owner._check(owner.lib.sphlite_get_solid_summary( + ctypes.byref(active), ctypes.byref(failed), values, len(values))) + v = list(values) + summary = { + "solid_particles": int(active.value), + "solid_failed_particles": int(failed.value), + "solid_mass": float(v[0]), + "solid_momentum": v[1:4], + "solid_kinetic_energy": float(v[4]), + "solid_internal_energy": float(v[5]), + "solid_max_von_mises": float(v[6]), + "solid_plastic_strain_range": v[7:9], + "solid_damage_range": v[9:11], + "solid_softening_range": v[11:13], + "solid_dt_limits": v[13:16], + } + summary.update(solid_diagnostics(owner)) + summary.update(solid_reference_quality(owner)) + return summary + + +def solid_particle_state(owner: Any) -> dict[str, list[float] | list[int]]: + count = owner.particle_count() + value_count = 22 + values = (ctypes.c_double * (value_count * count))() + int_array = ctypes.c_int * count + failure_status = int_array() + reference_neighbor_count = int_array() + reference_degenerate = int_array() + correction_status = int_array() + actual = ctypes.c_int(0) + owner._check(owner.lib.sphlite_get_solid_particle_state( + count, + values, + len(values), + failure_status, + reference_neighbor_count, + reference_degenerate, + correction_status, + ctypes.byref(actual), + )) + return { + "solid_values": list(values), + "solid_failure_status": list(failure_status), + "solid_reference_neighbor_count": list(reference_neighbor_count), + "solid_reference_degenerate": list(reference_degenerate), + "solid_correction_status": list(correction_status), + } + + +def solid_diagnostics(owner: Any) -> dict[str, float]: + values = (ctypes.c_double * 3)() + owner._check(owner.lib.sphlite_get_solid_diagnostics(values, len(values))) + return { + "solid_max_strain_rate": float(values[0]), + "solid_max_acceleration": float(values[1]), + "solid_internal_force_residual": float(values[2]), + } + + +def solid_reference_quality(owner: Any) -> dict[str, int | float]: + reference_neighbor_min = ctypes.c_int(0) + correction_status = ctypes.c_int(0) + values = (ctypes.c_double * 1)() + owner._check(owner.lib.sphlite_get_solid_reference_quality( + ctypes.byref(reference_neighbor_min), + ctypes.byref(correction_status), + values, + len(values), + )) + return { + "solid_reference_neighbor_min": int(reference_neighbor_min.value), + "solid_correction_det_min": float(values[0]), + "solid_correction_status": int(correction_status.value), + } diff --git a/README.md b/README.md index 77f4ca6..d03e614 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ SPHLite 的编译和测试要求应与 FEMLite 保持一致风格: ## 当前状态 -0.5.1 当前在 0.5.0 `Solid` 起步闭环基线之上开展 `Solid` 稳定化和结构算法加固。0.5.0 已完成内容主要包括: +0.5.1 当前已在 0.5.0 `Solid` 起步闭环基线之上完成 `Solid` 稳定化和结构算法加固。0.5.0 以来已完成内容主要包括: - CMake/CTest 工程骨架和 Fortran 95 核心库。 - C ABI、C++ 头文件薄包装和 Python `ctypes` 调试入口。 @@ -78,7 +78,11 @@ SPHLite 的编译和测试要求应与 FEMLite 保持一致风格: - 0.5.0 新增 `Solid` 3D 实体结构粒子的 material/section 输入、密度/弹性参数、Johnson-Cook flow/failure 参数、softening 控制和 Solid 输入错误路径。 - 0.5.0 新增 Solid 状态数组、弹性与 Johnson-Cook 材料点、damage 累积、线性渐进软化、结构波速稳定时间步、Solid-only 显式 smoke、CSV 输出和 `STATE_0_5` restart。 - 0.5.0 追加 Solid summary、failure counts、Fortran API、C ABI、C++ wrapper、Python `ctypes`、CLI 字段和 Solid 专项 CTest gate。 -- 0.5.1 计划补强 Solid 参考邻域质量、修正矩阵、变形梯度、速度梯度、应变率、最小内力、softening 力学作用、能量诊断、`STATE_0_5_1` restart 和粒子级状态接口。 +- 0.5.1 补强 Solid 参考邻域质量、修正矩阵、变形梯度、速度梯度、应变率、最小内力、softening 力学作用、能量诊断、稳定时间步加速度约束和 `STATE_0_5_1` restart。 +- 0.5.1 追加 Solid 粒子级状态、诊断和参考质量的 Fortran API、C ABI、C++ wrapper、Python `ctypes` 和 CLI 可观测字段。 +- 0.5.1 兼容读入 `STATE_0_5` Solid restart,并在读入时初始化 0.5.1 新增状态。 +- 0.5.1 为 source size 门禁拆分 Solid C ABI、Python Solid 调试包装和 Solid API 查询模块;`src/solid/sph_solid.f90` 作为 Solid 输入/material 表 owner 登记说明性例外。 - CouplingInterface 的中立数据导出、外部粒子力导入和诊断占位保持可用;真实 FEM-SPH 联合运行仍由外部 CouplingModule 后续实现。 - `Shell` 仍为后续阶段,不在 0.5.1 交付生产计算路径。 - 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` 通过。 diff --git a/docs/06_test_and_verification_plan.md b/docs/06_test_and_verification_plan.md index 7293c68..d2ad2e2 100644 --- a/docs/06_test_and_verification_plan.md +++ b/docs/06_test_and_verification_plan.md @@ -1,6 +1,6 @@ # 06 测试与验证计划 -文档状态:0.5.0 gate 记录 +文档状态:0.5.1 gate 记录 ## 1. 测试原则 @@ -238,6 +238,41 @@ git diff --check 0.5.0 不验收 `Shell` 生产路径,不验收真实水-气-结构工程爆炸响应,不验收真实 FEM-SPH 联合运行,也不验收工程级结构破坏 benchmark。 +## 7.5 0.5.1 Release Gate + +0.5.1 在 0.5.0 `Solid` 起步闭环 gate 基础上新增 `Solid` 稳定化和结构算法加固测试。默认 gate 继续覆盖既有 Water/Gas/Explosive/Solid/接口/restart/output/source-size 路径,并新增以下 Solid 0.5.1 专项 gate: + +- `solid_051_input_validation` +- `solid_reference_neighbor` +- `solid_correction_matrix` +- `solid_velocity_gradient` +- `solid_strain_increment` +- `solid_internal_force_pair` +- `solid_uniform_stress_balance` +- `solid_softening_force` +- `solid_energy_diagnostics` +- `solid_dt_acceleration` +- `solid_restart_051` +- `solid_restart_050_compat` +- `solid_state_api` +- `solid_python_051` +- `solid_cli_051` +- `solid_051_source_size` + +0.5.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_solid_material|input_solid_errors|solid_state_build|solid_elastic_material|solid_johnson_cook_flow|solid_johnson_cook_failure|solid_progressive_softening|solid_gradient_correction|solid_stable_dt|solid_explicit_smoke|solid_output|solid_restart_050|solid_restart_041_compat|solid_c_api|solid_python|solid_cli|solid_source_size)$" --output-on-failure +ctest --test-dir build-codex-unix -R "^(solid_051_input_validation|solid_reference_neighbor|solid_correction_matrix|solid_velocity_gradient|solid_strain_increment|solid_internal_force_pair|solid_uniform_stress_balance|solid_softening_force|solid_energy_diagnostics|solid_dt_acceleration|solid_restart_051|solid_restart_050_compat|solid_state_api|solid_python_051|solid_cli_051|solid_051_source_size)$" --output-on-failure +ctest --test-dir build-codex-unix -R "^(source_size|solid_source_size|solid_051_source_size)$" --output-on-failure +git diff --check +``` + +2026-07-03 本地结果:完整 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.5.1 不验收 `Shell` 生产路径,不验收真实水-气-结构工程爆炸响应,不验收真实 FEM-SPH 联合运行,也不验收工程级结构破坏 benchmark。0.5.1 的 Solid gate 只证明参考构型、速度梯度、应变率、最小内力、诊断、restart 和接口可观测性在小型模型内闭合。 + ## 8. Source Size 门禁 从第一版开始设置 source size 门禁。建议沿用 FEMLite 风格: @@ -247,6 +282,8 @@ git diff --check - 必要例外登记到例外清单。 - stale exception 应被检查。 +0.5.1 为控制新增接口膨胀,已拆分 Solid C ABI、Python Solid 调试包装和 Solid API 查询模块。`src/solid/sph_solid.f90` 继续作为 Solid 输入/material 表 owner,并在例外清单中登记说明,后续若拆分 Solid material ownership 应同步移除此例外。 + 具体阈值可在实现阶段与 FEMLite 保持一致或按 SPHLite 文件结构微调。 ## 9. 非默认长跑和研究项 diff --git a/docs/09_release_history.md b/docs/09_release_history.md index bc2c607..eb2306b 100644 --- a/docs/09_release_history.md +++ b/docs/09_release_history.md @@ -1,10 +1,10 @@ # 09 版本历史与验收记录 -文档状态:0.5.0 本地验收记录 +文档状态:0.5.1 本地验收记录 ## 1. 当前状态 -SPHLite 当前进入 0.5.0 `Solid` 起步闭环版本。本版本在 0.4.1 已建立的 Water/Gas/Explosive 稳定 gate 基础上,新增 3D 实体结构粒子的 material/section 输入、状态数组、弹性与 Johnson-Cook 材料点、失效与渐进软化、显式推进最小路径、CSV、`STATE_0_5` restart、接口诊断和 Solid 专项 gate;`Shell` 生产路径、真实水-气-结构工程爆炸响应、真实 FEM-SPH 联合运行和工程级结构破坏 benchmark 仍不在本版本交付范围内。 +SPHLite 当前进入 0.5.1 `Solid` 稳定化和结构算法加固版本。本版本在 0.5.0 已建立的 Solid 起步闭环基础上,补强参考构型、修正矩阵、速度梯度、应变率、最小内力、softening 力学作用、能量诊断、`STATE_0_5_1` restart、`STATE_0_5` 兼容读入、粒子级状态接口和 Solid 0.5.1 专项 gate;`Shell` 生产路径、真实水-气-结构工程爆炸响应、真实 FEM-SPH 联合运行和工程级结构破坏 benchmark 仍不在本版本交付范围内。 ## 2. 规划版本线 @@ -341,6 +341,49 @@ cmake --build build-codex-unix - 0.5.0 已于 2026-07-03 完成本地发布记录提交,并准备标记 `v0.5.0`。 +### 0.5.1 本地验收记录 + +记录日期:2026-07-03 + +本地构建目录:`build-codex-unix` + +版本定位: + +- 0.5.1 是 0.5 `Solid` 版本线的稳定化和结构算法加固版本。 +- 0.5.1 补强 Solid 参考邻域计数、退化状态、修正矩阵状态、修正矩阵行列式诊断和变形梯度状态。 +- 0.5.1 新增 Solid 速度梯度、应变率、等效应变率、最小内力、softening 内力折减、最大加速度、最大应变率和内力动量残差诊断。 +- 0.5.1 将 Solid 新状态写入 `STATE_0_5_1` restart,并兼容 `STATE_0_5` 读入时初始化新增状态。 +- 0.5.1 追加 Solid 粒子级状态、诊断和参考质量的 Fortran API、C ABI、C++ wrapper、Python `ctypes`、CLI 字段和专项 CTest gate。 +- 0.5.1 为 source size 门禁拆分 Solid C ABI、Python Solid 调试包装和 Solid API 查询模块;`src/solid/sph_solid.f90` 作为 Solid 输入/material 表 owner 登记说明性例外。 + +验收结果: + +- `cmake --build build-codex-unix` 通过。 +- `ctest --test-dir build-codex-unix --output-on-failure` 通过:99/99。 +- 0.5.0 Solid 回归 gate 通过:17/17。 +- 0.5.1 Solid 专项 gate 通过:16/16。 +- `ctest --test-dir build-codex-unix -R "^(source_size|solid_source_size|solid_051_source_size)$" --output-on-failure` 通过:3/3。 +- `git diff --check` 通过。 +- 代码、构建脚本、测试和工具目录中未新增 FEMLite 直接依赖。 + +不交付范围: + +- 0.5.1 不交付 `Shell` 生产路径。 +- 0.5.1 不交付真实水-气-结构工程爆炸响应。 +- 0.5.1 不交付真实 FEM-SPH 接触耦合或连续体耦合。 +- 0.5.1 不交付工程级结构破坏 benchmark、复杂断裂面追踪、碎片云、焊缝失效库、大规模并行或 GPU 后端。 + +已知限制: + +- 0.5.1 Solid 内力仍是小型可测最小路径,不代表工程级结构破裂预测能力。 +- 参考修正矩阵提供质量诊断和 fallback,但尚未交付复杂断裂面追踪或碎片云模型。 +- `Shell` phase/status 与文档路线仍保留,但板壳生产计算路径尚未实现。 + +发布建议: + +- 建议将 0.5.1 作为 Solid 稳定化版本发布。 +- 0.5.1 发布后,后续主线可继续加固 Solid 断裂/接触前置能力,或进入 `Shell` 0.6.0 前置设计。 + 后续每个版本应记录: - 完成能力。 diff --git a/docs/11_benchmark_matrix.md b/docs/11_benchmark_matrix.md index 6a7f571..f67259a 100644 --- a/docs/11_benchmark_matrix.md +++ b/docs/11_benchmark_matrix.md @@ -1,10 +1,10 @@ # 11 Benchmark 与验收矩阵 -文档状态:0.5.0 gate 记录 +文档状态:0.5.1 gate 记录 ## 1. 当前状态 -0.5.0 在 0.4.1 Water/Gas/Explosive 稳定 gate 基础上新增 `Solid` 起步闭环 gate,并继续保留工程 benchmark 矩阵作为长期规划。本版本的 Solid material point、damage、softening、显式 smoke、pressure wave smoke、Explosive programmed burn、Gas 源项注入和 Gas bubble metrics 只用于小规模数值链路检查,不作为工程精度 benchmark。 +0.5.1 在 0.5.0 `Solid` 起步闭环 gate 基础上新增 Solid 稳定化和结构算法加固 gate,并继续保留工程 benchmark 矩阵作为长期规划。本版本的 Solid 参考邻域、修正矩阵、速度梯度、应变率、最小内力、damage、softening、显式 smoke、pressure wave smoke、Explosive programmed burn、Gas 源项注入和 Gas bubble metrics 只用于小规模数值链路检查,不作为工程精度 benchmark。 ## 2. 0.1.0 Release Gate @@ -297,6 +297,37 @@ |---|---|---| | 2026-07-03 | `build-codex-unix` | 完整 CTest 83/83 通过,0.4.1 Explosive gate 14/14 通过,0.5.0 Solid gate 17/17 通过,`source_size` 1/1 通过,`git diff --check` 通过 | +## 2.10 0.5.1 Release Gate + +0.5.1 默认 gate 在 0.5.0 Solid gate 基础上新增参考构型、速度梯度、应变率、最小内力、能量诊断、restart 兼容和接口可观测性验收。 + +| 测试名 | 类型 | 验收点 | +|---|---|---| +| `solid_051_input_validation` | Fortran input | 泊松比、Johnson-Cook 非有限参数、softening 类型、section/material 映射和缺失 Solid section 错误路径 | +| `solid_reference_neighbor` | Fortran module | active Solid 参考邻域计数、非 Solid 跳过和退化邻域诊断 | +| `solid_correction_matrix` | Fortran module | 修正矩阵行列式、状态码、近奇异 fallback 和 summary 质量诊断 | +| `solid_velocity_gradient` | Fortran module | 均匀平动零梯度和单轴拉伸速度梯度 | +| `solid_strain_increment` | Fortran module | 由应变率更新 Voigt 应变增量、总应变和材料点路径 | +| `solid_internal_force_pair` | Fortran module | 成对 Solid 粒子内力对称性和动量残差 | +| `solid_uniform_stress_balance` | Fortran module | 对称均匀应力下内力残差受控 | +| `solid_softening_force` | Fortran module | softening 因子作用到 Solid 内力贡献 | +| `solid_energy_diagnostics` | Fortran module | 动能、内能、塑性功等效量、最大应变率和最大加速度诊断 | +| `solid_dt_acceleration` | Fortran module | Solid wave dt 与 acceleration dt 合并并进入全局稳定时间步 | +| `solid_restart_051` | Fortran restart | `STATE_0_5_1` 写入读回新增 Solid 状态并继续显式步 | +| `solid_restart_050_compat` | Fortran restart | `STATE_0_5` 兼容读入并初始化 0.5.1 新状态 | +| `solid_state_api` | Fortran API | Solid 粒子级状态、诊断和参考质量 API 容量/错误路径 | +| `solid_python_051` | Python `ctypes` | Solid 0.5.1 诊断、粒子级状态、restart 读回和兼容读入 | +| `solid_cli_051` | CLI | Solid 0.5.1 inspect/run/restart 字段检查 | +| `solid_051_source_size` | 工具门禁 | 0.5.1 Solid source size、拆分结果和 stale exception 检查 | + +0.5.1 不验收 `Shell` 生产路径,不验收真实水-气-结构工程爆炸响应,不验收真实 FEM-SPH 联合运行,也不验收工程级结构破坏 benchmark。Solid 0.5.1 gate 只证明小型结构算法闭环和接口可观测性,不代表工程级断裂路径预测。 + +本地验收记录: + +| 日期 | 构建目录 | 结果 | +|---|---|---| +| 2026-07-03 | `build-codex-unix` | 完整 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` 通过 | + ## 3. 基础数值矩阵 | 领域 | 测试或 benchmark | 验收点 | diff --git a/src/interface/sph_api.f90 b/src/interface/sph_api.f90 index 4bdd69b..0cad9ef 100644 --- a/src/interface/sph_api.f90 +++ b/src/interface/sph_api.f90 @@ -28,8 +28,8 @@ module sph_api sph_explosive_get_summary, sph_explosive_get_release_balance, & sph_explosive_set_default_ignition_point use sph_solid, only: sph_solid_initialize, sph_solid_reset - use sph_solid_dynamics, only: sph_solid_get_counts, sph_solid_get_summary, & - sph_solid_get_state, sph_solid_get_diagnostics, & + use sph_solid_dynamics, only: sph_solid_get_counts, sph_solid_get_summary + use sph_solid_api, only: sph_solid_get_state, sph_solid_get_diagnostics, & sph_solid_get_reference_quality use sph_shell, only: sph_shell_initialize, sph_shell_reset use sph_api_state, only: sph_api_initialized, sph_api_model_built, & diff --git a/src/interface/sph_c_api.c b/src/interface/sph_c_api.c index 8f903b4..6c408ce 100644 --- a/src/interface/sph_c_api.c +++ b/src/interface/sph_c_api.c @@ -101,20 +101,6 @@ extern void SPHLITE_FC_sphft_get_explosive_release_balance( double *energy_values, double *momentum_values, int *ierr); -extern void SPHLITE_FC_sphft_get_solid_summary(int *active_count, - int *failed_count, double *mass, double *momentum, double *energy, - double *max_von_mises, double *plastic_range, double *damage_range, - double *softening_range, double *dt_limits, int *ierr); -extern void SPHLITE_FC_sphft_get_solid_state(const int *max_particles, - const int *value_capacity, double *values, int *failure_status, - int *reference_neighbor_count, int *reference_degenerate, - int *correction_status, int *count, int *ierr); -extern void SPHLITE_FC_sphft_get_solid_diagnostics( - const int *value_capacity, double *values, int *ierr); -extern void SPHLITE_FC_sphft_get_solid_reference_quality( - int *reference_neighbor_min, double *correction_det_min, - int *correction_status, int *ierr); - static int sphlite_call_path( const char *path, void (*fortran_call)(const int *chars, const int *count, int *ierr)) @@ -467,94 +453,3 @@ int sphlite_get_explosive_release_balance(double *mass_values, energy_values, momentum_values, &ierr); return ierr; } - -int sphlite_get_solid_summary(int *active_count, int *failed_count, - double *values, - int value_capacity) -{ - int ierr = 0; - double mass = 0.0; - double momentum[3] = {0.0, 0.0, 0.0}; - double energy[2] = {0.0, 0.0}; - double max_von_mises = 0.0; - double plastic_range[2] = {0.0, 0.0}; - double damage_range[2] = {0.0, 0.0}; - double softening_range[2] = {0.0, 0.0}; - double dt_limits[3] = {0.0, 0.0, 0.0}; - int i; - - if (active_count == NULL || failed_count == NULL || values == NULL || - value_capacity < SPHLITE_SOLID_SUMMARY_VALUE_COUNT) { - return -1; - } - SPHLITE_FC_sphft_get_solid_summary(active_count, failed_count, &mass, - momentum, energy, &max_von_mises, plastic_range, damage_range, - softening_range, dt_limits, &ierr); - if (ierr != 0) { - return ierr; - } - values[0] = mass; - values[6] = max_von_mises; - for (i = 0; i < 3; ++i) { - values[1 + i] = momentum[i]; - values[13 + i] = dt_limits[i]; - } - for (i = 0; i < 2; ++i) { - values[4 + i] = energy[i]; - values[7 + i] = plastic_range[i]; - values[9 + i] = damage_range[i]; - values[11 + i] = softening_range[i]; - } - return ierr; -} - -int sphlite_get_solid_particle_state(int max_particles, - double *values, - int value_capacity, - int *failure_status, - int *reference_neighbor_count, - int *reference_degenerate, - int *correction_status, - int *count) -{ - int ierr = 0; - int per_particle = SPHLITE_SOLID_PARTICLE_VALUE_COUNT; - - if (max_particles <= 0 || values == NULL || failure_status == NULL || - reference_neighbor_count == NULL || reference_degenerate == NULL || - correction_status == NULL || count == NULL || - value_capacity < max_particles * SPHLITE_SOLID_PARTICLE_VALUE_COUNT) { - return -1; - } - SPHLITE_FC_sphft_get_solid_state(&max_particles, &per_particle, values, - failure_status, reference_neighbor_count, reference_degenerate, - correction_status, count, &ierr); - return ierr; -} - -int sphlite_get_solid_diagnostics(double *values, int value_capacity) -{ - int ierr = 0; - - if (values == NULL || value_capacity < SPHLITE_SOLID_DIAGNOSTIC_VALUE_COUNT) { - return -1; - } - SPHLITE_FC_sphft_get_solid_diagnostics(&value_capacity, values, &ierr); - return ierr; -} - -int sphlite_get_solid_reference_quality(int *reference_neighbor_min, - int *correction_status, - double *values, - int value_capacity) -{ - int ierr = 0; - - if (reference_neighbor_min == NULL || correction_status == NULL || - values == NULL || value_capacity < SPHLITE_SOLID_REFERENCE_VALUE_COUNT) { - return -1; - } - SPHLITE_FC_sphft_get_solid_reference_quality(reference_neighbor_min, - &values[0], correction_status, &ierr); - return ierr; -} diff --git a/src/interface/sph_c_api_solid.c b/src/interface/sph_c_api_solid.c new file mode 100644 index 0000000..f4008f3 --- /dev/null +++ b/src/interface/sph_c_api_solid.c @@ -0,0 +1,109 @@ +#include "sphlite_c_api.h" +#include "sphlite_fortran_mangle.h" + +#include + +extern void SPHLITE_FC_sphft_get_solid_summary(int *active_count, + int *failed_count, double *mass, double *momentum, double *energy, + double *max_von_mises, double *plastic_range, double *damage_range, + double *softening_range, double *dt_limits, int *ierr); +extern void SPHLITE_FC_sphft_get_solid_state(const int *max_particles, + const int *value_capacity, double *values, int *failure_status, + int *reference_neighbor_count, int *reference_degenerate, + int *correction_status, int *count, int *ierr); +extern void SPHLITE_FC_sphft_get_solid_diagnostics( + const int *value_capacity, double *values, int *ierr); +extern void SPHLITE_FC_sphft_get_solid_reference_quality( + int *reference_neighbor_min, double *correction_det_min, + int *correction_status, int *ierr); + +int sphlite_get_solid_summary(int *active_count, int *failed_count, + double *values, + int value_capacity) +{ + int ierr = 0; + double mass = 0.0; + double momentum[3] = {0.0, 0.0, 0.0}; + double energy[2] = {0.0, 0.0}; + double max_von_mises = 0.0; + double plastic_range[2] = {0.0, 0.0}; + double damage_range[2] = {0.0, 0.0}; + double softening_range[2] = {0.0, 0.0}; + double dt_limits[3] = {0.0, 0.0, 0.0}; + int i; + + if (active_count == NULL || failed_count == NULL || values == NULL || + value_capacity < SPHLITE_SOLID_SUMMARY_VALUE_COUNT) { + return -1; + } + SPHLITE_FC_sphft_get_solid_summary(active_count, failed_count, &mass, + momentum, energy, &max_von_mises, plastic_range, damage_range, + softening_range, dt_limits, &ierr); + if (ierr != 0) { + return ierr; + } + values[0] = mass; + values[6] = max_von_mises; + for (i = 0; i < 3; ++i) { + values[1 + i] = momentum[i]; + values[13 + i] = dt_limits[i]; + } + for (i = 0; i < 2; ++i) { + values[4 + i] = energy[i]; + values[7 + i] = plastic_range[i]; + values[9 + i] = damage_range[i]; + values[11 + i] = softening_range[i]; + } + return ierr; +} + +int sphlite_get_solid_particle_state(int max_particles, + double *values, + int value_capacity, + int *failure_status, + int *reference_neighbor_count, + int *reference_degenerate, + int *correction_status, + int *count) +{ + int ierr = 0; + int per_particle = SPHLITE_SOLID_PARTICLE_VALUE_COUNT; + + if (max_particles <= 0 || values == NULL || failure_status == NULL || + reference_neighbor_count == NULL || reference_degenerate == NULL || + correction_status == NULL || count == NULL || + value_capacity < max_particles * SPHLITE_SOLID_PARTICLE_VALUE_COUNT) { + return -1; + } + SPHLITE_FC_sphft_get_solid_state(&max_particles, &per_particle, values, + failure_status, reference_neighbor_count, reference_degenerate, + correction_status, count, &ierr); + return ierr; +} + +int sphlite_get_solid_diagnostics(double *values, int value_capacity) +{ + int ierr = 0; + + if (values == NULL || value_capacity < SPHLITE_SOLID_DIAGNOSTIC_VALUE_COUNT) { + return -1; + } + SPHLITE_FC_sphft_get_solid_diagnostics(&value_capacity, values, &ierr); + return ierr; +} + +int sphlite_get_solid_reference_quality(int *reference_neighbor_min, + int *correction_status, + double *values, + int value_capacity) +{ + int ierr = 0; + + if (reference_neighbor_min == NULL || correction_status == NULL || + values == NULL || value_capacity < SPHLITE_SOLID_REFERENCE_VALUE_COUNT) { + return -1; + } + SPHLITE_FC_sphft_get_solid_reference_quality(reference_neighbor_min, + &values[0], correction_status, &ierr); + return ierr; +} diff --git a/src/solid/sph_solid_api.f90 b/src/solid/sph_solid_api.f90 new file mode 100644 index 0000000..e4a6546 --- /dev/null +++ b/src/solid/sph_solid_api.f90 @@ -0,0 +1,108 @@ +module sph_solid_api + use sph_precision, only: rk + use sph_error, only: SPH_SUCCESS, SPH_ERROR_ARGUMENT, sph_error_set + use sph_database, only: npart, solid_reference_neighbor_min, & + solid_correction_det_min, solid_correction_status_max, & + solid_max_strain_rate, solid_max_acceleration, & + solid_internal_force_residual + use sph_solid_state + use sph_solid_dynamics, only: sph_solid_update_diagnostics + implicit none + + integer, parameter :: SPH_SOLID_STATE_VALUE_COUNT = 22 + integer, parameter :: SPH_SOLID_DIAGNOSTIC_VALUE_COUNT = 3 + +contains + + subroutine sph_solid_get_state(max_particles, value_capacity, values, & + failure_status_out, reference_neighbor_count_out, & + reference_degenerate_out, correction_status_out, count, ierr) + integer, intent(in) :: max_particles + integer, intent(in) :: value_capacity + real(rk), intent(out) :: values(value_capacity,max_particles) + integer, intent(out) :: failure_status_out(max_particles) + integer, intent(out) :: reference_neighbor_count_out(max_particles) + integer, intent(out) :: reference_degenerate_out(max_particles) + integer, intent(out) :: correction_status_out(max_particles) + integer, intent(out) :: count + integer, intent(out) :: ierr + integer :: i + + count = 0 + ierr = SPH_SUCCESS + if (max_particles <= 0 .or. value_capacity < SPH_SOLID_STATE_VALUE_COUNT) then + call sph_error_set(SPH_ERROR_ARGUMENT, 'Solid state buffer is too small') + ierr = SPH_ERROR_ARGUMENT + return + end if + values = 0.0_rk + failure_status_out = 0 + reference_neighbor_count_out = 0 + reference_degenerate_out = 0 + correction_status_out = 0 + if (npart > max_particles) then + call sph_error_set(SPH_ERROR_ARGUMENT, 'Solid state particle buffer is too small') + ierr = SPH_ERROR_ARGUMENT + return + end if + count = npart + if (.not. allocated(solid_stress)) return + do i = 1, npart + values(1:6,i) = solid_stress(:,i) + values(7:12,i) = solid_strain(:,i) + if (allocated(solid_strain_rate)) values(13:18,i) = solid_strain_rate(:,i) + if (allocated(solid_plastic_strain)) values(19,i) = solid_plastic_strain(i) + if (allocated(solid_damage)) values(20,i) = solid_damage(i) + if (allocated(solid_softening)) values(21,i) = solid_softening(i) + if (allocated(solid_strain_rate_eq)) values(22,i) = solid_strain_rate_eq(i) + if (allocated(solid_failure_status)) failure_status_out(i) = & + solid_failure_status(i) + if (allocated(solid_reference_neighbor_count)) then + reference_neighbor_count_out(i) = solid_reference_neighbor_count(i) + end if + if (allocated(solid_reference_degenerate)) then + reference_degenerate_out(i) = solid_reference_degenerate(i) + end if + if (allocated(solid_correction_status)) then + correction_status_out(i) = solid_correction_status(i) + end if + end do + end subroutine sph_solid_get_state + + subroutine sph_solid_get_diagnostics(value_capacity, values, ierr) + integer, intent(in) :: value_capacity + real(rk), intent(out) :: values(value_capacity) + integer, intent(out) :: ierr + + ierr = SPH_SUCCESS + if (value_capacity < SPH_SOLID_DIAGNOSTIC_VALUE_COUNT) then + call sph_error_set(SPH_ERROR_ARGUMENT, 'Solid diagnostic buffer is too small') + ierr = SPH_ERROR_ARGUMENT + return + end if + values = 0.0_rk + call sph_solid_update_diagnostics(ierr) + if (ierr /= SPH_SUCCESS) return + values(1) = solid_max_strain_rate + values(2) = solid_max_acceleration + values(3) = solid_internal_force_residual + end subroutine sph_solid_get_diagnostics + + subroutine sph_solid_get_reference_quality(reference_neighbor_min_out, & + correction_det_min_out, correction_status_out, ierr) + integer, intent(out) :: reference_neighbor_min_out + real(rk), intent(out) :: correction_det_min_out + integer, intent(out) :: correction_status_out + integer, intent(out) :: ierr + + reference_neighbor_min_out = 0 + correction_det_min_out = 0.0_rk + correction_status_out = 0 + call sph_solid_update_diagnostics(ierr) + if (ierr /= SPH_SUCCESS) return + reference_neighbor_min_out = solid_reference_neighbor_min + correction_det_min_out = solid_correction_det_min + correction_status_out = solid_correction_status_max + end subroutine sph_solid_get_reference_quality + +end module sph_solid_api diff --git a/src/solid/sph_solid_dynamics.f90 b/src/solid/sph_solid_dynamics.f90 index 9b0a0be..9a59ba9 100644 --- a/src/solid/sph_solid_dynamics.f90 +++ b/src/solid/sph_solid_dynamics.f90 @@ -21,9 +21,6 @@ module sph_solid_dynamics use sph_solid_material, only: sph_solid_von_mises implicit none - integer, parameter :: SPH_SOLID_STATE_VALUE_COUNT = 22 - integer, parameter :: SPH_SOLID_DIAGNOSTIC_VALUE_COUNT = 3 - contains subroutine sph_solid_set_body_force(force, ierr) @@ -89,97 +86,6 @@ contains softening_range_out = (/solid_min_softening, solid_max_softening/) end subroutine sph_solid_get_summary - subroutine sph_solid_get_state(max_particles, value_capacity, values, & - failure_status_out, reference_neighbor_count_out, & - reference_degenerate_out, correction_status_out, count, ierr) - integer, intent(in) :: max_particles - integer, intent(in) :: value_capacity - real(rk), intent(out) :: values(value_capacity,max_particles) - integer, intent(out) :: failure_status_out(max_particles) - integer, intent(out) :: reference_neighbor_count_out(max_particles) - integer, intent(out) :: reference_degenerate_out(max_particles) - integer, intent(out) :: correction_status_out(max_particles) - integer, intent(out) :: count - integer, intent(out) :: ierr - integer :: i - - count = 0 - ierr = SPH_SUCCESS - if (max_particles <= 0 .or. value_capacity < SPH_SOLID_STATE_VALUE_COUNT) then - call sph_error_set(SPH_ERROR_ARGUMENT, 'Solid state buffer is too small') - ierr = SPH_ERROR_ARGUMENT - return - end if - values = 0.0_rk - failure_status_out = 0 - reference_neighbor_count_out = 0 - reference_degenerate_out = 0 - correction_status_out = 0 - if (npart > max_particles) then - call sph_error_set(SPH_ERROR_ARGUMENT, 'Solid state particle buffer is too small') - ierr = SPH_ERROR_ARGUMENT - return - end if - count = npart - if (.not. allocated(solid_stress)) return - do i = 1, npart - values(1:6,i) = solid_stress(:,i) - values(7:12,i) = solid_strain(:,i) - if (allocated(solid_strain_rate)) values(13:18,i) = solid_strain_rate(:,i) - if (allocated(solid_plastic_strain)) values(19,i) = solid_plastic_strain(i) - if (allocated(solid_damage)) values(20,i) = solid_damage(i) - if (allocated(solid_softening)) values(21,i) = solid_softening(i) - if (allocated(solid_strain_rate_eq)) values(22,i) = solid_strain_rate_eq(i) - if (allocated(solid_failure_status)) failure_status_out(i) = & - solid_failure_status(i) - if (allocated(solid_reference_neighbor_count)) then - reference_neighbor_count_out(i) = solid_reference_neighbor_count(i) - end if - if (allocated(solid_reference_degenerate)) then - reference_degenerate_out(i) = solid_reference_degenerate(i) - end if - if (allocated(solid_correction_status)) then - correction_status_out(i) = solid_correction_status(i) - end if - end do - end subroutine sph_solid_get_state - - subroutine sph_solid_get_diagnostics(value_capacity, values, ierr) - integer, intent(in) :: value_capacity - real(rk), intent(out) :: values(value_capacity) - integer, intent(out) :: ierr - - ierr = SPH_SUCCESS - if (value_capacity < SPH_SOLID_DIAGNOSTIC_VALUE_COUNT) then - call sph_error_set(SPH_ERROR_ARGUMENT, 'Solid diagnostic buffer is too small') - ierr = SPH_ERROR_ARGUMENT - return - end if - values = 0.0_rk - call sph_solid_update_diagnostics(ierr) - if (ierr /= SPH_SUCCESS) return - values(1) = solid_max_strain_rate - values(2) = solid_max_acceleration - values(3) = solid_internal_force_residual - end subroutine sph_solid_get_diagnostics - - subroutine sph_solid_get_reference_quality(reference_neighbor_min_out, & - correction_det_min_out, correction_status_out, ierr) - integer, intent(out) :: reference_neighbor_min_out - real(rk), intent(out) :: correction_det_min_out - integer, intent(out) :: correction_status_out - integer, intent(out) :: ierr - - reference_neighbor_min_out = 0 - correction_det_min_out = 0.0_rk - correction_status_out = 0 - call sph_solid_update_diagnostics(ierr) - if (ierr /= SPH_SUCCESS) return - reference_neighbor_min_out = solid_reference_neighbor_min - correction_det_min_out = solid_correction_det_min - correction_status_out = solid_correction_status_max - end subroutine sph_solid_get_reference_quality - subroutine sph_solid_build_reference_state(ierr) integer, intent(out) :: ierr integer :: i diff --git a/tests/source_size_exceptions.txt b/tests/source_size_exceptions.txt index 8398e56..527849a 100644 --- a/tests/source_size_exceptions.txt +++ b/tests/source_size_exceptions.txt @@ -6,5 +6,6 @@ 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/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 f549d99..e0e32b1 100644 --- a/todo.md +++ b/todo.md @@ -251,28 +251,28 @@ ## 阶段 I:源码尺寸、回归门禁、文档同步与发布准备 -- [ ] 新增 `solid_051_source_size` 检查项并接入 CTest。 -- [ ] 复核 `tests/source_size_exceptions.txt` 中 stale 例外。 -- [ ] 拆分过大的 Solid reference 源文件或过长过程。 -- [ ] 拆分过大的 Solid kinematics 源文件或过长过程。 -- [ ] 拆分过大的 Solid force 源文件或过长过程。 -- [ ] 拆分过大的 Solid restart 源文件或过长过程。 -- [ ] 保持 0.5.0 完整 gate 全部通过。 -- [ ] 单独运行 0.5.0 Solid 专项 gate。 -- [ ] 单独运行 0.5.1 Solid 专项 gate。 -- [ ] 运行 `source_size` 检查并确认无新增无理由例外。 -- [ ] 运行 `git diff --check` 并清理空白问题。 -- [ ] 更新 README 的 0.5.1 当前状态和不交付范围。 -- [ ] 更新 06 号文档的 0.5.1 release gate。 -- [ ] 更新 09 号文档的 0.5.1 验收记录占位。 -- [ ] 更新 11 号文档的 0.5.1 benchmark/gate 矩阵。 -- [ ] 确认文档不宣称已实现 `Shell`。 -- [ ] 确认文档不宣称已实现真实水-气-结构工程爆炸响应。 -- [ ] 确认文档不宣称已实现真实 FEM-SPH 耦合。 -- [ ] 确认文档不宣称已实现工程级结构破坏 benchmark。 -- [ ] 确认未新增几何、网格或粒子生成能力。 -- [ ] 确认未新增 FEMLite 直接依赖。 -- [ ] 确认未修改 SPHLite 文件夹之外的内容。 -- [ ] 确认默认 gate、0.5.0 Solid gate、0.5.1 Solid gate、source size 和 `git diff --check` 全部通过。 -- [ ] 汇总 0.5.1 已完成能力、未交付范围和已知限制。 -- [ ] 准备 0.5.1 发布前本地提交记录。 +- [x] 新增 `solid_051_source_size` 检查项并接入 CTest。 +- [x] 复核 `tests/source_size_exceptions.txt` 中 stale 例外。 +- [x] 拆分过大的 Solid reference 源文件或过长过程。 +- [x] 拆分过大的 Solid kinematics 源文件或过长过程。 +- [x] 拆分过大的 Solid force 源文件或过长过程。 +- [x] 拆分过大的 Solid restart 源文件或过长过程。 +- [x] 保持 0.5.0 完整 gate 全部通过。 +- [x] 单独运行 0.5.0 Solid 专项 gate。 +- [x] 单独运行 0.5.1 Solid 专项 gate。 +- [x] 运行 `source_size` 检查并确认无新增无理由例外。 +- [x] 运行 `git diff --check` 并清理空白问题。 +- [x] 更新 README 的 0.5.1 当前状态和不交付范围。 +- [x] 更新 06 号文档的 0.5.1 release gate。 +- [x] 更新 09 号文档的 0.5.1 验收记录占位。 +- [x] 更新 11 号文档的 0.5.1 benchmark/gate 矩阵。 +- [x] 确认文档不宣称已实现 `Shell`。 +- [x] 确认文档不宣称已实现真实水-气-结构工程爆炸响应。 +- [x] 确认文档不宣称已实现真实 FEM-SPH 耦合。 +- [x] 确认文档不宣称已实现工程级结构破坏 benchmark。 +- [x] 确认未新增几何、网格或粒子生成能力。 +- [x] 确认未新增 FEMLite 直接依赖。 +- [x] 确认未修改 SPHLite 文件夹之外的内容。 +- [x] 确认默认 gate、0.5.0 Solid gate、0.5.1 Solid gate、source size 和 `git diff --check` 全部通过。 +- [x] 汇总 0.5.1 已完成能力、未交付范围和已知限制。 +- [x] 准备 0.5.1 发布前本地提交记录。