MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / get_thickness_dof_map

Method get_thickness_dof_map

tools/Wires/Parameters/ParameterManager.cpp:411–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411VectorI 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
435MatrixIr ParameterManager::get_offset_dof_map() const {
436 if (m_dof_type == ISOTROPIC) {

Callers 1

TEST_FFunction · 0.80

Calls 5

RuntimeErrorClass · 0.85
get_roiMethod · 0.80
get_num_verticesMethod · 0.45
get_num_edgesMethod · 0.45
sizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.64