CHROMA
lwldslash_3d_qdp_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Wilson Dslash linear operator
4  */
5 
6 #ifndef __lwldslash_3d_qdp_h__
7 #define __lwldslash_3d_qdp_h__
8 
9 #include "state.h"
10 #include "io/aniso_io.h"
12 
13 #if QDP_NS == 4
14 #if QDP_NC == 3
15 #if QDP_ND == 4
16 
17 
18 
19 namespace Chroma
20 {
21  //! General Wilson-Dirac dslash
22  /*!
23  * \ingroup linop
24  *
25  * SPATIAL DSLASH
26  *
27  * This routine is specific to Wilson fermions!
28  *
29  * Description:
30  *
31  * This routine applies the operator D' to Psi, putting the result in Chi.
32  *
33  * 2
34  * ---
35  * \
36  * chi(x) := > U (x) (1 - isign gamma ) psi(x+mu)
37  * / mu mu
38  * ---
39  * mu=0
40  *
41  * 2
42  * ---
43  * \ +
44  * + > U (x-mu) (1 + isign gamma ) psi(x-mu)
45  * / mu mu
46  * ---
47  * mu=0
48  *
49  */
50 
51  class QDPWilsonDslash3D : public WilsonDslash3DBase
52  {
53  public:
54  // Typedefs to save typing
55  typedef LatticeFermion T;
56  typedef multi1d<LatticeColorMatrix> P;
57  typedef multi1d<LatticeColorMatrix> Q;
58 
59  //! Empty constructor. Must use create later
60  QDPWilsonDslash3D();
61 
62  //! Full constructor
63  QDPWilsonDslash3D(Handle< FermState<T,P,Q> > state);
64 
65  //! Full constructor with anisotropy
66  QDPWilsonDslash3D(Handle< FermState<T,P,Q> > state,
67  const AnisoParam_t& aniso_);
68 
69  //! Creation routine
70  void create(Handle< FermState<T,P,Q> > state);
71 
72  //! Creation routine with anisotropy
73  void create(Handle< FermState<T,P,Q> > state,
74  const AnisoParam_t& aniso_);
75 
76  //! Full constructor with general coefficients
77  void create(Handle< FermState<T,P,Q> > state,
78  const multi1d<Real>& coeffs_);
79 
80  //! No real need for cleanup here
81  ~QDPWilsonDslash3D() {}
82 
83  /**
84  * Apply a dslash
85  *
86  * \param chi result (Write)
87  * \param psi source (Read)
88  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
89  * \param cb Checkerboard of OUTPUT std::vector (Read)
90  *
91  * \return The output of applying dslash on psi
92  */
93  void apply (LatticeFermion& chi, const LatticeFermion& psi, enum PlusMinus isign, int cb) const;
94 
95  //! Return the fermion BC object for this linear operator
96  const FermBC<T,P,Q>& getFermBC() const {return *fbc;}
97 
98  protected:
99  //! Get the anisotropy parameters
100  const multi1d<Real>& getCoeffs() const {return coeffs;}
101 
102  private:
103  multi1d<Real> coeffs; /*!< Nd array of coefficients of terms in the action */
104  Handle< FermBC<T,P,Q> > fbc;
105  multi1d<LatticeColorMatrix> u;
106  };
107 
108 
109 } // End Namespace Chroma
110 
111 #endif
112 #endif
113 #endif
114 
115 #endif
Anisotropy parameters.
3D Wilson Dslash linear operator
multi1d< LatticeColorMatrix > P
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::Q Q
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
int cb
Definition: invbicg.cc:120
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
Support class for fermion actions and linear operators.