CHROMA
lwldslash_array_sse_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Wilson Dslash linear operator array
4  */
5 
6 #ifndef __lwldslash_array_sse_w_h__
7 #define __lwldslash_array_sse_w_h__
8 
10 #include "state.h"
11 #include "sse_dslash_qdp_packer.h"
12 
13 using namespace SSEDslash;
14 
15 namespace Chroma
16 {
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 
49  {
50  public:
51  // Typedefs to save typing
52  typedef LatticeFermion T;
53  typedef multi1d<LatticeColorMatrix> P;
54  typedef multi1d<LatticeColorMatrix> Q;
55 
56  //! Empty constructor. Must use create later
58 
59  //! Full constructor
61  int N5_);
62 
63  //! Full constructor
65  int N5_,
66  const AnisoParam_t& aniso_);
67 
68  //! Creation routine
69  void create(Handle< FermState<T,P,Q> > state,
70  int N5_);
71 
72  //! Creation routine
73  void create(Handle< FermState<T,P,Q> > state,
74  int N5_,
75  const AnisoParam_t& aniso_);
76 
77  //! Creation routine
78  void create(Handle< FermState<T,P,Q> > state,
79  int N5_,
80  const multi1d<Real>& coeffs_);
81 
82  //! Expected length of array index
83  int size() const {return N5;}
84 
85  //! No real need for cleanup here
87 
88  /**
89  * Apply a dslash
90  *
91  * \param chi result (Write)
92  * \param psi source (Read)
93  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
94  * \param cb Checkerboard of OUTPUT std::vector (Read)
95  *
96  * \return The output of applying dslash on psi
97  */
98  void apply (multi1d<LatticeFermion>& chi,
99  const multi1d<LatticeFermion>& psi,
100  enum PlusMinus isign, int cb) const;
101 
102  /**
103  * Apply a dslash
104  *
105  * \param chi result (Write)
106  * \param psi source (Read)
107  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
108  * \param cb Checkerboard of OUTPUT std::vector (Read)
109  *
110  * \return The output of applying dslash on psi
111  */
112  void apply (LatticeFermion& chi,
113  const LatticeFermion& psi,
114  enum PlusMinus isign, int cb) const;
115 
116  //! Return the fermion BC object for this linear operator
117  const FermBC<T,P,Q>& getFermBC() const {return *fbc;}
118 
119  protected:
120  //! Init internals
121  void init();
122 
123  //! Get the anisotropy parameters
124  const multi1d<Real>& getCoeffs() const {return coeffs;}
125 
126  private:
127  multi1d<Real> coeffs; /*!< Nd array of coefficients of terms in the action */
128  multi1d<PrimitiveSU3Matrix> packed_gauge;
129  int N5;
131  };
132 
133 
134 } // End Namespace Chroma
135 
136 
137 #endif
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.
multi1d< LatticeColorMatrix > Q
multi1d< PrimitiveSU3Matrix > packed_gauge
Handle< FermBC< T, P, Q > > fbc
int size() const
Expected length of array index.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
multi1d< LatticeColorMatrix > P
const multi1d< Real > & getCoeffs() const
Get the anisotropy parameters.
General Wilson-Dirac dslash over arrays.
Wilson Dslash linear operator over arrays.
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