This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
- node-based surface、analytical rigid plane surface 和 contact property 查询/输入子集。
|
||||
- contact pair active-set、gap residual 和 augmented penalty 诊断接口。
|
||||
- contact pair 搜索统计接口,用于 V4.4 搜索/并行性能验收。
|
||||
- 线性求解器设置和最近一次线性求解统计接口,用于 V4.6 内部/外部求解路径切换验收。
|
||||
|
||||
## 3. 接口设计原则
|
||||
|
||||
@@ -581,7 +582,43 @@ end subroutine
|
||||
- `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 接触状态
|
||||
### 12.6 线性求解器控制
|
||||
|
||||
V4.6 提供内部线性求解器配置和最近一次求解统计查询:
|
||||
|
||||
```fortran
|
||||
subroutine fem_set_linear_solver(method, preconditioner, ierr)
|
||||
integer, intent(in) :: method
|
||||
integer, intent(in) :: preconditioner
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
|
||||
subroutine fem_get_linear_solver_settings(method, preconditioner, ierr)
|
||||
integer, intent(out) :: method
|
||||
integer, intent(out) :: preconditioner
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
|
||||
subroutine fem_get_linear_solver_stats(method, preconditioner, iteration, &
|
||||
residual_norm, status_code, ierr)
|
||||
integer, intent(out) :: method
|
||||
integer, intent(out) :: preconditioner
|
||||
integer, intent(out) :: iteration
|
||||
real(rk), intent(out) :: residual_norm
|
||||
integer, intent(out) :: status_code
|
||||
integer, intent(out) :: ierr
|
||||
end subroutine
|
||||
```
|
||||
|
||||
说明:
|
||||
|
||||
- `method` 使用 `LSOLVER_CG=1`、`LSOLVER_BICGSTAB=2`、`LSOLVER_EXTERNAL=100`。
|
||||
- `preconditioner` 使用 `LPRECOND_NONE=0`、`LPRECOND_JACOBI=1`。
|
||||
- `status_code` 使用 `LS_STATUS_IDLE=0`、`LS_STATUS_CONVERGED=1`、`LS_STATUS_FAILED=-1`、`LS_STATUS_UNSUPPORTED=-2`。
|
||||
- `LSOLVER_EXTERNAL` 仅作为外部稀疏求解器预留路径;当前配置可记录,但实际求解返回 unsupported。
|
||||
- 静力、隐式 Newmark 和非线性 Newton 修正方程均通过同一分发层求解。
|
||||
|
||||
### 12.7 接触状态
|
||||
|
||||
第三版提供接触结果查询接口:
|
||||
|
||||
@@ -943,4 +980,5 @@ fem_finalize
|
||||
- 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 次数、最后步长、最后有效时间、收敛状态码和失败原因码。
|
||||
- C ABI 暴露 `femlite_set_linear_solver`、`femlite_get_linear_solver_settings` 和 `femlite_get_linear_solver_stats`,返回/设置值与 Fortran API 常量一致。
|
||||
- 上述函数只追加新符号,不改变 `femlite_get_contact_summary` 的签名和含义。
|
||||
|
||||
Reference in New Issue
Block a user