| 385 | } |
| 386 | |
| 387 | MatrixFr ParameterManager::compute_wire_gradient(size_t i) const { |
| 388 | // This is probably not fast, but the number of parameters are typically |
| 389 | // low. |
| 390 | const size_t num_thickness_dofs = get_num_thickness_dofs(); |
| 391 | if (i < num_thickness_dofs) { |
| 392 | size_t count = 0; |
| 393 | for (const auto& param : m_thickness_params) { |
| 394 | if (count == i) |
| 395 | return param->compute_derivative(); |
| 396 | count++; |
| 397 | } |
| 398 | } else { |
| 399 | size_t count = num_thickness_dofs; |
| 400 | for (const auto& param : m_offset_params) { |
| 401 | if (count == i) |
| 402 | return param->compute_derivative(); |
| 403 | count++; |
| 404 | } |
| 405 | |
| 406 | } |
| 407 | |
| 408 | throw RuntimeError("Parameter index out of bound!"); |
| 409 | } |
| 410 | |
| 411 | VectorI ParameterManager::get_thickness_dof_map() const { |
| 412 | size_t domain_size = 0; |
nothing calls this directly
no test coverage detected