CHROMA
lwldslash_array_pab_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_pab_h__
7 #define __lwldslash_array_pab_h__
8 
10 #include <wfm.h>
11 
12 namespace Chroma
13 {
14 
15  typedef PColorMatrix < RComplex <REAL>, Nc > PrimitiveSU3Matrix;
16 
17  //! General Wilson-Dirac dslash of arrays
18  /*!
19  * \ingroup linop
20  *
21  * DSLASH
22  *
23  * This routine is specific to Wilson fermions!
24  *
25  * Description:
26  *
27  * This routine applies the operator D' to Psi, putting the result in Chi.
28  *
29  * Nd-1
30  * ---
31  * \
32  * chi(x) := > U (x) (1 - isign gamma ) psi(x+mu)
33  * / mu mu
34  * ---
35  * mu=0
36  *
37  * Nd-1
38  * ---
39  * \ +
40  * + > U (x-mu) (1 + isign gamma ) psi(x-mu)
41  * / mu mu
42  * ---
43  * mu=0
44  *
45  */
46 
48  {
49  public:
50  //! Empty constructor. Must use create later
52 
53  //! Full constructor
55  int N5_);
56 
57  //! Full constructor
59  int N5_,
60  const AnisoParam_t& aniso_);
61 
62  //! Creation routine
64  int N5_);
65 
66  //! Creation routine
68  int N5_,
69  const AnisoParam_t& aniso_);
70 
71  //! Creation routine
73  int N5_,
74  const multi1d<Real>& coeffs_);
75 
76  //! Expected length of array index
77  int size() const {return N5;}
78 
79  //! Destroy / deal with refcounting
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 (multi1d<LatticeFermion>& chi,
93  const multi1d<LatticeFermion>& psi,
94  enum PlusMinus isign, int cb) const;
95 
96  /**
97  * Apply a dslash
98  *
99  * \param chi result (Write)
100  * \param psi source (Read)
101  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
102  * \param cb Checkerboard of OUTPUT std::vector (Read)
103  *
104  * \return The output of applying dslash on psi
105  */
106  void apply (LatticeFermion& chi,
107  const LatticeFermion& psi,
108  enum PlusMinus isign, int cb) const;
109 
110  //! Return the fermion BC object for this linear operator
111  const FermBC<T,P,Q>& getFermBC() const {return *fbc;}
112 
113  protected:
114  //! Get the anisotropy parameters
115  const multi1d<Real>& getCoeffs() const {return coeffs;}
116 
117  private:
118  multi1d<Real> coeffs; /*!< Nd array of coefficients of terms in the action */
120  WilsonArg wil;
121  unsigned long wil_cbsize;
122  int N5;
124  };
125 
126 
127 } // End Namespace Chroma
128 
129 
130 #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.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
int size() const
Expected length of array index.
~PABWilsonDslashArray()
Destroy / deal with refcounting.
void create(Handle< FermState< T, P, Q > > state, int N5_)
Creation routine.
const multi1d< Real > & getCoeffs() const
Get the anisotropy parameters.
Handle< FermBC< T, P, Q > > fbc
PABWilsonDslashArray()
Empty constructor. Must use create later.
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.
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
PColorMatrix< RComplex< REAL >, Nc > PrimitiveSU3Matrix
int cb
Definition: invbicg.cc:120
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
Parameters for anisotropy.
Definition: aniso_io.h:24