CHROMA
lwldslash_w_sse.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Wilson Dslash linear operator
4  */
5 
6 #ifndef __lwldslash_sse_h__
7 #define __lwldslash_sse_h__
8 
10 #include "io/aniso_io.h"
11 #include "state.h"
12 #include "sse_dslash_qdp_packer.h"
13 
14 using namespace SSEDslash;
15 
16 namespace Chroma
17 {
18  //! General Wilson-Dirac dslash
19  /*!
20  * \ingroup linop
21  *
22  * DSLASH
23  *
24  * This routine is specific to Wilson fermions!
25  *
26  * Description:
27  *
28  * This routine applies the operator D' to Psi, putting the result in Chi.
29  *
30  * Nd-1
31  * ---
32  * \
33  * chi(x) := > U (x) (1 - isign gamma ) psi(x+mu)
34  * / mu mu
35  * ---
36  * mu=0
37  *
38  * Nd-1
39  * ---
40  * \ +
41  * + > U (x-mu) (1 + isign gamma ) psi(x-mu)
42  * / mu mu
43  * ---
44  * mu=0
45  *
46  */
47 
48  class SSEWilsonDslash : public WilsonDslashBase<LatticeFermion,
49  multi1d<LatticeColorMatrix>,
50  multi1d<LatticeColorMatrix> >
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
60 
61  //! Full constructor
63 
64  //! Full constructor with anisotropy
66  const AnisoParam_t& aniso_);
67 
68  //! Full constructor with general coefficients
70  const multi1d<Real>& coeffs_);
71 
72  //! Creation routine
73  void create(Handle< FermState<T,P,Q> > state);
74 
75  //! Creation routine with anisotropy
76  void create(Handle< FermState<T,P,Q> > state,
77  const AnisoParam_t& aniso_);
78 
79  //! Full constructor with general coefficients
80  void create(Handle< FermState<T,P,Q> > state,
81  const multi1d<Real>& coeffs_);
82 
83  //! No real need for cleanup here
84  ~SSEWilsonDslash();
85 
86  /**
87  * Apply a dslash
88  *
89  * \param chi result (Write)
90  * \param psi source (Read)
91  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
92  * \param cb Checkerboard of OUTPUT std::vector (Read)
93  *
94  * \return The output of applying dslash on psi
95  */
96  void apply(LatticeFermion& chi, const LatticeFermion& psi,
97  enum PlusMinus isign, int cb) const;
98 
99  //! Return the fermion BC object for this linear operator
100  const FermBC<T,P,Q>& getFermBC() const {return *fbc;}
101 
102  protected:
103  //! Get the anisotropy parameters
104  const multi1d<Real>& getCoeffs() const {return coeffs;}
105 
106  //! Init internals
107  void init();
108 
109  private:
110  multi1d<Real> coeffs; /*!< Nd array of coefficients of terms in the action */
111  multi1d<PrimitiveSU3Matrix> packed_gauge; // fold in anisotropy
113  };
114 
115 
116 } // End Namespace Chroma
117 
118 
119 #endif
Anisotropy parameters.
Base class for all fermion action boundary conditions.
Definition: fermbc.h:20
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
General Wilson-Dirac dslash.
Handle< FermBC< T, P, Q > > fbc
multi1d< LatticeColorMatrix > Q
const multi1d< Real > & getCoeffs() const
Get the anisotropy parameters.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
multi1d< PrimitiveSU3Matrix > packed_gauge
multi1d< LatticeColorMatrix > P
General Wilson-Dirac dslash.
Wilson Dslash linear operator.
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
int cb
Definition: invbicg.cc:120
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
chi
Definition: pade_trln_w.cc:24
psi
Definition: pade_trln_w.cc:191
Support class for fermion actions and linear operators.
Parameters for anisotropy.
Definition: aniso_io.h:24