3#ifndef BULK_PREVENTION_ACTION_H_
4#define BULK_PREVENTION_ACTION_H_
18 for (
int k = 2; k <= T::size(); ++k) {
20 mult(U, tB[1 - ip], tB[ip]);
21 tc = trace(tB[ip]) / k;
28T bp_UAmat(
const T &U) {
34 mult(tA2, tA2.dagger(), tA1);
35 return U * tA1 * tA1 * tA2;
39T bp_iOsqmat(
const T &U) {
46 mult(tA2, tA2.dagger(), tA1);
50template <
typename group>
56 U[dir2].start_gather(dir1,
ALL);
57 U[dir1].start_gather(dir2,
ALL);
59 plaq +=
real(trace(bp_iOsqmat(U[dir1][X] * U[dir2][X + dir1] *
60 (U[dir2][X] * U[dir1][X + dir2]).
dagger()))) /
68template <
typename group,
typename atype = hila::arithmetic_type<group>>
74 atype teps = 2.0 * eps;
77 U[d2].start_gather(d1,
ALL);
78 U[d1].start_gather(d2,
ALL);
80 fmatp[X] = bp_UAmat(U[d1][X] * U[d2][X + d1] * (U[d2][X] * U[d1][X + d2]).
dagger());
81 fmatmd1[X] = (fmatp[X] * U[d2][X]).
dagger() *
84 U[d1][X].dagger() * fmatp[X] * U[d1][X];
89 K[d1][X] -= (fmatmd1[X - d2] + fmatp[X]).project_to_algebra_scaled(teps);
90 K[d2][X] -= (fmatmd2[X - d1] - fmatp[X]).project_to_algebra_scaled(teps);
96template <
typename group,
typename atype = hila::arithmetic_type<group>>
104 get_force_bp_add(U, K, 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...
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)
constexpr Parity ALL
bit pattern: 011
void mult(const Mt1 &a, const Mt2 &b, Mt3 &res)
compute product of two matrices and write result to existing matrix