CHROMA
unprec_w12_linop_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Unpreconditioned W12 action
4  */
5 
6 #ifndef __unprec_w12_linop_w_h__
7 #define __unprec_w12_linop_w_h__
8 
9 #include "linearop.h"
11 
12 
13 namespace Chroma
14 {
15  //! Unpreconditioned W12 operator
16  /*!
17  * \ingroup linop
18  *
19  * The W12 action does
20  * Chi = (m0 - (2/3*((1/2)*(1/4))*sigma.F + W' + (1/6)*W^2_mu) * Psi
21  */
22  class UnprecW12LinOp : public UnprecLinearOperator<LatticeFermion,
23  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
24  {
25  public:
26  // Typedefs to save typing
27  typedef LatticeFermion T;
28  typedef multi1d<LatticeColorMatrix> P;
29  typedef multi1d<LatticeColorMatrix> Q;
30 
31  //! Partial constructor
33 
34  //! Full constructor
36  {create(fs,param_);}
37 
38  //! Destructor is automatic
40 
41  //! Return the fermion BC object for this linear operator
42  const FermBC<T,P,Q>& getFermBC() const {return A.getFermBC();}
43 
44  //! Creation routine
46  const CloverFermActParams& param_);
47 
48  //! Apply the operator onto a source std::vector
49  void operator() (LatticeFermion& chi, const LatticeFermion& psi, enum PlusMinus isign) const;
50 
51  //! Derivative of unpreconditioned W12 dM/dU
52  void deriv(multi1d<LatticeColorMatrix>& ds_u,
53  const LatticeFermion& chi, const LatticeFermion& psi,
54  enum PlusMinus isign) const;
55 
56  //! Return flops performed by the operator()
57  unsigned long nFlops() const;
58 
59  protected:
60  //! GAMWM
61  /*!
62  * Description:
63  *
64  * This routine applies the operator W' to Psi, putting the result in Chi.
65  *
66  * chi(x,mu) := + (1 - isign gamma ) U (x) psi(x+mu)
67  * mu mu
68  * +
69  * + (1 + isign gamma ) U (x-mu) psi(x-mu)
70  * mu mu
71  */
72  void gamW(multi1d<LatticeFermion>& chi,
73  const LatticeFermion& psi,
74  int j_decay,
75  enum PlusMinus isign) const;
76 
77 
78  //! GAMWMUM
79  /*! This routine applies the operator W' to Psi, putting the result in Chi.
80  *
81  * chi(x,mu) := + (1 - isign gamma ) U (x) psi (x+mu)
82  * mu mu mu
83  * +
84  * + (1 + isign gamma ) U (x-mu) psi (x-mu)
85  * mu mu mu
86  */
87  void gamWmu(multi1d<LatticeFermion>& chi,
88  const multi1d<LatticeFermion>& psi,
89  int j_decay,
90  enum PlusMinus isign) const;
91 
92  private:
94  Real aniso_fact;
95  Real fact1;
96  Real fact2;
97  Real fact3;
98  Real fact4;
99  int j_decay;
100  multi1d<LatticeColorMatrix> u; // fold in anisotropy
102  };
103 
104 } // End Namespace Chroma
105 
106 
107 #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
const FermBC< T, multi1d< U >, multi1d< U > > & getFermBC() const
Return the fermion BC object for this linear operator.
Unpreconditioned linear operator including derivatives.
Definition: linearop.h:185
Unpreconditioned W12 operator.
unsigned long nFlops() const
Return flops performed by the operator()
multi1d< LatticeColorMatrix > u
CloverFermActParams param
void gamW(multi1d< LatticeFermion > &chi, const LatticeFermion &psi, int j_decay, enum PlusMinus isign) const
GAMWM.
UnprecW12LinOp()
Partial constructor.
~UnprecW12LinOp()
Destructor is automatic.
void deriv(multi1d< LatticeColorMatrix > &ds_u, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Derivative of unpreconditioned W12 dM/dU.
void create(Handle< FermState< T, P, Q > > fs, const CloverFermActParams &param_)
Creation routine.
void operator()(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the operator onto a source std::vector.
UnprecW12LinOp(Handle< FermState< T, P, Q > > fs, const CloverFermActParams &param_)
Full constructor.
void gamWmu(multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, int j_decay, enum PlusMinus isign) const
GAMWMUM.
multi1d< LatticeColorMatrix > Q
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
multi1d< LatticeColorMatrix > P
Include possibly optimized Clover terms.
Linear Operators.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
Params for clover ferm acts.