CHROMA
klein_gordon_linop_s.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //! Klein-Gordon operator
3 /*! \file
4  * \ingroup linop
5  *
6  * \brief Klein-Gordon boson action masquerading action as a staggered action
7  */
8 
9 #ifndef __klein_gordon_linop_s_h__
10 #define __klein_gordon_linop_s_h__
11 
12 #include "linearop.h"
13 #include "state.h"
14 #include "io/aniso_io.h"
15 
16 namespace Chroma
17 {
18  class KleinGordonLinOp : public UnprecLinearOperator< 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
32  const Real& Mass_,
33  const AnisoParam_t& aniso);
34 
35  //! Creation routine with Anisotropy
36  void create(Handle< FermState<T,P,Q> > fs,
37  const Real& Mass_,
38  const AnisoParam_t& aniso);
39 
40  //! Destructor is automatic
42 
43  //! Return the fermion BC object for this linear operator
44  const FermBC<T,P,Q>& getFermBC() const {return *fbc;}
45 
46  //! Apply the operator onto a source std::vector
47  void operator() (T& chi, const T& psi, enum PlusMinus isign) const;
48 
49  //! Derivative of unpreconditioned operator
50  void deriv(multi1d<LatticeColorMatrix>& ds_u,
51  const T& chi, const T& psi,
52  enum PlusMinus isign) const;
53 
54  //! Return flops performed by the operator()
55  unsigned long nFlops() const;
56 
57  private:
58  Real fact; // tmp holding Nd+Mass
59  Real Mass;
62  multi1d<LatticeColorMatrix> u;
63  };
64 
65 
66 } // End Namespace Chroma
67 
68 
69 #endif
Anisotropy parameters.
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
Handle< FermBC< T, P, Q > > fbc
void operator()(T &chi, const T &psi, enum PlusMinus isign) const
Apply the operator onto a source std::vector.
const FermBC< T, P, Q > & getFermBC() const
Return the fermion BC object for this linear operator.
void deriv(multi1d< LatticeColorMatrix > &ds_u, const T &chi, const T &psi, enum PlusMinus isign) const
Derivative of unpreconditioned operator.
multi1d< LatticeColorMatrix > P
void create(Handle< FermState< T, P, Q > > fs, const Real &Mass_, const AnisoParam_t &aniso)
Creation routine with Anisotropy.
KleinGordonLinOp()
Partial constructor - Must use create later.
unsigned long nFlops() const
Return flops performed by the operator()
~KleinGordonLinOp()
Destructor is automatic.
multi1d< LatticeColorMatrix > u
multi1d< LatticeColorMatrix > Q
LatticeStaggeredFermion T
Unpreconditioned linear operator including derivatives.
Definition: linearop.h:185
Linear Operators.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
Support class for fermion actions and linear operators.
Parameters for anisotropy.
Definition: aniso_io.h:24