Complete V4.8 example acceptance and scripts
FemLite CI / build-test (push) Has been cancelled

This commit is contained in:
shenw
2026-06-25 10:26:06 +08:00
parent d8dbc0b346
commit 240d2728fa
42 changed files with 1707 additions and 4 deletions
+4 -2
View File
@@ -337,7 +337,8 @@ SPH总力映射测试 relative tolerance 1.0e-10 to 1.0e-8
- 法向接触功、摩擦功、stick/slip 计数、mortar 积分点历史槽、正则化摩擦切线和累计滑移 sanity check。
- V4.2 新增示例:rigid plane indentation、two blocks compression、shell rigid plane contact;每个示例应可通过目录内 `run_case.bat` 自动运行和检查结果。
- V4.3 新增示例:contact block sliding friction;检查正则化参数、累计滑移、切向力、摩擦功非负和 VTK 输出。
- 已接入 `example_smoke` CTest 分组:shell patch S3/S4 静力 smoke、Scordelis-Lo S3/S4 静力 smoke、clamped square plate pressure pulse S4 短步数动力 smoke、rigid sphere impact plate S3/S4 短步数动力 smoke、contact block sliding friction 短步数动力 smoke;rigid impact smoke 需要 final contact CSV 中出现 active contact,sliding friction smoke 需要 final contact CSV 中出现正摩擦耗散,Scordelis-Lo smoke 需要自由角竖向位移为负且超过最小量级。
- V4.8 补齐文档型示例目录的可运行输入和 `run_case.bat`,新增 `examples_layout` CTest 检查“有文档无 `.inp`”和“有 `.inp` 无双击脚本”的回退。
- 已接入 `example_smoke` CTest 分组:shell patch S3/S4 静力 smoke、Scordelis-Lo S3/S4 静力 smoke、clamped square plate pressure pulse S4 短步数动力 smoke、rigid sphere impact plate S3/S4 短步数动力 smoke、contact block sliding friction 短步数动力 smoke、elliptic membrane 静力 smoke、membrane uniaxial 静力 smoke、shell-solid connection 静力 smoke、strength reduction slope 静力 smoke 和 golf ball impact 短步数动力 smoke;rigid/golf impact smoke 需要 final contact CSV 中出现 active contact,sliding friction smoke 需要 final contact CSV 中出现正摩擦耗散,Scordelis-Lo smoke 需要自由角竖向位移为负且超过最小量级。
- rigid sphere impact plate 的长步数结果保留为示例复现实验。
## 11. 输入解析测试
@@ -688,7 +689,8 @@ V4.4 contact pair 性能 smoke:
- 保留 Windows GCC、WSL gfortran 和 Intel Fortran 兼容性检查记录。
- 0.4.2 本地发布记录:Windows GCC 16 CTest 33/33,WSL Ubuntu + gfortran 13.3 CTest 33/33,Windows Intel oneAPI `ifx` 2026.0 + MSVC `cl` 19.44 CTest 33/33;Intel/NMake `/machine:x64` ifx warning 已清理。
- 0.4.3 当前 Windows GCC 16 回归记录:CTest 34/34。
- V4.4 开发态新增 `contact_omp1` / `contact_omp4`,用 `OMP_NUM_THREADS=1/4` 重跑 contact 模块回归;新增 `perf_contact_pair_smoke` 和 `perf_contact_pair_medium` 覆盖 BVH contact pair 性能 smoke;新增 `perf_contact_pair_omp_consistency` 对比性能 smoke 在 OpenMP 1/4 线程下的非计时统计;contact CSV 已覆盖 summary 和逐 pair 统计;BVH force 权重准备统计改为 OpenMP reduction 后由 contact 定向回归覆盖;BVH force 并行装配已将法向/mortar/接触面积准备移出全局提交临界区,BVH tangent 并行装配已将 mortar/切线块准备移出 CSR 临界区;`contact` 覆盖跨调用候选缓存 force/tangent 命中和失效条件;Python 可用时 Windows GCC 16 CTest 当前为 39 项。
- V4.4 开发态新增 `contact_omp1` / `contact_omp4`,用 `OMP_NUM_THREADS=1/4` 重跑 contact 模块回归;新增 `perf_contact_pair_smoke` 和 `perf_contact_pair_medium` 覆盖 BVH contact pair 性能 smoke;新增 `perf_contact_pair_omp_consistency` 对比性能 smoke 在 OpenMP 1/4 线程下的非计时统计;contact CSV 已覆盖 summary 和逐 pair 统计;BVH force 权重准备统计改为 OpenMP reduction 后由 contact 定向回归覆盖;BVH force 并行装配已将法向/mortar/接触面积准备移出全局提交临界区,BVH tangent 并行装配已将 mortar/切线块准备移出 CSR 临界区;`contact` 覆盖跨调用候选缓存 force/tangent 命中和失效条件。
- V4.8 开发态新增 `examples_layout` 和五个文档派生 `example_smoke`,Python 可用时 Windows GCC 16 CTest 当前为 47 项。
## 21. 发布阻断条件
+6 -1
View File
@@ -258,12 +258,17 @@ Fortran95 API 可通过 `fem_get_convergence_status` 查询最近一次求解的
| `examples/shell_patch_test` | 壳单元 patch test |
| `examples/clamped_square_plate_pressure_pulse` | 固支方板压力脉冲 |
| `examples/rigid_sphere_impact_plate` | 刚球冲击板壳接触算例 |
| `examples/elliptic_membrane` | NAFEMS LE1 椭圆膜缩减静力案例 |
| `examples/membrane_uniaxial_stretching` | 文档参数派生的膜单轴拉伸静力案例 |
| `examples/shell_solid_connection` | 共享节点壳-实体接口静力案例 |
| `examples/strengthReduction` | 强度折减文档派生的线弹性坡体案例 |
| `examples/golfBallImpact` | 高尔夫冲击文档派生的壳接触动力缩减案例 |
| `examples/contact_rigid_plane_indentation` | 刚性平面压入接触算例 |
| `examples/contact_two_blocks_compression` | 两实体块面-面压缩接触算例 |
| `examples/shell_rigid_plane_contact` | S4 壳-刚性平面接触算例 |
| `examples/contact_block_sliding` | 两实体块正则化摩擦滑移接触算例 |
每个示例目录中的 `README.md` 给出几何、材料、边界、生成脚本和运行命令。新增基准测试应放在 `examples/` 下,并为每个基准案例建立独立文件夹;旧目录可为兼容保留,但新的 CTest 和文档应优先指向独立目录。第四版新增接触示例提供 `run_case.bat`,可在 Windows 下双击自动运行并检查结果。
每个示例目录中的 `README.md` 给出几何、材料、边界、生成脚本和运行命令。新增基准测试应放在 `examples/` 下,并为每个基准案例建立独立文件夹;旧目录可为兼容保留,但新的 CTest 和文档应优先指向独立目录。包含 `.inp` 的示例目录应提供 `run_case.bat`,可在 Windows 下双击自动运行,结果默认写入该目录的 `results\auto_run`。
## 11. 测试
+2 -1
View File
@@ -368,6 +368,7 @@ python tests\scripts\check_source_size.py . --warn-file-lines 1500 --max-file-li
- Windows 双击自动运行脚本可命名为 `run_case.bat`;脚本应把结果写入示例目录下的 `results` 子目录,并支持自动检查失败码。
新增基准测试案例应放在 `examples/` 下,并为每个案例建立独立文件夹;旧兼容目录不作为新测试入口。
V4.8 起,`examples_layout` CTest 会检查 `examples/` 一级目录:有文档的目录必须包含至少一个 `.inp`,有 `.inp` 的目录必须包含 `run_case.bat`。
示例目录不应提交:
@@ -389,7 +390,7 @@ python tests\scripts\check_source_size.py . --warn-file-lines 1500 --max-file-li
3. 运行 WSL gfortran build 和 CTest。
4. 运行 Windows Intel ifx build 和 CTest。
5. 运行 `git diff --check`。
6. 运行 `source_size`。
6. 运行 `source_size` 和 `examples_layout`。
7. 检查 `git status --ignored --short`,确认 results 和 build 输出未被暂存。
8. 更新 `docs/v*_acceptance_report.md` 和相关接口/测试文档。
9. 提交 git,必要时打 tag 并推送。
+89
View File
@@ -0,0 +1,89 @@
# FemLite 第四版 V4.8 阶段验收报告
日期:2026-06-25
## 1. 版本信息
- 软件名称:FemLite
- 阶段范围:第四版 V4.1 至 V4.8
- 开发分支:`dev/v0.4`
- 交付形态:静态库、命令行程序、C ABI 静态库、测试程序、Python 检查脚本和示例算例
- 默认验收构建:Windows GCC 16,构建目录 `build-win-gcc-16`
## 2. 验收口径
V4.8 是第四版阶段验收收束版,重点确认 0.4.x 开发期新增的接触、隐式、壳稳定、线性求解器、示例和发布检查能力可以作为下一阶段基线。
本次验收覆盖:
- 第一版、第二版、第三版已验收能力无回退。
- surface/contact 输入子集、contact pair active-set、augmented penalty、摩擦历史、BVH 搜索、候选缓存和性能统计保持可回归。
- 非线性静力和非线性 Newmark 收敛诊断、cutback 诊断和 C ABI 查询接口保持可回归。
- CG/BiCGSTAB 线性求解器分发、预条件设置和统计接口保持可回归。
- 壳 drilling 稳定、S3 剪切锁定诊断、壳 J2 剪切/弯曲代表性塑性和 Scordelis-Lo smoke 保持可回归。
- `examples/` 下文档型目录均有可执行 `.inp`,包含 `.inp` 的目录均有 `run_case.bat`。
本报告不声称 FemLite 已具备完整 Abaqus 兼容、完整工程级 mortar 约束求解、完整 Mohr-Coulomb 强度折减、完整高尔夫球多层超弹/黏弹模型或完整 shell-solid benchmark 保真能力。相关文档派生案例在 V4.8 中作为可执行缩减基准和回归入口。
## 3. 验收项结果
| 验收项 | 结果 | 覆盖说明 |
|---|---:|---|
| 基础回归 | PASS | smoke、材料、单元、数据库、稀疏矩阵、线性求解、输出和 restart 测试保留 |
| 接触与摩擦 | PASS | contact、OMP 1/4、contact block sliding、rigid impact 和接触统计回归覆盖 |
| 隐式与收敛诊断 | PASS | implicit inp、solver implicit、cutback 和收敛状态接口回归覆盖 |
| 线性求解器 | PASS | CG/BiCGSTAB、Jacobi、unsupported external 占位和 C ABI 设置查询覆盖 |
| 壳稳定与壳塑性 | PASS | drilling、S3 剪切锁定、S4 J2 剪切/弯曲、trial rollback 和 Scordelis-Lo smoke 覆盖 |
| 示例目录结构 | PASS | `examples_layout` 检查文档目录和双击脚本约定 |
| 文档派生示例 | PASS | elliptic membrane、membrane uniaxial、shell-solid connection、strength reduction、golf ball impact 均接入 smoke |
| 源码规模门禁 | PASS | `source_size` 保持通过 |
## 4. 示例矩阵
V4.8 期间补齐或确认的示例目录:
| 目录 | 运行入口 | 验收说明 |
|---|---|---|
| `examples/elliptic_membrane` | `run_case.bat` | NAFEMS LE1 椭圆膜文档派生 S4 静力缩减案例 |
| `examples/membrane_uniaxial_stretching` | `run_case.bat` | 各向同性膜单轴拉伸静力案例 |
| `examples/shell_solid_connection` | `run_case.bat` | C3D8 与 S4 共享节点接口静力案例 |
| `examples/strengthReduction` | `run_case.bat` | 强度折减文档派生线弹性坡体案例 |
| `examples/golfBallImpact` | `run_case.bat` | 壳接触动力缩减案例,采用文档摩擦系数尺度 |
| 既有基准目录 | `run_case.bat` | Kirsch、Scordelis-Lo、shell patch、压力脉冲、刚球冲击、2D/3D 拉伸等均补齐双击入口 |
## 5. 测试命令
V4.8 发布前建议执行:
```powershell
cmake --build build-win-gcc-16 --config Release
ctest --test-dir build-win-gcc-16 --output-on-failure
```
示例结构专项检查:
```powershell
ctest --test-dir build-win-gcc-16 -R examples_layout --output-on-failure
```
文档派生示例 smoke 专项检查:
```powershell
ctest --test-dir build-win-gcc-16 -R "example_(elliptic_membrane|membrane_uniaxial|shell_solid_connection|strength_reduction|golf_ball_impact)_smoke" --output-on-failure
```
本轮 Windows GCC 16 验证结果:
```text
cmake --build build-win-gcc-16 --config Release
completed successfully
ctest --test-dir build-win-gcc-16 --output-on-failure
100% tests passed, 0 tests failed out of 47
```
## 6. 后续限制
- 完整 Mohr-Coulomb 强度折减、完整高尔夫球多材料冲击和高保真 shell-solid benchmark 仍需核心求解器后续能力支持。
- pinched cylinder、hemisphere、twisted beam 和更密 Scordelis-Lo 收敛矩阵建议作为 0.5.x 或专项长跑基准推进。
- 外部稀疏求解器后端当前仍是显式 unsupported 占位,接口已预留但未绑定第三方库。
+32
View File
@@ -874,3 +874,35 @@ FemLite 0.4.x 定位为:
- 在 V4.8 中补充 pinched cylinder、hemisphere、twisted beam 和更密 Scordelis-Lo 网格收敛矩阵。
- 将代表性外纤维弯曲塑性扩展为可选多层壳厚度积分时,保持现有 trial/rollback、section tangent 和外部诊断接口兼容。
- 补充更长时间 pressure pulse 与壳接触长跑验证,形成第四版阶段验收报告。
## 29. 0.4.8 开发记录
### V4.8 示例验收、发布检查与阶段报告完善
完成状态:V4.8 将第四版阶段验收收束到可运行示例矩阵、发布前自动检查和验收报告。`examples/` 下每个文档型目录均补充了可执行输入文件,每个包含 `.inp` 的示例目录均提供 `run_case.bat` 双击运行入口。
已完成:
- 新增 `examples/elliptic_membrane/` S4 静力缩减案例,基于 NAFEMS LE1 椭圆膜文档的几何、材料和边界尺度。
- 新增 `examples/membrane_uniaxial_stretching/` S4 单轴拉伸静力案例,采用文档中的各向同性膜材料参数。
- 新增 `examples/shell_solid_connection/` 共享节点壳-实体接口静力案例,覆盖 C3D8 与 S4 混合模型路径。
- 新增 `examples/strengthReduction/` 线弹性坡体楔形静力案例,作为强度折减文档的可执行占位基准。
- 新增 `examples/golfBallImpact/` 壳接触动力缩减案例,采用文档中的摩擦系数尺度并复用刚球冲击路径。
- 为 `clamped_square_plate_pressure_pulse`、`Kirsch`、`rigid_sphere_impact_plate`、`scordelis_lo_roof`、`ScordelisLo`、`shell_patch_test`、`tension2D`、`uniaxialTension3D` 和上述新增目录补充 `run_case.bat`。
- 新增通用 `examples/run_example_case.bat`,统一示例双击运行、结果目录清理和失败码返回。
- 新增 `tests/scripts/check_examples_layout.py`,检查 `examples/` 一级目录中“有文档无 `.inp`”和“有 `.inp` 无 `run_case.bat`”的回退。
- CTest 新增 `examples_layout`,并将新增五个文档派生案例接入 `example_smoke`。
- 新增 `docs/v4_acceptance_report.md`,记录第四版 V4.8 阶段验收范围、测试矩阵、示例矩阵和后续限制。
已补充测试:
- `elliptic_membrane_s4_static.inp`、`membrane_uniaxial_s4_static.inp`、`shell_solid_connection_static.inp` 和 `strength_reduction_slope_static.inp` 已完成静力求解 smoke。
- `example_golf_ball_impact_smoke` 使用短步数动态输入检查接触输出,避免常规回归运行完整长跑。
- `examples_layout` 纳入 Python CTest 分支,保护示例目录结构约定。
- Windows GCC 16 Release 构建已通过;全量 CTest 已通过,47/47 passed。
- 已手动验证 `examples/elliptic_membrane/run_case.bat` 静力入口和 `examples/clamped_square_plate_pressure_pulse/run_case.bat` 动力入口均可在 `FEMLITE_NO_PAUSE=1` 下完成。
后续:
- 将完整 pinched cylinder、hemisphere、twisted beam 和多密度 Scordelis-Lo 收敛矩阵作为 0.5.x 或专项长跑扩展,不阻断 V4.8 阶段验收。
- 当 Mohr-Coulomb、超弹/黏弹和完整 shell-solid coupling 能力进入核心求解器后,将当前文档派生缩减案例替换或扩展为更高保真 benchmark。