33#ifndef QCD_WILSON_GAUGE_ACTION_H
34#define QCD_WILSON_GAUGE_ACTION_H
72 virtual std::string
action_name() {
return "WilsonGaugeAction";}
75 std::stringstream sstream;
76 sstream <<
GridLogMessage <<
"[WilsonGaugeAction] Beta: " << beta << std::endl;
81 virtual void refresh(
const GaugeField &
U, GridSerialRNG &sRNG, GridParallelRNG &pRNG){};
87 virtual RealD S(
const GaugeField &
U) {
89 RealD vol =
U.Grid()->gSites();
95 RealD action = beta * (1.0 - plaq) * (
Nd * (
Nd - 1.0)) * vol * 0.5;
108 virtual void deriv(
const GaugeField &
U, GaugeField &dSdU) {
110 GridBase *grid =
U.Grid();
112 GaugeLinkField dSdU_mu(grid);
113 std::vector<GaugeLinkField> Umu(
Nd, grid);
114 for (
int mu = 0; mu <
Nd; mu++) {
118 for (
int mu = 0; mu <
Nd; mu++) {
121 dSdU_mu =
Ta(Umu[mu] * dSdU_mu) * factor;
void PokeIndex(Lattice< vobj > &lhs, const Lattice< decltype(peekIndex< Index >(vobj(), 0))> &rhs, int i)
auto PeekIndex(const Lattice< vobj > &lhs, int i) -> Lattice< decltype(peekIndex< Index >(vobj(), i))>
GridLogger GridLogMessage(1, "Message", GridLogColours, "NORMAL")
#define NAMESPACE_BEGIN(A)
accelerator_inline iScalar< vtype > Ta(const iScalar< vtype > &r)
static INTERNAL_PRECISION U
Base class for all actions.
virtual RealD S(const GaugeField &U)=0
virtual RealD Sinitial(const GaugeField &U)
virtual std::string LogParameters()=0
virtual std::string action_name()=0
virtual void refresh(const GaugeField &U, GridSerialRNG &sRNG, GridParallelRNG &pRNG)=0
virtual void deriv(const GaugeField &U, GaugeField &dSdU)=0
The Wilson gauge action, as introduced in Wilson, Phys. Rev. D 10, 2445. See for example Gattringer a...
INHERIT_GIMPL_TYPES(Gimpl)
All attributes of the gauge implementation are available from the action. See GaugeImplTypes....
static RealD avgPlaquette(const GaugeLorentz &Umu)
static void Staple(GaugeMat &staple, const GaugeLorentz &Umu, int mu, int nu)