diff --git a/docs/contents/shmc.md b/docs/contents/shmc.md index 793b359f5..71b380b75 100644 --- a/docs/contents/shmc.md +++ b/docs/contents/shmc.md @@ -169,6 +169,13 @@ U^{ba}(x,\mu) T^a = U(x,\mu) T^b U^{-1}(x,\mu) \ea $$ +therefore +$$ +\ba +U^{ba}(x,\mu) T^b = U^{-1}(x,\mu) T^a U(x,\mu) +\ea +$$ + ### Gauge momentum evolve $$ @@ -211,16 +218,16 @@ $$ \ba \frac{d}{dt}\pi_2(x,\mu) &= --\frac{1}{2} T^a \frac{\delta S}{\delta s_2(x,\mu)^a} +-\frac{1}{2} T^b \frac{\delta S}{\delta s_2(x,\mu)^b} \\ &= -\frac{1}{2} U^{ba}(x,\mu) T^a \frac{\delta S}{\delta s_1(x,\mu)^b} +\frac{1}{2} U^{ba}(x,\mu) T^b \frac{\delta S}{\delta s_1(x,\mu)^a} \\ &= -\frac{1}{2} U(x,\mu) T^a U^{-1}(x,\mu) \frac{\delta S}{\delta s_1(x,\mu)^a} +\frac{1}{2} U(x,\mu) T^a U(x,\mu) \frac{\delta S}{\delta s_1(x,\mu)^a} \\ &= -- U(x,\mu) \frac{d}{dt}\pi_1(x,\mu) U^{-1}(x,\mu) +- U^{-1}(x,\mu) \frac{d}{dt}\pi_1(x,\mu) U(x,\mu) \ea $$ where diff --git a/examples-py/hmc-pure-gauge-symmetric.log b/examples-py/hmc-pure-gauge-symmetric.log index 8a5203049..4cb678fa0 100644 --- a/examples-py/hmc-pure-gauge-symmetric.log +++ b/examples-py/hmc-pure-gauge-symmetric.log @@ -26,4 +26,28 @@ CHECK: ('meson_tensor_tsep', 1) CHECK: ('meson_jwjj_threshold', 0.1) CHECK: ('meson_tsep_list', [1, 2, 3, 4, 5, 6, 7]) CHECK: ('hmc', {'max_traj': 8, 'max_traj_always_accept': 4, 'max_traj_reverse_test': 2, 'md_time': 1.0, 'n_step': 6, 'beta': 2.13, 'c1': -0.331, 'save_traj_interval': 4, 'is_saving_topo_info': True}) +CHECK: 0 'run_hmc: 1 plaq' actual: 0.7349941278702551 ; load: 0.518293870285883 . +CHECK: target eps: 1e-05 ; actual eps: 0.34581079193798353 . +CHECK: ERROR: JSON results value does not match. +CHECK: 1 'run_hmc: 2 plaq' actual: 0.6690061680093138 ; load: 0.22815696564136062 . +CHECK: target eps: 1e-05 ; actual eps: 0.9827626344254248 . +CHECK: ERROR: JSON results value does not match. +CHECK: 2 'run_hmc: 3 plaq' actual: 0.6347955903849722 ; load: 0.158129326711539 . +CHECK: target eps: 1e-05 ; actual eps: 1.2022986121280272 . +CHECK: ERROR: JSON results value does not match. +CHECK: 3 'run_hmc: 4 plaq' actual: 0.6347955903849722 ; load: 0.158129326711539 . +CHECK: target eps: 1e-05 ; actual eps: 1.2022986121280272 . +CHECK: ERROR: JSON results value does not match. +CHECK: 4 'run_hmc: 5 plaq' actual: 0.6347955903849722 ; load: 0.158129326711539 . +CHECK: target eps: 1e-05 ; actual eps: 1.2022986121280272 . +CHECK: ERROR: JSON results value does not match. +CHECK: 5 'run_hmc: 6 plaq' actual: 0.6347955903849722 ; load: 0.158129326711539 . +CHECK: target eps: 1e-05 ; actual eps: 1.2022986121280272 . +CHECK: ERROR: JSON results value does not match. +CHECK: 6 'run_hmc: 7 plaq' actual: 0.6347955903849722 ; load: 0.158129326711539 . +CHECK: target eps: 1e-05 ; actual eps: 1.2022986121280272 . +CHECK: ERROR: JSON results value does not match. +CHECK: 7 'run_hmc: 8 plaq' actual: 0.6347955903849722 ; load: 0.158129326711539 . +CHECK: target eps: 1e-05 ; actual eps: 1.2022986121280272 . +CHECK: ERROR: JSON results value does not match. CHECK: finished successfully. diff --git a/examples-py/hmc-pure-gauge-symmetric.log.json b/examples-py/hmc-pure-gauge-symmetric.log.json index 2fbf15283..2d2fe54ea 100644 --- a/examples-py/hmc-pure-gauge-symmetric.log.json +++ b/examples-py/hmc-pure-gauge-symmetric.log.json @@ -1,34 +1,34 @@ [ [ "run_hmc: 1 plaq", - 0.518293870285883 + 0.7349941278702551 ], [ "run_hmc: 2 plaq", - 0.22815696564136062 + 0.6690061680093138 ], [ "run_hmc: 3 plaq", - 0.158129326711539 + 0.6347955903849722 ], [ "run_hmc: 4 plaq", - 0.158129326711539 + 0.6347955903849722 ], [ "run_hmc: 5 plaq", - 0.158129326711539 + 0.6347955903849722 ], [ "run_hmc: 6 plaq", - 0.158129326711539 + 0.6347955903849722 ], [ "run_hmc: 7 plaq", - 0.158129326711539 + 0.6347955903849722 ], [ "run_hmc: 8 plaq", - 0.158129326711539 + 0.6347955903849722 ] ] \ No newline at end of file diff --git a/qlat/qlat/lib/hmc.cpp b/qlat/qlat/lib/hmc.cpp index 8b3639503..e6701fbfd 100644 --- a/qlat/qlat/lib/hmc.cpp +++ b/qlat/qlat/lib/hmc.cpp @@ -256,14 +256,14 @@ void set_gm_force_dual(GaugeMomentum& gm_force_dual, const GaugeField& gf, qacc_for(index, gf.geo().local_volume(), { const Geometry& geo = gf.geo(); const Coordinate xl = geo.coordinate_from_index(index); - Vector gm_dual_v = gm_force_dual.get_elems_const(xl); + Vector gm_dual_v = gm_force_dual.get_elems(xl); const Vector gf_v = gf.get_elems_const(xl); const Vector gm_v = gm_force.get_elems_const(xl); qassert(gm_dual_v.size() == 4); qassert(gf_v.size() == 4); qassert(gm_v.size() == 4); for (int mu = 0; mu < 4; ++mu) { - gm_dual_v[mu] = -gf_v[mu] * gm_v[mu] * matrix_adjoint(gf_v[mu]); + gm_dual_v[mu] = -matrix_adjoint(gf_v[mu]) * gm_v[mu] * gf_v[mu]; } }); }