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

Method update_2D

tools/Assembler/Materials/ElementWiseIsotropicMaterial.cpp:46–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void ElementWiseIsotropicMaterial::update_2D() {
47 const size_t num_faces = m_material_mesh->get_num_faces();
48 const VectorF& young = m_material_mesh->get_attribute(m_young_field_name);
49 const VectorF& poisson = m_material_mesh->get_attribute(m_poisson_field_name);
50 assert(young.size() == num_faces);
51 assert(poisson.size() == num_faces);
52
53 m_materials.resize(num_faces);
54 for (size_t i=0; i<num_faces; i++) {
55 m_materials[i] = Material::create_isotropic(2, m_density,
56 young[i], poisson[i]);
57 }
58}
59
60void ElementWiseIsotropicMaterial::update_3D() {
61 const size_t num_voxels = m_material_mesh->get_num_voxels();

Callers

nothing calls this directly

Calls 3

get_num_facesMethod · 0.45
get_attributeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected