3#ifndef WILSON_PLAQUETTE_ACTION_H_
4#define WILSON_PLAQUETTE_ACTION_H_
19 U[d2].start_gather(d1,
ALL);
20 U[d1].start_gather(d2,
ALL);
24 lower[X] = (U[d1][X] * U[d2][X + d1]).
dagger() * U[d2][X];
31 staples[X] = U[d2][X + d1] * (U[d2][X] * U[d1][X + d2]).
dagger();
36 staples[X] += U[d2][X + d1] * (U[d2][X] * U[d1][X + d2]).
dagger();
42 staples[X] += lower[X - d2];
48template <
typename group>
54 U[dir2].start_gather(dir1,
ALL);
55 U[dir1].start_gather(dir2,
ALL);
57 plaq += 1.0 -
real(trace(U[dir1][X] * U[dir2][X + dir1] *
58 (U[dir2][X] * U[dir1][X + dir2]).
dagger())) /
65template <
typename group,
typename atype = hila::arithmetic_type<group>>
73 U[dir2].start_gather(dir1,
ALL);
74 U[dir1].start_gather(dir2,
ALL);
76 P[X] = 1.0 -
real(trace(U[dir1][X] * U[dir2][X + dir1] *
77 (U[dir2][X] * U[dir1][X + dir2]).
dagger())) /
81 atype tmax_plaq = P.
max();
82 if(tmax_plaq>max_plaq) {
89template <
typename group,
typename atype = hila::arithmetic_type<group>>
96 rstaplesum(U, staple, d);
98 K[d][X] -= (U[d][X] * staple[X]).project_to_algebra_scaled(eps);
124template <
typename group,
typename atype = hila::arithmetic_type<group>>
130 rstaplesum(U, staple, d);
132 K[d][X] = (U[d][X] * staple[X]).project_to_algebra_scaled(-eps);
Array< n, m, hila::arithmetic_type< T > > real(const Array< n, m, T > &arg)
Return real part of Array.
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
T max(Parity par=ALL) const
Find maximum value from Field.
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