(self)
| 9 | |
| 10 | class WindingNumberTest(TestCase): |
| 11 | def test_cube(self): |
| 12 | mesh = generate_box_mesh( |
| 13 | np.array([0, 0, 0]), np.array([1, 1, 1])) |
| 14 | queries = np.array([ |
| 15 | [-1, 0, 0], |
| 16 | [0.0, 0.0, 0.0], |
| 17 | [0.5, 0.0, 0.0], |
| 18 | [0.5, 0.5, 0.0], |
| 19 | [0.5, 0.5, 0.5], |
| 20 | ]) |
| 21 | |
| 22 | winding_numbers = compute_winding_number(mesh, queries) |
| 23 | |
| 24 | self.assertEqual(len(queries), len(winding_numbers)) |
| 25 | self.assert_array_almost_equal( |
| 26 | [0, 0.125, 0.25, 0.5, 1], winding_numbers) |
| 27 | |
| 28 | @unittest.skip("Faster winding number is temporarily unavailable") |
| 29 | def test_fast_winding_number(self): |
nothing calls this directly
no test coverage detected