15 namespace PlaqPlusPlaqPowerGaugeActEnv
48 XMLReader paramtop(xml_in, path);
54 read(paramtop,
"q",
q);
57 QDPIO::cerr <<
"Error reading XML: " << e << std::endl;
67 LatticeComplex cpow(
const LatticeComplex& plq,
int q)
71 QDPIO::cerr << __func__ <<
": something messed up with q= " <<
q << std::endl;
80 LatticeComplex
out = plq;
82 for(
int n = 2;
n <=
q; ++
n)
95 multi2d<LatticeComplex> plaq_site;
107 act_F +=
sum(real(plaq_site[
mu][
nu]));
125 site_act.resize(
Nd,
Nd);
130 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
134 Real third = Real(1) / Real(Nc);
146 site_act[
nu][
mu] = site_act[
mu][
nu];
159 int mu,
int cb)
const
161 QDPIO::cerr << __func__ <<
": staple not possible\n";
173 multi1d<LatticeColorMatrix> deriv_fun;
177 multi1d<LatticeColorMatrix> deriv_two;
200 LatticeColorMatrix tmp_0;
201 LatticeColorMatrix
tmp_1;
202 LatticeColorMatrix
tmp_2;
204 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
211 LatticeColorMatrix
G;
216 if (
mu ==
nu)
continue;
222 LatticeColorMatrix down_staple = adj(
tmp_1)*adj(
u[
mu])*
u[
nu];
235 ds_u[
mu] *= Real(1)/(Real(2*Nc));
253 multi2d<LatticeComplex> plaq_site;
257 LatticeColorMatrix tmp_0;
258 LatticeColorMatrix
tmp_1;
259 LatticeColorMatrix
tmp_2;
261 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
268 LatticeColorMatrix
G;
273 if (
mu ==
nu)
continue;
275 const LatticeComplex& plq = cpow(plaq_site[
mu][
nu],
param.
q-1);
281 LatticeColorMatrix down_staple = adj(
tmp_1)*adj(
u[
mu])*
u[
nu];
283 G -= up_staple * plq;
296 ds_u[
mu] *= Real(
param.
q) * Real(1)/(Real(2*Nc));
Primary include file for CHROMA library code.
Abstract base class for gauge actions.
virtual const GaugeBC< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > & getGaugeBC() const
Return the gauge BC object for this action.
virtual void zero(P &ds_u) const =0
Zero some gauge-like field in place on the masked links.
Support class for fermion actions and linear operators.
Class for counted reference semantics.
void derivPlaqFun(multi1d< LatticeColorMatrix > &ds_u, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void derivPlaqTwo(multi1d< LatticeColorMatrix > &ds_u, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
void staple(LatticeColorMatrix &result, const Handle< GaugeState< P, Q > > &state, int mu, int cb) const
Compute staple.
void siteAction(multi2d< LatticeComplex > &site_act, const Handle< GaugeState< P, Q > > &state) const
Compute the site-level action.
All gauge create-state method.
Gauge create state factory.
Fermion action factories.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
GaugeAction< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createGaugeAct(XMLReader &xml, const std::string &path)
static bool registered
Local registration flag.
const std::string name
Name to be used.
Handle< CreateGaugeState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the CreateGaugeState readers.
bool registerAll()
Register all the factories.
multi1d< LatticeColorMatrix > G
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
static QDP_ColorVector * out
Constructor.
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
FloatingPoint< double > Double
Plaquette plus power of a plaquette (plaquette power) gauge action.
Params()
Base Constructor.