CHROMA
lwldslash_3d_sse_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_sse_h__
7 #define __lwldslash_3d_sse_h__
8 
9 #include "qdp_config.h"
10 #if QDP_NS == 4
11 #if QDP_ND == 4
12 #if QDP_NC == 3
13 
15 #include "state.h"
16 #include "sse_dslash_qdp_packer_3d.h"
17 
18 namespace Chroma
19 {
20  //! General Wilson-Dirac dslash
21  /*!
22  * \ingroup linop
23  *
24  * DSLASH
25  *
26  * This routine is specific to Wilson fermions!
27  *
28  * Description:
29  *
30  * This routine applies the operator D' to Psi, putting the result in Chi.
31  *
32  * Nd-1
33  * ---
34  * \
35  * chi(x) := > U (x) (1 - isign gamma ) psi(x+mu)
36  * / mu mu
37  * ---
38  * mu=0
39  *
40  * Nd-1
41  * ---
42  * \ +
43  * + > U (x-mu) (1 + isign gamma ) psi(x-mu)
44  * / mu mu
45  * ---
46  * mu=0
47  *
48  */
49 
50  class SSEWilsonDslash3D : public WilsonDslash3DBase
51  {
52  public:
53  // Typedefs to save typing
54  typedef LatticeFermion T;
55  typedef multi1d<LatticeColorMatrix> P;
56  typedef multi1d<LatticeColorMatrix> Q;
57 
58  //! Empty constructor. Must use create later
59  SSEWilsonDslash3D();
60 
61  //! Full constructor
62  SSEWilsonDslash3D(Handle< FermState<T,P,Q> > state);
63 
64  //! Full constructor with anisotropy
65  SSEWilsonDslash3D(Handle< FermState<T,P,Q> > state,
66  const AnisoParam_t& aniso_);
67 
68  //! Creation routine
69  void create(Handle< FermState<T,P,Q> > state);
70 
71  //! Creation routine with anisotropy
72  void create(Handle< FermState<T,P,Q> > state,
73  const AnisoParam_t& aniso_);
74 
75  //! Full constructor with general coefficients
76  void create(Handle< FermState<T,P,Q> > state,
77  const multi1d<Real>& coeffs_);
78 
79  //! No real need for cleanup here
80  ~SSEWilsonDslash3D();
81 
82  /**
83  * Apply a dslash
84  *
85  * \param chi result (Write)
86  * \param psi source (Read)
87  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
88  * \param cb Checkerboard of OUTPUT std::vector (Read)
89  *
90  * \return The output of applying dslash on psi
91  */
92  void apply(LatticeFermion& chi, const LatticeFermion& psi,
93  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  //! Init internals
103  void init();
104 
105  private:
106  multi1d<Real> coeffs; /*!< Nd array of coefficients of terms in the action */
107  multi1d<SSEDslash3D::PrimitiveSU3Matrix> packed_gauge; // fold in anisotropy
108  Handle< FermBC<T,P,Q> > fbc;
109  };
110 
111 
112 } // End Namespace Chroma
113 
114 
115 #endif
116 #endif
117 #endif
118 
119 #endif
3D Wilson Dslash linear operator
multi1d< LatticeColorMatrix > P
void init(MesonSpecData_t &data, XMLWriter &xml, const std::string &path, const std::string &id_tag, const Params &params)
Do some initialization.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
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.