3#ifndef ENERGY_AND_TOPO_CHARGE_LOG_H_
4#define ENERGY_AND_TOPO_CHARGE_LOG_H_
8template <
typename group,
typename atype = hila::arithmetic_type<group>>
9void measure_topo_charge_and_energy_log(
const GaugeField<group> &U, atype &qtopo_out,
29 U[dir2].start_gather(dir1,
ALL);
30 U[dir1].start_gather(dir2,
ALL);
36 log((U[dir1][X] * U[dir2][X + dir1] * (U[dir2][X] * U[dir1][X + dir2]).
dagger()))
39 tF1[X] = U[dir1][X].dagger() * tF0[X] * U[dir1][X];
44 tF0[X] += tF1[X - dir1];
47 U[dir2].start_gather(-dir2,
ALL);
53 (tF0[X] + U[dir2][X - dir2].dagger() * tF0[X - dir2] * U[dir2][X - dir2]) * 0.25;
70 qtopo_out = (atype)qtopo.
value() / (4.0 * M_PI * M_PI);
71 energy_out = (atype)energy.
value();
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...
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)
constexpr Parity ALL
bit pattern: 011
auto mul_trace(const Mtype1 &a, const Mtype2 &b)
Returns trace of product of two matrices.