6 using namespace QDP::Hints;
22 EvenOddPrecDWLinOpArray::EvenOddPrecDWLinOpArray(
24 const Real& WilsonMass_,
const Real& m_q_,
int N5_,
29 WilsonMass = WilsonMass_;
34 D.create(fs,
N5,aniso);
36 Real ff = where(aniso.
anisoP, aniso.
nu / aniso.
xi_0, Real(1));
37 InvTwoKappa = 1 +
a5*(1 + (
Nd-1)*ff - WilsonMass);
39 TwoKappa = 1.0 / InvTwoKappa;
42 invDfactor =1.0/(1.0 + m_q/pow(InvTwoKappa,
N5));
60 EvenOddPrecDWLinOpArray::applyDiag(multi1d<LatticeFermion>&
chi,
61 const multi1d<LatticeFermion>&
psi,
81 for(
int s(1);
s<
N5-1;
s++) {
91 chi[
s][rb[
cb]] -= chiralProjectMinus(
psi[
s+1]);
104 chi[0][rb[
cb]] = InvTwoKappa*
psi[0] + m_q*chiralProjectPlus(
psi[N5m1]);
105 chi[0][rb[
cb]]-= chiralProjectMinus(
psi[1]);
120 chi[N5m1][rb[
cb]] = InvTwoKappa*
psi[N5m1]+ m_q*chiralProjectMinus(
psi[0]);
121 chi[N5m1][rb[
cb]] -=chiralProjectPlus(
psi[N5m2]);
135 for(
int s(1);
s<
N5-1;
s++) {
143 chi[
s][rb[
cb]] = InvTwoKappa*
psi[
s] - chiralProjectPlus(
psi[
s+1]);
146 chi[
s][rb[
cb]] -= chiralProjectMinus(
psi[
s-1]);
158 chi[0][rb[
cb]] = InvTwoKappa*
psi[0] + m_q*chiralProjectMinus(
psi[N5m1]);
161 chi[0][rb[
cb]] -= chiralProjectPlus(
psi[1]);
173 chi[N5m1][rb[
cb]] = InvTwoKappa*
psi[N5m1]+ m_q * chiralProjectPlus(
psi[0]);
174 chi[N5m1][rb[
cb]] -= chiralProjectMinus(
psi[N5m2]);
196 EvenOddPrecDWLinOpArray::applyDiagInv(multi1d<LatticeFermion>&
chi,
197 const multi1d<LatticeFermion>&
psi,
210 Real fact = m_q*TwoKappa*TwoKappa*invDfactor;
211 Real invDTwoKappa = invDfactor*TwoKappa;
221 chi[
N5-1][rb[
cb]] = invDTwoKappa*
psi[
N5-1]-fact*chiralProjectMinus(
psi[0]);
223 for(
int s = 1;
s <
N5-1;
s++) {
225 chi[
s][rb[
cb]] = TwoKappa *
psi[
s] + TwoKappa*chiralProjectPlus(
chi[
s-1]);
231 chi[
N5-1][rb[
cb]] -= fact*chiralProjectMinus(
psi[
s]);
237 chi[
N5-1][rb[
cb]] += invDTwoKappa*chiralProjectPlus(
chi[
N5-2]);
241 for(
int s =
N5-2;
s >= 0;
s--) {
244 chi[
s][rb[
cb]] += TwoKappa*chiralProjectMinus(
chi[
s+1]);
249 for(
int s = 0;
s <
N5-1;
s++){
251 chi[
s][rb[
cb]] -= fact*chiralProjectPlus(
chi[
N5-1]) ;
260 Real fact = m_q*TwoKappa*TwoKappa*invDfactor;
261 Real invDTwoKappa = invDfactor*TwoKappa;
265 chi[
N5-1][rb[
cb]] = invDTwoKappa*
psi[
N5-1]-fact*chiralProjectPlus(
psi[0]);
267 for(
int s = 1;
s <
N5-1;
s++) {
269 chi[
s][rb[
cb]] = TwoKappa *
psi[
s] + TwoKappa*chiralProjectMinus(
chi[
s-1]);
271 chi[
N5-1][rb[
cb]] -= fact*chiralProjectPlus(
psi[
s]);
275 chi[
N5-1][rb[
cb]] += invDTwoKappa*chiralProjectMinus(
chi[
N5-2]);
280 for(
int s =
N5-2;
s >=0;
s--) {
282 chi[
s][rb[
cb]] += TwoKappa*chiralProjectPlus(
chi[
s+1]);;
288 for(
int s = 0;
s <
N5-1 ;
s++){
289 chi[
s][rb[
cb]] -= fact*chiralProjectMinus(
chi[
N5-1]);
310 EvenOddPrecDWLinOpArray::applyOffDiag(multi1d<LatticeFermion>&
chi,
311 const multi1d<LatticeFermion>&
psi,
320 for(
int s(0);
s<
N5;
s++)
324 for(
int s(0);
s<
N5;
s++)
335 EvenOddPrecDWLinOpArray::Dminus(LatticeFermion&
chi,
336 const LatticeFermion&
psi,
340 QDPIO::cerr <<
"Dminus not implemented" << std::endl;
346 EvenOddPrecDWLinOpArray::applyDerivOffDiag(multi1d<LatticeColorMatrix>& ds_u,
347 const multi1d<LatticeFermion>&
chi,
348 const multi1d<LatticeFermion>&
psi,
355 ds_u[
mu] *= Real(-0.5);
Support class for fermion actions and linear operators.
Class for counted reference semantics.
4D Even Odd preconditioned domain-wall fermion linear operator
Asqtad Staggered-Dirac operator.
Parameters for anisotropy.