CHROMA
lwldslash_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Wilson Dslash linear operator over arrays
4  */
5 
6 #ifndef __lwldslash_array_h__
7 #define __lwldslash_array_h__
8 
9 #include "state.h"
11 
12 
13 namespace Chroma
14 {
15  //! General Wilson-Dirac dslash of arrays
16  /*!
17  * \ingroup linop
18  *
19  * DSLASH
20  *
21  * This routine is specific to Wilson fermions!
22  *
23  * Description:
24  *
25  * This routine applies the operator D' to Psi, putting the result in Chi.
26  *
27  * Nd-1
28  * ---
29  * \
30  * chi(x) := > U (x) (1 - isign gamma ) psi(x+mu)
31  * / mu mu
32  * ---
33  * mu=0
34  *
35  * Nd-1
36  * ---
37  * \ +
38  * + > U (x-mu) (1 + isign gamma ) psi(x-mu)
39  * / mu mu
40  * ---
41  * mu=0
42  *
43  */
44 
46  {
47  public:
48  // Typedefs to save typing
49  typedef LatticeFermion T;
50  typedef multi1d<LatticeColorMatrix> P;
51  typedef multi1d<LatticeColorMatrix> Q;
52 
53  //! Empty constructor. Must use create later
55 
56  //! Full constructor
58  int N5_)
59  {create(state,N5_);}
60 
61  //! Full constructor
63  int N5_,
64  const AnisoParam_t& aniso_)
65  {create(state,N5_,aniso_);}
66 
67  //! Creation routine
69  int N5_);
70 
71  //! Creation routine
73  int N5_,
74  const AnisoParam_t& aniso_);
75 
76  //! Creation routine
78  int N5_,
79  const multi1d<Real>& coeffs_);
80 
81  //! Expected length of array index
82  int size() const {return N5;}
83 
84  //! No real need for cleanup here
86 
87  /**
88  * Apply a dslash
89  *
90  * \param chi result (Write)
91  * \param psi source (Read)
92  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
93  * \param cb Checkerboard of OUTPUT std::vector (Read)
94  *
95  * \return The output of applying dslash on psi
96  */
97  void apply (multi1d<LatticeFermion>& chi,
98  const multi1d<LatticeFermion>& psi,
99  enum PlusMinus isign, int cb) const;
100 
101  /**
102  * Apply a dslash
103  *
104  * \param chi result (Write)
105  * \param psi source (Read)
106  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
107  * \param cb Checkerboard of OUTPUT std::vector (Read)
108  *
109  * \return The output of applying dslash on psi
110  */
111  void apply (LatticeFermion& chi,
112  const LatticeFermion& psi,
113  enum PlusMinus isign, int cb) const;
114 
115  //! Return the fermion BC object for this linear operator
116  const FermBC<T,P,Q>& getFermBC() const {return *fbc;}
117 
118  protected:
119  //! Get the anisotropy parameters
120  const multi1d<Real>& getCoeffs() const {return coeffs;}
121 
122  private:
123  int N5;
124  multi1d<Real> coeffs; /*!< Nd array of coefficients of terms in the action */
125  multi1d<LatticeColorMatrix> u; // fold in anisotropy
127  };
128 
129 
130 } // End Namespace Chroma
131 
132 
133 #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 of arrays.
multi1d< LatticeColorMatrix > Q
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
QDPWilsonDslashArray(Handle< FermState< T, P, Q > > state, int N5_, const AnisoParam_t &aniso_)
Full constructor.
QDPWilsonDslashArray()
Empty constructor. Must use create later.
Handle< FermBC< T, P, Q > > fbc
int size() const
Expected length of array index.
multi1d< LatticeColorMatrix > P
multi1d< LatticeColorMatrix > u
QDPWilsonDslashArray(Handle< FermState< T, P, Q > > state, int N5_)
Full constructor.
const multi1d< Real > & getCoeffs() const
Get the anisotropy parameters.
~QDPWilsonDslashArray()
No real need for cleanup here.
General Wilson-Dirac dslash over arrays.
void apply(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, int cb) const
General Wilson-Dirac dslash.
void create(Handle< FermState< T, P, Q > > state, int N5_)
Creation routine.
Wilson Dslash linear operator over arrays.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
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.
Parameters for anisotropy.
Definition: aniso_io.h:24