3#ifndef LOG_TOPO_SUPP_ACTION_H_
4#define LOG_TOPO_SUPP_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 C[X] =
log((U[dir1][X] * U[dir2][X + dir1] * (U[dir2][X] * U[dir1][X + dir2]).
dagger()))
28 tF[X] = U[dir1][X].dagger() * C[X] * U[dir1][X];
37 Csum[X] += tF[X - dir1];
42 tF[X] = U[dir2][X].dagger() * Csum[X] * U[dir2][X];
47 Csum[X] += tF[X - dir2];
52template <
typename group,
typename atype = hila::arithmetic_type<group>>
56 U[dir2].start_gather(dir1,
ALL);
57 U[dir1].start_gather(dir2,
ALL);
62 C[X] =
log((U[dir1][X] * U[dir2][X + dir1] * (U[dir2][X] * U[dir1][X + dir2]).
dagger()))
68template <
typename group>
79 get_log_plaq_mat(U, dir1, dir2, F[k]);
84 int kmap[6] = {5, 4, 3, 2, 1, 0};
92 for (k = 0; k < 3; ++k) {
95 stot += ttstot * ttstot;
99 return stot.
value() / group::size();
102template <
typename group,
typename atype = hila::arithmetic_type<group>>
107 atype teps = 2.0 * eps;
112 int kmap[6] = {5, 4, 3, 2, 1, 0};
124 get_log_plaq_mat(U, dir1, dir2, F[k]);
130 for (k = 0; k < 3; ++k) {
136 for (k = 0; k < 3; ++k) {
137 onsites(
ALL) F[k][X] *= Qdens[k][X];
138 onsites(
ALL) F[kmap[k]][X] *= Qdens[k][X];
146 std::vector<Direction> path = {dir1, dir2, -dir1, -dir2};
148 get_wloop_force_from_wl_add(U, path, F[kmap[k]], teps, K);
166template <
typename group,
typename atype = hila::arithmetic_type<group>>
173 get_force_topo_supp_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.