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

Method assert_PSD

python/pymesh/tests/test_assembler.py:29–32  ·  view source on GitHub ↗
(self, A)

Source from the content-addressed store, hash-verified

27 self.assertLess(0.0, eig_values[0])
28
29 def assert_PSD(self, A):
30 eig_values, eig_vectors = scipy.sparse.linalg.eigsh(A, 1, which="SA")
31 eps = np.spacing((A.max() - A.min()) ** 2 * A.shape[0])
32 self.assertLessEqual(0.0, eps + eig_values[0])
33
34 def test_mass_matrix(self):
35 assembler = self.single_triangle_2D_setup()

Callers 1

test_stiffness_matrixMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected