def test_A_bar_k(self):
     for eps in [5., 10.]:
         pts = np.linspace(0, 1, 21)[1:-1]
         natural_kernel = laplacian_natural_kernel.LaplacianNaturalKernel(eps, True)
         for x in pts:
             for y in pts:
                 res = natural_kernel.A_bar_k(x, y)
                 res_quad, err = A_bar_k_quadrature(x, y, eps)
                 np.testing.assert_almost_equal(res, res_quad, err_msg='Failed at ({}, {}), epsilon={}'.format(x, y, eps))
 def test_I_4(self):
     # exclude points directly on the boundary
     for eps in [5., 10.]:
         pts = np.linspace(0, 1, 21)[1:-1]
         natural_kernel = laplacian_natural_kernel.LaplacianNaturalKernel(eps, True)
         for x in pts:
             for y in pts[(pts >= x)]:
                 res = natural_kernel.I_4(x, y)
                 res_quad, err = I_4_quadrature(x, y, eps)
                 np.testing.assert_almost_equal(res, res_quad, err_msg='Failed at ({}, {}), epsilon={}'.format(x, y, eps))