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

Method set_dofs

tools/Wires/Parameters/ParameterManager.cpp:343–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343void ParameterManager::set_dofs(const VectorF& values) {
344 const size_t num_thickness_dofs = m_thickness_params.get_num_dofs();
345 const size_t num_offset_dofs = m_offset_params.get_num_dofs();
346 if (num_thickness_dofs + num_offset_dofs != values.size()) {
347 std::stringstream err_msg;
348 err_msg << "Invalid number of dofs! Expecting " <<
349 num_thickness_dofs + num_offset_dofs << " values, got " <<
350 values.size() << " values";
351 throw RuntimeError(err_msg.str());
352 }
353
354 m_thickness_params.set_dofs(values.segment(0, num_thickness_dofs));
355 m_offset_params.set_dofs(
356 values.segment(num_thickness_dofs, num_offset_dofs));
357}
358
359std::vector<MatrixFr> ParameterManager::compute_shape_velocity(Mesh::Ptr mesh) {
360 std::vector<MatrixFr> velocity;

Callers 6

create_from_dof_fileMethod · 0.45
dofsMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 4

RuntimeErrorClass · 0.85
get_num_dofsMethod · 0.45
sizeMethod · 0.45
strMethod · 0.45

Tested by 4

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36