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

Method assert_symmetry

python/pymesh/tests/test_material.py:11–21  ·  view source on GitHub ↗

Check all symmetries of elasticity tensor.

(self, tensor, dim)

Source from the content-addressed store, hash-verified

9
10 class MaterialTest(TestCase):
11 def assert_symmetry(self, tensor, dim):
12 """ Check all symmetries of elasticity tensor.
13 """
14 C = tensor
15 for i in range(dim):
16 for j in range(dim):
17 for k in range(dim):
18 for l in range(dim):
19 self.assertAlmostEqual(C[i,j,k,l], C[j,i,k,l])
20 self.assertAlmostEqual(C[i,j,k,l], C[i,j,l,k])
21 self.assertAlmostEqual(C[i,j,k,l], C[k,l,i,j])
22
23 def test_isotropic_material(self):
24 young = 1000.0

Callers 3

test_equivalenceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected