6 #ifndef __lwldslash_qdpopt_h__
7 #define __lwldslash_qdpopt_h__
46 template<
typename T,
typename P,
typename Q>
63 const multi1d<Real>& coeffs_);
74 const multi1d<Real>& coeffs_);
110 class HalfFermionType<LatticeFermionF> {
112 typedef LatticeHalfFermionF Type_t;
116 class HalfFermionType<LatticeFermionD> {
118 typedef LatticeHalfFermionD Type_t;
151 template<
typename T,
typename P,
typename Q>
155 template<
typename T,
typename P,
typename Q>
162 template<
typename T,
typename P,
typename Q>
166 create(
state, aniso_);
170 template<
typename T,
typename P,
typename Q>
172 const multi1d<Real>& coeffs_)
174 create(
state, coeffs_);
178 template<
typename T,
typename P,
typename Q>
181 multi1d<Real> cf(
Nd);
187 template<
typename T,
typename P,
typename Q>
199 template<
typename T,
typename P,
typename Q>
201 const multi1d<Real>& coeffs_)
209 fbc =
state->getFermBC();
212 if (fbc.operator->() == 0)
214 QDPIO::cerr <<
"QDPWilsonDslashOpt: error: fbc is null" << std::endl;
220 for(
int mu=0;
mu <
u.size(); ++
mu) {
224 for(
int mu=0;
mu <
u.size(); ++
mu)
242 template<
typename T,
typename P,
typename Q>
269 int otherCB = (
cb == 0 ? 1 : 0);
280 tmp[rb[otherCB]] = spinProjectDir0Minus(
psi);
282 chi[rb[
cb]] = spinReconstructDir0Minus(
u[0]*
tmp2);
285 tmp[rb[otherCB]] = spinProjectDir1Minus(
psi);
287 chi[rb[
cb]] += spinReconstructDir1Minus(
u[1]*
tmp2);
289 tmp[rb[otherCB]] = spinProjectDir2Minus(
psi);
291 chi[rb[
cb]] += spinReconstructDir2Minus(
u[2]*
tmp2);
293 tmp[rb[otherCB]] = spinProjectDir3Minus(
psi);
295 chi[rb[
cb]] += spinReconstructDir3Minus(
u[3]*
tmp2);
298 tmp[rb[otherCB]] = adj(
u[0])*spinProjectDir0Plus(
psi);
300 chi[rb[
cb]] += spinReconstructDir0Plus(
tmp2);
302 tmp[rb[otherCB]] = adj(
u[1])*spinProjectDir1Plus(
psi);
304 chi[rb[
cb]] += spinReconstructDir1Plus(
tmp2);
306 tmp[rb[otherCB]] = adj(
u[2])*spinProjectDir2Plus(
psi);
308 chi[rb[
cb]] += spinReconstructDir2Plus(
tmp2);
310 tmp[rb[otherCB]] = adj(
u[3])*spinProjectDir3Plus(
psi);
312 chi[rb[
cb]] += spinReconstructDir3Plus(
tmp2);
325 tmp[rb[otherCB]] = spinProjectDir0Plus(
psi);
327 chi[rb[
cb]] = spinReconstructDir0Plus(
u[0]*
tmp2);
329 tmp[rb[otherCB]] = spinProjectDir1Plus(
psi);
331 chi[rb[
cb]] += spinReconstructDir1Plus(
u[1]*
tmp2);
333 tmp[rb[otherCB]] = spinProjectDir2Plus(
psi);
335 chi[rb[
cb]] += spinReconstructDir2Plus(
u[2]*
tmp2);
337 tmp[rb[otherCB]] = spinProjectDir3Plus(
psi);
339 chi[rb[
cb]] += spinReconstructDir3Plus(
u[3]*
tmp2);
342 tmp[rb[otherCB]] = adj(
u[0])*spinProjectDir0Minus(
psi);
344 chi[rb[
cb]] += spinReconstructDir0Minus(
tmp2);
346 tmp[rb[otherCB]] = adj(
u[1])*spinProjectDir1Minus(
psi);
348 chi[rb[
cb]] += spinReconstructDir1Minus(
tmp2);
350 tmp[rb[otherCB]] = adj(
u[2])*spinProjectDir2Minus(
psi);
352 chi[rb[
cb]] += spinReconstructDir2Minus(
tmp2);
354 tmp[rb[otherCB]] = adj(
u[3])*spinProjectDir3Minus(
psi);
356 chi[rb[
cb]] += spinReconstructDir3Minus(
tmp2);
363 getFermBC().modifyF(
chi, QDP::rb[
cb]);
365 QDPIO::cerr<<
"lwldshash_qdpopt_w: not implemented for NC!=3\n";
373 multi1d<LatticeColorMatrix>,
377 multi1d<LatticeColorMatrixF>,
381 multi1d<LatticeColorMatrixD>,
Base class for all fermion action boundary conditions.
Support class for fermion actions and linear operators.
Class for counted reference semantics.
General Wilson-Dirac dslash.
Handle< FermBC< T, P, Q > > fbc
const multi1d< Real > & getCoeffs() const
Get the anisotropy parameters.
~QDPWilsonDslashOptT()
No real need for cleanup here.
void create(Handle< FermState< T, P, Q > > state)
Creation routine.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
General Wilson-Dirac dslash.
void apply(T &chi, const T &psi, enum PlusMinus isign, int cb) const
General Wilson-Dirac dslash.
QDPWilsonDslashOptT()
Empty constructor. Must use create later.
Wilson Dslash linear operator.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
QDPWilsonDslashOptT< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > QDPWilsonDslashOpt
LinOpSysSolverMGProtoClover::Q Q
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
QDPWilsonDslashOptT< LatticeFermionF, multi1d< LatticeColorMatrixF >, multi1d< LatticeColorMatrixF > > QDPWilsonDslashOptF
QDPWilsonDslashOptT< LatticeFermionD, multi1d< LatticeColorMatrixD >, multi1d< LatticeColorMatrixD > > QDPWilsonDslashOptD
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
multi1d< Real > makeFermCoeffs(const AnisoParam_t &aniso)
Make fermion coefficients.
Support class for fermion actions and linear operators.
Parameters for anisotropy.