| 409 | } |
| 410 | |
| 411 | VectorI ParameterManager::get_thickness_dof_map() const { |
| 412 | size_t domain_size = 0; |
| 413 | if (get_thickness_type() == ParameterCommon::VERTEX) { |
| 414 | domain_size = m_wire_network->get_num_vertices(); |
| 415 | } else { |
| 416 | domain_size = m_wire_network->get_num_edges(); |
| 417 | } |
| 418 | VectorI dof_map = VectorI::Ones(domain_size) * -1; |
| 419 | |
| 420 | size_t dof_counter = 0; |
| 421 | for (const auto& param : m_thickness_params) { |
| 422 | VectorI roi = param->get_roi(); |
| 423 | const size_t roi_size = roi.size(); |
| 424 | for (size_t i=0; i<roi_size; i++) { |
| 425 | if (dof_map[roi[i]] != -1) { |
| 426 | throw RuntimeError("Thickness parameters have overlapping ROI"); |
| 427 | } |
| 428 | dof_map[roi[i]] = dof_counter; |
| 429 | } |
| 430 | dof_counter++; |
| 431 | } |
| 432 | return dof_map; |
| 433 | } |
| 434 | |
| 435 | MatrixIr ParameterManager::get_offset_dof_map() const { |
| 436 | if (m_dof_type == ISOTROPIC) { |