CHROMA
unprec_hamberwu_linop_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Unpreconditioned Hamber-Wu fermion linear operator
4  */
5 
6 #ifndef __unprec_hamberwu_linop_w_h__
7 #define __unprec_hamberwu_linop_w_h__
8 
9 #include "linearop.h"
11 
12 
13 namespace Chroma
14 {
15  //! Unpreconditioned Hamber-Wu operator
16  /*!
17  * \ingroup linop
18  */
19 
20  class UnprecHamberWuLinOp : public UnprecLinearOperator<LatticeFermion,
21  multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> >
22  {
23  public:
24  // Typedefs to save typing
25  typedef LatticeFermion T;
26  typedef multi1d<LatticeColorMatrix> P;
27  typedef multi1d<LatticeColorMatrix> Q;
28 
29  //! Partial constructor
31 
32  //! Full constructor
34  const Real& Mass_, const Real& u0_)
35  {create(fs,Mass_,u0_);}
36 
37  //! Destructor is automatic
39 
40  //! Return the fermion BC object for this linear operator
41  const FermBC<T,P,Q>& getFermBC() const {return D.getFermBC();}
42 
43  //! Creation routine
44  void create(Handle< FermState<T,P,Q> > fs, const Real& Mass_, const Real& u0_);
45 
46  //! Apply the operator onto a source std::vector
47  void operator() (LatticeFermion& chi, const LatticeFermion& psi, enum PlusMinus isign) const;
48 
49  //! Derivative of unpreconditioned HamberWu dM/dU
50  void deriv(multi1d<LatticeColorMatrix>& ds_u,
51  const LatticeFermion& chi, const LatticeFermion& psi,
52  enum PlusMinus isign) const;
53 
54  //! Return flops performed by the operator()
55  unsigned long nFlops() const;
56 
57  private:
58  Real Mass;
59  Real u0;
60  Real fact1;
61  Real fact2;
62  Real fact3;
63  Real fact4;
64  multi1d<LatticeColorMatrix> u_dble;
66  };
67 
68 } // End Namespace Chroma
69 
70 
71 #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.
Definition: lwldslash_w.h:48
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
Definition: lwldslash_w.h:92
Unpreconditioned Hamber-Wu operator.
multi1d< LatticeColorMatrix > P
void create(Handle< FermState< T, P, Q > > fs, const Real &Mass_, const Real &u0_)
Creation routine.
unsigned long nFlops() const
Return flops performed by the operator()
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
UnprecHamberWuLinOp(Handle< FermState< T, P, Q > > fs, const Real &Mass_, const Real &u0_)
Full constructor.
void deriv(multi1d< LatticeColorMatrix > &ds_u, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Derivative of unpreconditioned HamberWu dM/dU.
UnprecHamberWuLinOp()
Partial constructor.
multi1d< LatticeColorMatrix > u_dble
void operator()(LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
Apply the operator onto a source std::vector.
multi1d< LatticeColorMatrix > Q
~UnprecHamberWuLinOp()
Destructor is automatic.
Unpreconditioned linear operator including derivatives.
Definition: linearop.h:185
Include possibly optimized Wilson dslash.
Linear Operators.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35