13 using namespace QDP::Hints;
26 create(fs, Mass_, anisoParam);
44 fbc = fs->getFermBC();
48 if (fbc.operator->() == 0)
50 QDPIO::cerr <<
"GrapheneLinOp: error: fbc is null" << std::endl;
55 if (
QDP::Nd != 4 || QDP::Ns != 4)
57 QDPIO::cerr <<
"GrapheneLinOp: requires Nd=4 and Ns=4" << std::endl;
68 if (anisoParam.anisoP)
70 QDPIO::cerr <<
"UnprecGraphene: not fully supporting anisotropy at this moment" << std::endl;
71 QDPIO::cerr <<
"UnprecGraphene: only this one check is stopping it from functioning; otherwise, the code is in place." << std::endl;
76 if (anisoParam.anisoP)
77 ff = anisoParam.nu / anisoParam.xi_0;
81 if (anisoParam.anisoP)
84 for(
int mu=0;
mu <
u.size(); ++
mu)
86 if (
mu != anisoParam.t_dir)
107 void UnprecGrapheneLinOp::gammaMults(multi1d<LatticeFermion>& gams,
108 const LatticeFermion&
psi)
const
110 gams.resize(
Nd); moveToFastMemoryHint(gams);
113 gams[0] = GammaConst<Ns,1>()*
psi;
114 gams[1] = GammaConst<Ns,2>()*
psi;
115 gams[2] = GammaConst<Ns,4>()*
psi;
116 gams[3] = GammaConst<Ns,8>()*
psi;
121 void UnprecGrapheneLinOp::iGamMu(LatticeFermion& iGam,
122 const multi1d<LatticeFermion>& gams,
125 LatticeFermion
tmp2; moveToFastMemoryHint(
tmp2);
157 multi1d<LatticeFermion> gams;
158 LatticeFermion
tmp2; moveToFastMemoryHint(
tmp2);
159 LatticeFermion
tmp3; moveToFastMemoryHint(
tmp3);
160 LatticeFermion iGam; moveToFastMemoryHint(iGam);
164 gammaMults(gams,
psi);
177 iGamMu(iGam, gams,
mu);
195 getFermBC().modifyF(
chi);
213 const LatticeFermion&
chi,
const LatticeFermion&
psi,
221 multi1d<Real> anisoWeights(
Nd);
224 Real ff = where(anisoParam.anisoP, anisoParam.nu / anisoParam.xi_0, Real(1));
226 if (anisoParam.anisoP)
231 if (
mu != anisoParam.t_dir)
232 anisoWeights[
mu] *= ff;
237 multi1d<LatticeFermion> gams;
238 LatticeFermion
tmp2; moveToFastMemoryHint(
tmp2);
239 LatticeFermion iGam; moveToFastMemoryHint(iGam);
241 gammaMults(gams,
psi);
246 iGamMu(iGam, gams,
mu);
277 LatticeColorMatrix temp_mat = traceSpin(outerProduct(
tmp3,
chi));
280 ds_u[
mu] = anisoWeights[
mu] * temp_mat;
283 getFermBC().zero(ds_u);
290 unsigned long UnprecGrapheneLinOp::nFlops()
const
293 unsigned long site_flops = 4*Nc*Ns + 2*(10*Nc*Ns+8*264);
294 return site_flops*Layout::sitesOnNode();
Primary include file for CHROMA library code.
Support class for fermion actions and linear operators.
Class for counted reference semantics.
multi1d< Hadron2PtContraction_t > operator()(const multi1d< LatticeColorMatrix > &u)
static const LatticeInteger & alpha(const int dim)
Asqtad Staggered-Dirac operator.
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
static multi1d< LatticeColorMatrix > u
Parameters for anisotropy.
multi1d< LatticeColorMatrix > deriv(const EvenOddPrecLinearOperator< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &AP, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign)
Apply the operator onto a source std::vector.
Unpreconditioned Graphene fermion linear operator.