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

Method test_equivalence

python/pymesh/tests/test_material.py:67–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 stress[0,1] * (1+poisson) / young)
66
67 def test_equivalence(self):
68 young = 1000.0
69 poisson = 0.3
70 iso_mat = Material.create_isotropic(3, 1.0, young, poisson)
71
72 ortho_mat = Material.create_orthotropic(1.0,
73 np.ones(3)*young,
74 np.ones(6)*poisson,
75 np.ones(3)*(0.5*young/(1+poisson)))
76 self.assert_symmetry(ortho_mat.material_tensor, 3)
77
78 self.assertEqual(iso_mat.dim, ortho_mat.dim)
79 self.assertEqual(iso_mat.density, ortho_mat.density)
80 self.assert_array_almost_equal(iso_mat.material_tensor,
81 ortho_mat.material_tensor)
82
83

Callers

nothing calls this directly

Calls 4

assert_symmetryMethod · 0.95
create_isotropicMethod · 0.45
create_orthotropicMethod · 0.45

Tested by

no test coverage detected