This commit is contained in:
@@ -543,6 +543,25 @@ subroutine fem_get_convergence_status(increment, iteration, residual_norm, &
|
||||
logical, intent(out) :: converged
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
|
||||
subroutine fem_get_convergence_metrics(relative_residual_norm, &
|
||||
contact_gap_norm, combined_norm, ierr)
|
||||
real(rk), intent(out) :: relative_residual_norm
|
||||
real(rk), intent(out) :: contact_gap_norm
|
||||
real(rk), intent(out) :: combined_norm
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
|
||||
subroutine fem_get_convergence_diagnostics(cutback_count, last_dt, &
|
||||
last_accepted_time, status_code, &
|
||||
failure_code, ierr)
|
||||
integer, intent(out) :: cutback_count
|
||||
real(rk), intent(out) :: last_dt
|
||||
real(rk), intent(out) :: last_accepted_time
|
||||
integer, intent(out) :: status_code
|
||||
integer, intent(out) :: failure_code
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
```
|
||||
|
||||
说明:
|
||||
@@ -552,7 +571,15 @@ end subroutine
|
||||
- `residual_norm` 为最近一次力残差范数。
|
||||
- `correction_norm` 为最近一次位移修正范数;线性路径或尚未形成修正时为 0。
|
||||
- `converged` 表示最近一次记录的增量是否已满足收敛准则。
|
||||
- V4.5 起,非线性静力 Newton 迭代会实时更新该状态;后续 cutback 和多准则收敛诊断沿用同一查询口径。
|
||||
- `relative_residual_norm` 为力残差相对参考外力范数的比值。
|
||||
- `contact_gap_norm` 为最近一次接触力评估中的最大 contact gap residual。
|
||||
- `combined_norm` 为相对力残差、位移修正范数和 contact gap residual 的最大值,用于统一诊断多准则收敛状态。
|
||||
- `cutback_count` 为最近一次静力/非线性 Newmark 运行累计触发的步长缩减次数。
|
||||
- `last_dt` 为最近一次记录的静力增量长度或 Newmark 时间步长。
|
||||
- `last_accepted_time` 为最近一次已提交成功的求解时间;失败并回滚时保持为最后有效时间。
|
||||
- `status_code` 使用 `CONVERGENCE_STATUS_IDLE=0`、`ITERATING=1`、`CONVERGED=2`、`CUTBACK=3`、`FAILED=-1`。
|
||||
- `failure_code` 使用 `CONV_FAIL_NONE=0`、`CONV_FAIL_NONCONVERGENCE=1`、`CONV_FAIL_CUTBACK_LIMIT=2`、`CONV_FAIL_STOPPED=3`。
|
||||
- V4.5 起,非线性静力 Newton 迭代、静力 cutback 失败路径、非线性 Newmark cutback 运行和接触力评估会更新该状态;contact gap/mortar residual 当前作为 diagnostics 进入多准则统计,硬收敛判据仍以力残差为主。
|
||||
|
||||
### 12.6 接触状态
|
||||
|
||||
@@ -914,4 +941,6 @@ fem_finalize
|
||||
- C ABI 追加 `femlite_get_contact_perf_stats`,返回 contact search/force/tangent CPU 时间统计。
|
||||
- C ABI 追加 `femlite_get_contact_cache_stats`,返回 BVH 候选缓存使用和溢出统计。
|
||||
- C ABI 暴露 `femlite_get_convergence_status`,其中 `converged` 使用 `int` 返回 0/1。
|
||||
- C ABI 暴露 `femlite_get_convergence_metrics`,返回相对力残差、contact gap residual 和 combined norm。
|
||||
- C ABI 暴露 `femlite_get_convergence_diagnostics`,返回 cutback 次数、最后步长、最后有效时间、收敛状态码和失败原因码。
|
||||
- 上述函数只追加新符号,不改变 `femlite_get_contact_summary` 的签名和含义。
|
||||
|
||||
Reference in New Issue
Block a user