(self)
| 7 | |
| 8 | class SparseSolverTest(TestCase): |
| 9 | def test_identity(self): |
| 10 | N =1000 |
| 11 | M = scipy.sparse.eye(N) |
| 12 | rhs = np.ones(N) |
| 13 | for solver_type in pymesh.SparseSolver.get_supported_solvers(): |
| 14 | solver = pymesh.SparseSolver.create(solver_type) |
| 15 | solver.max_iterations = 10 |
| 16 | solver.analyze_pattern(M) |
| 17 | solver.factorize(M) |
| 18 | x = solver.solve(rhs) |
| 19 | self.assert_array_almost_equal(rhs.ravel(), x.ravel()) |
| 20 |
nothing calls this directly
no test coverage detected