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

Method test_lumped_mass_matrix

python/pymesh/tests/test_assembler.py:45–54  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43 self.assertAlmostEqual(0.5, mass)
44
45 def test_lumped_mass_matrix(self):
46 assembler = self.single_triangle_2D_setup()
47 M = assembler.assemble("lumped_mass")
48 self.assert_symmetry(M)
49 self.assert_PD(M)
50
51 # integrate a constant field over the mesh should yield the area.
52 v = np.ones(3)
53 mass = np.dot(v, (M * v))
54 self.assertAlmostEqual(0.5, mass)
55
56 def test_stiffness_matrix(self):
57 assembler = self.single_triangle_2D_setup()

Callers

nothing calls this directly

Calls 4

assert_symmetryMethod · 0.95
assert_PDMethod · 0.95
assembleMethod · 0.45

Tested by

no test coverage detected