CHROMA
asqtad_linop_s.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //! Asqtad Staggered-Dirac operator
3 /*!
4  * \ingroup linop
5  *
6  * This routine is specific to Staggered fermions!
7  */
8 
9 #ifndef __asqtad_linop_s_h__
10 #define __asqtad_linop_s_h__
11 
12 #include "eo_linop.h"
14 
15 
16 namespace Chroma
17 {
18  class AsqtadLinOp : public EvenOddLinearOperator< LatticeStaggeredFermion,
19  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
20  {
21  public:
22  // Typedefs to save typing
23  typedef LatticeStaggeredFermion T;
24  typedef multi1d<LatticeColorMatrix> P;
25  typedef multi1d<LatticeColorMatrix> Q;
26 
27  //! Partial constructor - Must use create later
29 
30  //! Full constructor
31  AsqtadLinOp(Handle<AsqtadConnectStateBase> state_, const Real& Mass_)
32  {
33  create(state_, Mass_);
34  }
35 
36  //! Creation routine
37  void create(Handle<AsqtadConnectStateBase> state_, const Real& Mass_)
38  {
39  //u_fat = u_fat_;
40  // u_triple = u_triple_;
41  Mass = Mass_;
42  D.create(state_);
43  };
44 
45  //! Destructor is automatic
47 
48  //! Return the fermion BC object for this linear operator
49  //! Return the fermion BC object for this linear operator
50  const FermBC<T,P,Q>& getFermBC() const {return D.getFermBC();}
51 
52  //! Apply the the even-even block onto a source std::vector
53  inline void evenEvenLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi,
54  enum PlusMinus isign) const
55  {
56  chi[ rb[0] ] = 2*Mass*psi;
57  }
58 
59  //! Apply the the even-odd block onto a source std::vector
60  void evenOddLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi,
61  enum PlusMinus isign) const;
62 
63  //! Apply the the odd-even block onto a source std::vector
64  void oddEvenLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi,
65  enum PlusMinus isign) const;
66 
67  //! Apply the the odd-odd block onto a source std::vector
68  inline void oddOddLinOp(LatticeStaggeredFermion& chi, const LatticeStaggeredFermion& psi,
69  enum PlusMinus isign) const
70  {
71  chi[ rb[1] ] = 2*Mass*psi;
72  }
73 
74  //! Return flops performed by the operator()
75  unsigned long nFlops() const;
76 
77  private:
78  Real Mass;
79 
80  // These are really only needed for D. I bring back D here where
81  // Steve originally had it. We don't need u_fat and u_triple here
82  // they are kept in the action now.
83  // multi1d<LatticeColorMatrix> u_fat;
84  // multi1d<LatticeColorMatrix> u_triple;
86  };
87 
88 
89 } // End Namespace Chroma
90 
91 
92 #endif
Include possibly optimized Asqtad dslash.
void evenEvenLinOp(LatticeStaggeredFermion &chi, const LatticeStaggeredFermion &psi, enum PlusMinus isign) const
Apply the the even-even block onto a source std::vector.
~AsqtadLinOp()
Destructor is automatic.
void create(Handle< AsqtadConnectStateBase > state_, const Real &Mass_)
Creation routine.
unsigned long nFlops() const
Return flops performed by the operator()
LatticeStaggeredFermion T
void oddEvenLinOp(LatticeStaggeredFermion &chi, const LatticeStaggeredFermion &psi, enum PlusMinus isign) const
Apply the the odd-even block onto a source std::vector.
AsqtadLinOp(Handle< AsqtadConnectStateBase > state_, const Real &Mass_)
Full constructor.
multi1d< LatticeColorMatrix > Q
AsqtadLinOp()
Partial constructor - Must use create later.
void oddOddLinOp(LatticeStaggeredFermion &chi, const LatticeStaggeredFermion &psi, enum PlusMinus isign) const
Apply the the odd-odd block onto a source std::vector.
void evenOddLinOp(LatticeStaggeredFermion &chi, const LatticeStaggeredFermion &psi, enum PlusMinus isign) const
Apply the the even-odd block onto a source std::vector.
multi1d< LatticeColorMatrix > P
const FermBC< T, P, Q > & getFermBC() const
Even odd Linear Operator (for staggered like things )
Definition: eo_linop.h:28
Base class for all fermion action boundary conditions.
Definition: fermbc.h:20
Class for counted reference semantics.
Definition: handle.h:33
The "asq" or "asqtad" dslash operator D'.
Definition: asq_dsl_s.h:54
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
Definition: asq_dsl_s.h:89
void create(Handle< AsqtadConnectStateBase > state_)
Creation routine
Definition: asq_dsl_s.cc:59
Linear Operators.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35