3#ifndef LOG_CLOVER_ACTION_H_
4#define LOG_CLOVER_ACTION_H_
11template <
typename group,
typename atype = hila::arithmetic_type<group>>
17 U[dir2].start_gather(dir1,
ALL);
18 U[dir1].start_gather(dir2,
ALL);
25 Csum[X] =
log((U[dir1][X] * U[dir2][X + dir1] * (U[dir2][X] * U[dir1][X + dir2]).
dagger()))
28 tF[X] = U[dir1][X].dagger() * Csum[X] * U[dir1][X];
33 Csum[X] += tF[X - dir1];
38 tF[X] = U[dir2][X].dagger() * Csum[X] * U[dir2][X];
43 Csum[X] += tF[X - dir2];
48template <
typename group>
56 get_log_clover_mat(U, dir1, dir2, Csum);
61 return stot.
value() / group::size();
64template <
typename group,
typename atype = hila::arithmetic_type<group>>
73 get_log_clover_mat(U, dir1, dir2, Csum);
76 std::vector<Direction> paths[4] = {{dir1, dir2, -dir1, -dir2},
77 {dir2, -dir1, -dir2, dir1},
78 {-dir1, -dir2, dir1, dir2},
79 {-dir2, dir1, dir2, -dir1}};
94 for (
int k = 0; k < 4; ++k) {
98 get_wloop_force_from_wl_add(U, paths[k], Csum, 0.25*eps, K);
103template <
typename group,
typename atype = hila::arithmetic_type<group>>
110 get_force_log_add(U, K, eps);
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...
double squarenorm() const
Squarenorm.
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