def test_polygon_value_grad(self): p = np.array([[1., 0], [2, 3], [2, 7], [3, 8], [-2, 8], [-5, 2]]) x = np.array([[1,2,3.]]) nptest.assert_almost_equal( electrode.polygon_potential(x, [p], 1, 1, 0, 0, None), [[-0.0485227, 0.0404789, -0.076643]])
def test_polygon_value(self): p = np.array([[1., 0], [2, 3], [2, 7], [3, 8], [-2, 8], [-5, 2]]) x = np.array([[1,2,3.]]) nptest.assert_almost_equal( electrode.polygon_potential(x, [p], 1, 0, 0, 0, None), [[.24907]])