CHROMA
overlap_fermact_base_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Base class for unpreconditioned overlap-like fermion actions
4  */
5 
6 #ifndef __overlap_fermact_base_w_h__
7 #define __overlap_fermact_base_w_h__
8 
10 #include "meas/eig/ischiral_w.h"
14 
15 
16 namespace Chroma
17 {
18 
19  //! Base class for unpreconditioned overlap-like fermion actions
20  /*! \ingroup fermacts
21  *
22  * Unpreconditioned overlap-like fermion action.
23  * The conventions used here are specified in some Nucl.Phys.B. article
24  * by Edwards,Heller, Narayanan
25  *
26  * NOTE: for now we assume the kernel is a fund. rep. fermion type,
27  * but that is not necessary
28  */
29  class OverlapFermActBase : public UnprecWilsonTypeFermAct<LatticeFermion,
30  multi1d<LatticeColorMatrix>,
31  multi1d<LatticeColorMatrix> >
32  {
33  public:
34  // Typedefs to save typing
35  typedef LatticeFermion T;
36  typedef multi1d<LatticeColorMatrix> P;
37  typedef multi1d<LatticeColorMatrix> Q;
38 
39  //! Virtual copy constructor
40  virtual OverlapFermActBase* clone() const = 0;
41 
42  //! Return the quark mass
43  virtual Real getQuarkMass() const = 0;
44 
45  //! Does this object really satisfy the Ginsparg-Wilson relation?
46  virtual bool isChiral() const = 0;
47 
48  //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
50  const Real& m_q) const = 0;
51 
52  //! Override to produce a DWF-link unprec. linear operator for this action
53  /*! Covariant return rule - override base class function */
55  {
56  return unprecLinOp(state,getQuarkMass());
57  }
58 
59  //! Robert's way:
60  //! Produce a linear operator M^dag.M for this action to be applied
61  // to a std::vector of known chirality. Chirality is passed in
63 
65  const Chirality& chirality) const = 0;
66 
68  {
69  return new lgherm<T>(linOp(state));
70  }
71 
74  return new lDeltaLs(lin);
75  }
76 
77  //! Produce a linear operator that gives back gamma_5 eps(H)
79 
80 
81  //! Produce a linear operator that gives back gamma_5 eps(H)
83 
85 
86  //! Robert's way:
87  //! Produce a linear operator M^dag.M for this action to be applied
88  // to a std::vector of known chirality. Chirality is passed in
90 
92  const Chirality& chirality) const = 0;
93 
94  //! Redefine quark propagator routine for 4D fermions
95  /*! Default implementation provided */
97  const GroupXML_t& invParam) const;
98 
99  //! Define a multi mass qprop
100  /*! this should be possible for most 4D operators of the
101  * form (1/2)[ (1 + Mass ) + (1 - Mass) gamma_5 psi
102  *
103  */
104  void multiQprop(multi1d<T>& psi,
105  const multi1d<Real>& masses,
107  const T& chi,
108  const GroupXML_t& invParam,
109  const int n_soln,
110  int & ncg_had) const;
111 
112 
113  //! Define a multi mass qprop
114  /*!
115  * \param q_sol quark propagator ( Write )
116  * \param q_src source ( Read )
117  * \param invParam inverter parameters ( Read )
118  * \param ncg_had number of CG iterations ( Write )
119  */
120  void multiQuarkProp(multi1d<LatticePropagator>& q_sol,
121  XMLWriter& xml_out,
122  const LatticePropagator& q_src,
124  const multi1d<Real>& masses,
125  const GroupXML_t& invParam,
126  const int n_soln,
127  int& ncg_had);
128  };
129 
130 }
131 
132 #endif
Differentiable Linear Operator.
Definition: linearop.h:98
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Linear Operator.
Definition: linearop.h:27
Base class for unpreconditioned overlap-like fermion actions.
virtual LinearOperator< T > * lgamma5epsH(Handle< FermState< T, P, Q > > state) const =0
Produce a linear operator that gives back gamma_5 eps(H)
virtual DiffLinearOperator< T, P, Q > * lMdagM(Handle< FermState< T, P, Q > > state, const Chirality &chirality) const =0
virtual LinearOperator< T > * DeltaLs(Handle< FermState< T, P, Q > > state) const
virtual LinearOperator< T > * linOpPrecondition(Handle< FermState< T, P, Q > > state) const =0
virtual LinearOperator< T > * lMdagMPrecondition(Handle< FermState< T, P, Q > > state, const Chirality &chirality) const =0
virtual LinearOperator< T > * lgamma5epsHPrecondition(Handle< FermState< T, P, Q > > state) const =0
Produce a linear operator that gives back gamma_5 eps(H)
void multiQprop(multi1d< T > &psi, const multi1d< Real > &masses, Handle< FermState< T, P, Q > > state, const T &chi, const GroupXML_t &invParam, const int n_soln, int &ncg_had) const
Define a multi mass qprop.
multi1d< LatticeColorMatrix > P
virtual LinearOperator< T > * lMdagMPrecondition(Handle< FermState< T, P, Q > > state) const =0
virtual UnprecLinearOperator< T, P, Q > * unprecLinOp(Handle< FermState< T, P, Q > > state, const Real &m_q) const =0
Produce an unpreconditioned linear operator for this action with arbitrary quark mass.
virtual UnprecLinearOperator< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Override to produce a DWF-link unprec. linear operator for this action.
multi1d< LatticeColorMatrix > Q
virtual DiffLinearOperator< T, P, Q > * lMdagM(Handle< FermState< T, P, Q > > state) const =0
virtual OverlapFermActBase * clone() const =0
Virtual copy constructor.
virtual Real getQuarkMass() const =0
Return the quark mass.
virtual bool isChiral() const =0
Does this object really satisfy the Ginsparg-Wilson relation?
virtual LinearOperator< T > * hermitianLinOp(Handle< FermState< T, P, Q > > state) const
Produce a hermitian version of the linear operator.
SystemSolver< T > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Redefine quark propagator routine for 4D fermions.
Linear system solvers.
Definition: syssolver.h:34
Unpreconditioned linear operator including derivatives.
Definition: linearop.h:185
Unpreconditioned Wilson-like fermion actions with derivatives.
Definition: fermact.orig.h:491
GW Defect operator.
Definition: lDeltaLs_w.h:19
Gamma(5) hermitian linear operator.
Definition: lgherm_w.h:22
Inner solver enum.
void multiQuarkProp(multi1d< LatticePropagator > &q_sol, XMLWriter &xml_out, const LatticePropagator &q_src, Handle< FermState< T, P, Q > > state, const multi1d< Real > &masses, const GroupXML_t &invParam, const int n_soln, int &ncg_had)
Define a multi mass qprop.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
Chirality
Definition: ischiral_w.h:8
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
Hold group xml and type id.
Wilson-like fermion actions.