CHROMA
lwldslash_base_3d_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief 3D Wilson Dslash linear operator
4  */
5 
6 #ifndef __lwldslash_3d_base_h__
7 #define __lwldslash_3d_base_h__
8 
9 #include "qdp_config.h"
10 
11 #if QDP_NS == 4
12 #if QDP_NC == 3
13 #if QDP_ND == 4
14 
15 #include "linearop.h"
16 #include "io/aniso_io.h"
17 
18 
19 namespace Chroma
20 {
21  //! General Wilson-Dirac dslash
22  /*!
23  * \ingroup linop
24  *
25  * DSLASH
26  *
27  * This routine is specific to Wilson fermions!
28  *
29  * Description:
30  *
31  * This routine applies the operator D' to Psi, putting the result in Chi.
32  *
33  * Nd-1
34  * ---
35  * \
36  * chi(x) := > U (x) (1 - isign gamma ) psi(x+mu)
37  * / mu mu
38  * ---
39  * mu=0
40  *
41  * Nd-1
42  * ---
43  * \ +
44  * + > U (x-mu) (1 + isign gamma ) psi(x-mu)
45  * / mu mu
46  * ---
47  * mu=0
48  *
49  */
50 
51  class WilsonDslash3DBase : public DslashLinearOperator<LatticeFermion,
52  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
53  {
54  public:
55  // Typedefs to save typing
56  typedef LatticeFermion T;
57  typedef multi1d<LatticeColorMatrix> P;
58  typedef multi1d<LatticeColorMatrix> Q;
59 
60  //! No real need for cleanup here
61  virtual ~WilsonDslash3DBase() {}
62 
63  //! Subset is all here
64  const Subset& subset() const {return all;}
65 
66  //! Take deriv of D
67  /*!
68  * \param chi left std::vector (Read)
69  * \param psi right std::vector (Read)
70  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
71  *
72  * \return Computes \f$\chi^\dag * \dot(D} * \psi\f$
73  */
74  virtual void deriv(P& ds_u,
75  const T& chi, const T& psi,
76  enum PlusMinus isign) const;
77 
78 
79  //! Take deriv of D
80  /*!
81  * \param chi left std::vector on cb (Read)
82  * \param psi right std::vector on 1-cb (Read)
83  * \param isign D'^dag or D' ( MINUS | PLUS ) resp. (Read)
84  * \param cb 3D Checkerboard of chi std::vector (Read)
85  *
86  * \return Computes \f$\chi^\dag * \dot(D} * \psi\f$
87  */
88  virtual void deriv(P& ds_u,
89  const T& chi, const T& psi,
90  enum PlusMinus isign, int cb) const;
91 
92  //! Return flops performed by the operator()
93  unsigned long nFlops() const;
94 
95  protected:
96  //! Get the anisotropy parameters
97  virtual const multi1d<Real>& getCoeffs() const = 0;
98  };
99 
100 
101 } // End Namespace Chroma
102 
103 #endif
104 #endif
105 #endif
106 
107 #endif
Anisotropy parameters.
Linear Operators.
multi1d< LatticeColorMatrix > P
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
LatticeFermion T
Definition: t_clover.cc:11
multi1d< LatticeColorMatrix > P
Definition: t_clover.cc:13
multi1d< LatticeColorMatrix > deriv(const EvenOddPrecLinearOperator< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &AP, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign)
Apply the operator onto a source std::vector.