From f6e850d93f0967b2aa703edce460546328ebe308 Mon Sep 17 00:00:00 2001 From: Christoph Lehner Date: Thu, 6 Jun 2024 14:00:27 +0200 Subject: [PATCH] update --- tests/qcd/scalar.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/qcd/scalar.py b/tests/qcd/scalar.py index 82aa82ce..c3cbdb8e 100755 --- a/tests/qcd/scalar.py +++ b/tests/qcd/scalar.py @@ -119,7 +119,7 @@ A1 = g.qcd.scalar.action.fourier_mass_term(sqrt_mass) A1.assert_gradient_error(rng, U_mom, U_mom, 1e-3, 1e-8) r = A1.draw(U_mom, rng) -assert abs(A1(U_mom) - r) < 1e-10 +assert abs(A1(U_mom)/r - 1) < 1e-10 # group defect would be triggered if sqrt_mass does not have sqrt_mass[k] = sqrt_mass[-k] eps = g.group.defect(U_mom[0]) @@ -177,8 +177,6 @@ def __slap(dst, src): slap = g.matrix_operator(mat=lap, inv_mat=cg(lap), accept_list=True) slap2 = slap * slap -# TODO: need stencil version of __slap - A2 = g.qcd.scalar.action.general_mass_term(M=slap2, sqrt_M=slap) A2.assert_gradient_error(rng, U_mom, U_mom, 1e-3, 1e-8)