15 namespace RectGaugeActEnv
51 XMLReader paramtop(xml_in, path);
56 if( paramtop.count(
"AnisoParam") != 0 ) {
89 if( paramtop.count(
"no_temporal_2link") == 0 ) {
100 QDPIO::cerr <<
"Error reading XML: " << e << std::endl;
123 int mu,
int cb)
const
126 QDPIO::cerr <<
"RectGaugeAct::staple() - not converted from szin" << std::endl;
134 multi1d<LatticeColorMatrix>& ds_u,
135 const multi1d<LatticeColorMatrix>&
u)
const
148 LatticeColorMatrix upper_l =
u[
nu]*shift(from_left_2link,
FORWARD,
nu);
164 LatticeColorMatrix
tmp = shift( adj(upper_l)*from_left_2link,
BACKWARD,
mu);
197 ds_u[
nu] += adj(upper_l)*adj(from_left_2link);
207 LatticeColorMatrix up_staple = upper_l*adj(
u[
nu]);
215 tmp = adj(
tmp2)*adj(from_left_2link);
217 LatticeColorMatrix down_staple =
tmp*
u[
nu];
247 ds_u[
mu] +=
tmp*up_staple;
258 ds_u[
mu] *= c_munu/Real(-2*Nc);
259 ds_u[
nu] *= c_munu/Real(-2*Nc);
274 QDP::StopWatch swatch;
281 multi1d<LatticeColorMatrix> ds_tmp(
Nd);
283 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
291 if (
mu ==
nu)
continue;
307 ds_tmp[
mu] += ds_u[
mu];
308 ds_tmp[
nu] += ds_u[
nu];
327 multi1d<LatticeColorMatrix> ds_tmp(
Nd);
336 ds_u[
mu] += ds_tmp[
mu];
352 multi1d<LatticeColorMatrix> ds_tmp(
Nd);
354 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
368 if ( (
mu !=
nu ) && (
mu != t_dir) && (
nu != t_dir) ) {
372 ds_tmp[
mu] += ds_u[
mu];
373 ds_tmp[
nu] += ds_u[
nu];
398 QDP::StopWatch swatch;
406 multi1d<LatticeColorMatrix> ds_tmp(
Nd);
408 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
420 ds_tmp[
mu] += ds_u[
mu];
421 ds_tmp[
nu] += ds_u[
nu];
433 ds_tmp[
mu] += ds_u[
mu];
434 ds_tmp[
nu] += ds_u[
nu];
466 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
467 LatticeReal lgimp =
zero;
472 if(
mu ==
nu)
continue;
520 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
521 LatticeReal lgimp =
zero;
528 if( (
mu !=
nu) && (
mu != t_dir) && (
nu != t_dir) ) {
547 const multi1d<LatticeColorMatrix>&
u =
state->getLinks();
548 LatticeReal lgimp =
zero;
582 const multi1d<LatticeColorMatrix>&
u)
const
586 LatticeColorMatrix tmp1;
587 LatticeColorMatrix
tmp2;
588 LatticeColorMatrix lr_corner;
589 LatticeColorMatrix lower_l;
590 LatticeColorMatrix upper_l;
591 LatticeColorMatrix rectangle_2munu;
592 LatticeColorMatrix rectangle_mu2nu;
622 upper_l = tmp1*adj(
u[
nu]);
627 rectangle_2munu = lower_l*upper_l;
630 lgimp +=
c * real(trace(rectangle_2munu));
640 const Real& coeff_s_) : cgs(cgs_)
657 const Real& coeff_s_,
658 const Real& coeff_t1_,
659 const Real& coeff_t2_,
660 const bool no_temporal_2link_,
Primary include file for CHROMA library code.
Create a gauge connection state.
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 derivSpatial(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
compute spatial dS/dU given a time direction
RectGaugeAct()
Partial construcor.
Double temporalS(const Handle< GaugeState< P, Q > > &state) const
Compute the temporal part of the action given a time direction.
void deriv_part(int mu, int nu, Real c_munu, multi1d< LatticeColorMatrix > &ds_u, const multi1d< LatticeColorMatrix > &u) const
RectGaugeActParams params
void derivTemporal(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
compute spatial dS/dU given a time direction
Double spatialS(const Handle< GaugeState< P, Q > > &state) const
Compute the spatial part of the action given a time direction.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
void S_part(int mu, int nu, Real c, LatticeReal &lgimp, const multi1d< LatticeColorMatrix > &u) const
void staple(LatticeColorMatrix &result, const Handle< GaugeState< P, Q > > &state, int mu, int cb) const
Compute staple.
All gauge create-state method.
Fermion action factories.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
Handle< CreateGaugeState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the CreateGaugeState readers.
GaugeAction< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createGaugeAct(XMLReader &xml, const std::string &path)
Callback.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
FloatingPoint< double > Double
Parameters for anisotropy.