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

Method extract_dofs

tools/Wires/Parameters/IsotropicDofExtractor.cpp:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33//}
34
35std::vector<VectorF> IsotropicDofExtractor::extract_dofs(const VectorF& v) {
36 const size_t dim = m_wire_network->get_dim();
37 assert(v.size() == dim);
38 if (dim == 3) {
39 return extract_3D_dofs(v);
40 } else if (dim == 2) {
41 return extract_2D_dofs(v);
42 } else {
43 std::stringstream err_msg;
44 err_msg << "Unsupported dim: " << dim;
45 throw NotImplementedError(err_msg.str());
46 }
47}
48
49void IsotropicDofExtractor::check_bbox_is_isotropic() const {
50 VectorF half_size = 0.5 * (m_bbox_max - m_bbox_min);

Callers 2

create_isotropicMethod · 0.80

Calls 4

NotImplementedErrorClass · 0.85
get_dimMethod · 0.45
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected