15 namespace PlaqPlusTwoPlaqGaugeActEnv
48 XMLReader paramtop(xml_in, path);
56 QDPIO::cerr <<
"Error reading XML: " << e << std::endl;
66 multi2d<LatticeReal> plaq_site;
78 act_F +=
sum(plaq_site[
mu][
nu]);
90 act_A +=
sum(plaq_site[
mu][
nu] * plaq_site[
mu][
nu]);
107 site_act.resize(
Nd,
Nd);
112 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
125 site_act[
mu][
nu] *= Real(1) / Real(Nc);
128 site_act[
nu][
mu] = site_act[
mu][
nu];
141 int mu,
int cb)
const
143 QDPIO::cerr << __func__ <<
": staple not possible\n";
155 multi1d<LatticeColorMatrix> deriv_fun;
159 multi1d<LatticeColorMatrix> deriv_two;
182 LatticeColorMatrix tmp_0;
183 LatticeColorMatrix
tmp_1;
184 LatticeColorMatrix
tmp_2;
186 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
193 LatticeColorMatrix
G;
198 if (
mu ==
nu)
continue;
204 LatticeColorMatrix down_staple = adj(
tmp_1)*adj(
u[
mu])*
u[
nu];
217 ds_u[
mu] *= Real(1)/(Real(2*Nc));
235 multi2d<LatticeReal> plaq_site;
239 LatticeColorMatrix tmp_0;
240 LatticeColorMatrix
tmp_1;
241 LatticeColorMatrix
tmp_2;
243 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
250 LatticeColorMatrix
G;
255 if (
mu ==
nu)
continue;
261 LatticeColorMatrix down_staple = adj(
tmp_1)*adj(
u[
mu])*
u[
nu];
263 G += up_staple * plaq_site[
mu][
nu];
275 ds_u[
mu] *= 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 derivPlaqTwo(multi1d< LatticeColorMatrix > &ds_u, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void siteAction(multi2d< LatticeReal > &site_act, const Handle< GaugeState< P, Q > > &state) const
Compute the site-level action.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void derivPlaqFun(multi1d< LatticeColorMatrix > &ds_u, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void staple(LatticeColorMatrix &result, const Handle< GaugeState< P, Q > > &state, int mu, int cb) const
Compute staple.
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
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
FloatingPoint< double > Double
Plaquette plus two-plaquette (plaquette squared) gauge action.
Params()
Base Constructor.