9 using namespace QDP::Hints;
14 EvenOddPrecHtContFrac5DLinOpArray::EvenOddPrecHtContFrac5DLinOpArray(
17 const Real& _OverMass,
19 const Real& _scale_fac,
20 const multi1d<Real>& _alpha,
21 const multi1d<Real>& _beta,
24 const bool _isLastZeroP ) :
25 m_q(_m_q),
OverMass(_OverMass),
N5(_N5), scale_fac(_scale_fac),
26 alpha(_alpha),
beta(_beta), isLastZeroP(_isLastZeroP), b5(b5_), c5(c5_)
33 Real
mass = ( Real(1) +
m_q ) / (Real(1) -
m_q);
49 for(
int i=0;
i <
N5;
i++) {
61 QDPIO::cerr <<
"Something is wrong. At the end of this loop"
62 <<
" Hsign should be -ve" << std::endl;
66 for(
int i=0;
i <
N5-1;
i++) {
75 for(
int i=0;
i <
N5-1;
i++) {
92 invd[0] = Real(1)/
d[0];
93 for(
int i=1;
i <
N5;
i++) {
106 for(
int i=0;
i <
N5-1;
i++) {
136 const multi1d<LatticeFermion>&
psi,
162 chi[0][rb[
cb]] =
a[0]*(GammaConst<Ns,Ns*Ns-1>()*
psi[0]);
170 for(
int i=1;
i <
N5;
i++) {
207 multi1d<LatticeFermion>&
chi,
208 const multi1d<LatticeFermion>&
psi,
216 multi1d<LatticeFermion>
y(
N5);
217 moveToFastMemoryHint(
y);
222 const int G5 = Ns*Ns-1;
230 for(
int i = 1;
i <
N5;
i++) {
231 y[
i][rb[
cb]] =
psi[
i] -
u[
i-1]*(GammaConst<Ns,Ns*Ns-1>()*
y[
i-1]);
232 y[
i-1][rb[
cb]] =
invd[
i-1]*(GammaConst<Ns,Ns*Ns-1>()*
y[
i-1]);
241 for(
int i =
N5-2;
i >= 0;
i--) {
262 multi1d<LatticeFermion>&
chi,
263 const multi1d<LatticeFermion>&
psi,
271 Real
mass = ( Real(1) +
m_q ) / (Real(1) -
m_q);
305 multi1d<LatticeFermion> tmp5(
N5);
306 moveToFastMemoryHint(tmp5);
307 Real coeff_1, coeff_2, coeff_3;
308 int otherCB = (
cb + 1)%2;
319 tmp[rb[otherCB]] = Gamma(
G5)*
psi[0];
323 tmp5[0][rb[otherCB]] = coeff_1*
tmp + coeff_2*
psi[1];
329 tmp5[0][rb[otherCB]] = coeff_2*
psi[1] + coeff_1*(GammaConst<Ns,Ns*Ns-1>()*
psi[0]);
332 for(
int i=1;
i <
N5-1;
i++) {
345 tmp5[
i][rb[otherCB]] = coeff_1*
psi[
i-1] + coeff_3*(GammaConst<Ns,Ns*Ns-1>()*
psi[
i]);
347 tmp5[
i][rb[otherCB]] += coeff_2*
psi[
i+1];
362 tmp5[
N5-1][rb[otherCB]] = coeff_1 *
psi[
N5-2] + coeff_2*(GammaConst<Ns,Ns*Ns-1>()*
psi[
N5-1]);
381 multi1d<LatticeFermion> D_psi(
N5); moveToFastMemoryHint(D_psi);
382 Real ftmp_mhalf = Real(-0.5);
386 for(
int i=0;
i <
N5;
i++) {
390 D_psi[
i][rb[
cb]] *= ftmp_mhalf;
398 chi[0][rb[
cb]] = ftmp*D_psi[1] +
beta_tilde[0]*(GammaConst<Ns,Ns*Ns-1>()*D_psi[0]);
400 for(
int i=1;
i <
N5-1;
i++) {
418 chi[
N5-1][rb[
cb]] =
ftmp2*D_psi[
N5-2] + ftmp*(GammaConst<Ns,Ns*Ns-1>()*D_psi[
N5-1]);
424 LatticeFermion
tmp; moveToFastMemoryHint(
tmp);
435 QDPIO::cerr <<
"Should never reach here. Isign is only 2 valued" << std::endl;
452 const multi1d<LatticeFermion>&
chi,
453 const multi1d<LatticeFermion>&
psi,
463 multi1d<LatticeColorMatrix> ds_tmp(
Nd);
465 LatticeFermion
tmp; moveToFastMemoryHint(
tmp);
473 for(
int i=0;
i <
N5;
i++)
485 tmp[rb[
cb]] *= coeff;
495 for(
int i=0;
i <
N5;
i++)
507 tmp[rb[1-
cb]] *= coeff;
520 QDPIO::cerr <<
"NOt yet implemented " << std::endl;
Primary include file for CHROMA library code.
multi1d< Real > beta_tilde
void applyDerivOffDiag(multi1d< LatticeColorMatrix > &ds_u, const multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, int cb) const
Apply the even-odd (odd-even) coupling piece of the NEF operator.
const multi1d< Real > beta
void applyOffDiag(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, const int cb) const
Apply the off diagonal block.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
multi1d< Real > alpha_tilde
const multi1d< Real > alpha
Support class for fermion actions and linear operators.
Class for counted reference semantics.
virtual void deriv(multi1d< LatticeColorMatrix > &ds_u, const multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
Take deriv of D.
Include possibly optimized Wilson dslash.
Unpreconditioned extended-Overlap (5D) (Naryanan&Neuberger) linear operator.
void apply(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, int cb) const
General Wilson-Dirac dslash.
void create(Handle< FermState< T, P, Q > > state, int N5_)
Creation routine.
void applyDiagInv(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, const int cb) const
Apply the inverse even-even (odd-odd) coupling piece of the domain-wall fermion operator.
void applyDiag(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, const int cb) const
Apply the even-even (odd-odd) coupling piece of the domain-wall fermion operator.
static const LatticeInteger & beta(const int dim)
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)
multi1d< LatticeFermion > chi(Ncb)