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

Method compute_cell_size

tools/Assembler/Materials/ElementWiseMaterial.cpp:52–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52Float ElementWiseMaterial::compute_cell_size() {
53 if (!m_material_mesh->has_attribute("edge_length")) {
54 m_material_mesh->add_attribute("edge_length");
55 }
56 const VectorF& edge_lengths = m_material_mesh->get_attribute("edge_length");
57 return 0.1 * edge_lengths.sum() / edge_lengths.size();
58}
59
60void ElementWiseMaterial::initialize_2D_grid() {
61 const size_t dim = m_material_mesh->get_dim();

Callers

nothing calls this directly

Calls 4

has_attributeMethod · 0.45
add_attributeMethod · 0.45
get_attributeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected