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

Method update_3D

tools/Assembler/Materials/ElementWiseIsotropicMaterial.cpp:60–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void ElementWiseIsotropicMaterial::update_3D() {
61 const size_t num_voxels = m_material_mesh->get_num_voxels();
62 const VectorF& young = m_material_mesh->get_attribute(m_young_field_name);
63 const VectorF& poisson = m_material_mesh->get_attribute(m_poisson_field_name);
64 assert(young.size() == num_voxels);
65 assert(poisson.size() == num_voxels);
66
67 m_materials.resize(num_voxels);
68 for (size_t i=0; i<num_voxels; i++) {
69 m_materials[i] = Material::create_isotropic(3, m_density,
70 young[i], poisson[i]);
71 }
72}
73

Callers

nothing calls this directly

Calls 3

get_num_voxelsMethod · 0.45
get_attributeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected