41 const std::vector<double>
rho;
44 std::vector<double>
set_rho(
const double common_rho)
const {
45 std::vector<double> res;
47 for(
int mn=0; mn<
Nd*
Nd; ++mn) res.push_back(common_rho);
48 for(
int mu=0; mu<
Nd; ++mu) res[mu + mu*
Nd] = 0.0;
64 void smear(GaugeField& u_smr,
const GaugeField&
U)
const{
66 GaugeLinkField Cup(grid), tmp_stpl(grid);
70 for(
int mu=0; mu<
Nd; ++mu){
72 for(
int nu=0; nu<
Nd; ++nu){
76 Cup += tmp_stpl*
rho[mu +
Nd * nu];
86 const GaugeField& iLambda,
87 const GaugeField&
U)
const{
98 GaugeLinkField staple(grid), u_tmp(grid);
99 GaugeLinkField iLambda_mu(grid), iLambda_nu(grid);
100 GaugeLinkField U_mu(grid), U_nu(grid);
101 GaugeLinkField sh_field(grid), temp_Sigma(grid);
102 Real rho_munu, rho_numu;
104 for(
int mu = 0; mu <
Nd; ++mu){
108 for(
int nu = 0; nu <
Nd; ++nu){
113 rho_munu =
rho[mu +
Nd * nu];
114 rho_numu =
rho[nu +
Nd * mu];
118 temp_Sigma = -rho_numu*staple*iLambda_nu;
120 Gimpl::AddLink(SigmaTerm, temp_Sigma, mu);
122 sh_field =
Cshift(iLambda_nu, mu, 1);
124 temp_Sigma = rho_numu*sh_field*staple;
126 Gimpl::AddLink(SigmaTerm, temp_Sigma, mu);
128 sh_field =
Cshift(iLambda_mu, nu, 1);
130 temp_Sigma = -rho_munu*staple*U_nu*sh_field*
adj(U_nu);
132 Gimpl::AddLink(SigmaTerm, temp_Sigma, mu);
135 sh_field =
Cshift(U_nu, mu, 1);
137 temp_Sigma = -rho_munu*
adj(sh_field)*
adj(U_mu)*iLambda_mu*U_nu;
138 temp_Sigma += rho_numu*
adj(sh_field)*
adj(U_mu)*iLambda_nu*U_nu;
140 u_tmp =
adj(U_nu)*iLambda_nu;
141 sh_field =
Cshift(u_tmp, mu, 1);
142 temp_Sigma += -rho_numu*sh_field*
adj(U_mu)*U_nu;
143 sh_field =
Cshift(temp_Sigma, nu, -1);
144 Gimpl::AddLink(SigmaTerm, sh_field, mu);
auto Cshift(const Expression &expr, int dim, int shift) -> decltype(closure(expr))
#define INHERIT_GIMPL_TYPES(GImpl)
Lattice< vobj > adj(const Lattice< vobj > &lhs)
#define NAMESPACE_BEGIN(A)
void pokeLorentz(Lattice< vobj > &lhs, const Lattice< decltype(peekIndex< LorentzIndex >(vobj(), 0))> &rhs, int i)
auto peekLorentz(const vobj &rhs, int i) -> decltype(PeekIndex< LorentzIndex >(rhs, 0))
static INTERNAL_PRECISION U
void derivative(GaugeField &SigmaTerm, const GaugeField &iLambda, const GaugeField &U) const
const std::vector< double > rho
Smear_APE(const std::vector< double > &rho_)
Smear_APE(double rho_val)
std::vector< double > set_rho(const double common_rho) const
void smear(GaugeField &u_smr, const GaugeField &U) const
static void StapleUpper(GaugeMat &staple, const GaugeLorentz &Umu, int mu, int nu)
static void Staple(GaugeMat &staple, const GaugeLorentz &Umu, int mu, int nu)