11template <
typename group,
typename atype = hila::arithmetic_type<group>>
17 U[dir2].start_gather(dir1,
ALL);
18 U[dir1].start_gather(dir2,
ALL);
25 tF0[X] =
log((U[dir1][X] * U[dir2][X + dir1] * (U[dir2][X] * U[dir1][X + dir2]).
dagger()))
28 tF1[X] = U[dir1][X].dagger() * tF0[X] * U[dir1][X];
33 tF0[X] += tF1[X - dir1];
36 U[dir2].start_gather(-dir2,
ALL);
41 Csum[X] = (tF0[X] + U[dir2][X - dir2].dagger() * tF0[X - dir2] * U[dir2][X - dir2]) * 0.25;
45template <
typename group,
typename atype = hila::arithmetic_type<group>>
53 get_log_clover_mat(U, dir1, dir2, Csum);
58 return (atype)stot.
value() / group::size();
61template <
typename group,
typename atype = hila::arithmetic_type<group>>
70 get_log_clover_mat(U, dir1, dir2, Csum);
73 std::vector<Direction> paths[4] = {{dir1, dir2, -dir1, -dir2},
74 {dir2, -dir1, -dir2, dir1},
75 {-dir1, -dir2, dir1, dir2},
76 {-dir2, dir1, dir2, -dir1}};
92 for (
int k = 0; k < 4; ++k) {
96 get_wloop_force_from_wl_add(U, paths[k], Csum, eps, K);
101template <
typename group,
typename atype = hila::arithmetic_type<group>>
107 get_force_log_add(U, K, eps);
Array< n, m, hila::arithmetic_type< T > > real(const Array< n, m, T > &arg)
Return real part of Array.
Array< n, m, T > log(Array< n, m, T > a)
Logarithm.
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
dir_mask_t start_gather(Direction d, Parity p=ALL) const
Special reduction class: enables delayed and non-blocking reductions, which are not possible with the...
const T value()
Return value of the reduction variable. Wait for the comms if needed.
Reduction & allreduce(bool b=true)
allreduce(bool) turns allreduce on or off. By default on.
Reduction & delayed(bool b=true)
deferred(bool) turns deferred on or off. By default turns on.
Complex< T > dagger(const Complex< T > &val)
Return dagger of Complex number.
#define foralldir(d)
Macro to loop over (all) Direction(s)
Direction
Enumerator for direction that assigns integer to direction to be interpreted as unit vector.
constexpr Parity ALL
bit pattern: 011
auto mul_trace(const Mtype1 &a, const Mtype2 &b)
Returns trace of product of two matrices.