def test_degree_weights_on_the_fly(self):
nodes = np.asfortranarray([
[0.0, 0.0],
[1.0, 1.0],
[7.0, 3.0],
[11.0, 8.0],
[15.0, 1.0],
[16.0, -3.0],
])
# NOTE: This is hand picked so that
# d Nodes = [1, 1], [6, 2], [4, 5], [4, -7], [1, -4]
# d^2 Nodes = [5, 1], [-2, 3], [0, -12], [-3, 3]
# so that sqrt(5^2 + 12^2) = 13.0
error_val = self._call_function_under_test(nodes)
expected = 0.125 * 5 * 4 * 13.0
self.assertEqual(error_val, expected)
评论列表
文章目录