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

Method single_triangle_2D_setup

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

Source from the content-addressed store, hash-verified

6
7class AssemblerTest(TestCase):
8 def single_triangle_2D_setup(self):
9 vertices = np.array([
10 [0.0, 0.0],
11 [1.0, 0.0],
12 [0.0, 1.0],
13 ])
14 faces = np.array([
15 [0, 1, 2]
16 ])
17 mesh = form_mesh(vertices, faces)
18 material = Material.create_isotropic(2, 1.0, 1.0, 0.0)
19 assembler = Assembler(mesh, material)
20 return assembler
21
22 def assert_symmetry(self, A):
23 self.assertAlmostEqual(0.0, scipy.sparse.linalg.norm(A - A.T))

Callers 4

test_mass_matrixMethod · 0.95
test_stiffness_matrixMethod · 0.95

Calls 3

form_meshFunction · 0.90
AssemblerClass · 0.90
create_isotropicMethod · 0.45

Tested by

no test coverage detected