CHROMA
eoprec_dwf_fermact_base_array_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Base class for even-odd preconditioned domain-wall-like fermion actions
4  */
5 
6 #ifndef __prec_dwf_fermact_base_array_w_h__
7 #define __prec_dwf_fermact_base_array_w_h__
8 
14 
15 
16 namespace Chroma
17 {
18  //! Base class for unpreconditioned domain-wall-like fermion actions
19  /*! \ingroup fermacts
20  *
21  * Unprecondition domain-wall fermion action. The conventions used here
22  * are specified in Phys.Rev.D63:094505,2001 (hep-lat/0005002).
23  */
24  template<typename T, typename P, typename Q>
26  {
27  public:
28  //! Return the quark mass
29  virtual Real getQuarkMass() const = 0;
30 
31  //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
33  const Real& m_q) const = 0;
34 
35  //! Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass
37  const Real& m_q) const = 0;
38 
39  //! Override to produce a DWF-link even-odd prec. linear operator for this action
40  /*! Covariant return rule - override base class function */
42  {
43  return precLinOp(state,getQuarkMass());
44  }
45 
46  //! Override to produce a DWF-link even-odd prec. Pauli-Villars linear operator for this action
47  /*! Covariant return rule - override base class function */
49  {
50  return precLinOp(state,Real(1));
51  }
52 
53  //! Produce a hermitian version of the linear operator
54  /*! This code is generic */
56  {
57  // Have not implemented this yet, but it is generic
58  //
59  // BALINT:
60  // Oh no it isn't or is it(?)... what is the reflection matrix
61  // for Moebius with Zolo coeffs where D(1) != D(2) etc.
62  // However the function is at least virtual so it can be
63  // overridden on an as needed basis
64  QDPIO::cerr << "EvenOddPrecDWFermActBaseArray::hermitianLinOp not implemented" << std::endl;
65  QDP_abort(1);
66  return 0;
67  }
68 
69  //! Produce an unpreconditioned linear operator projecting 5D to 4D (the inverse of qprop below)
70  /*! Use the fact that linOp4D(m_q) = [P^{-1} (D^{(5)}(1))^{-1} D^{(5)}(m_q) P]_{11} */
72  const Real& m_q,
73  const GroupXML_t& invParam) const
74  {
75  std::istringstream is(invParam.xml);
76  XMLReader paramtop(is);
77 
79  precLinOp(state,Real(1)),
80  SysSolverCGParams(paramtop,invParam.path));
81  }
82 
83  //! Produce a DeltaLs = 1-epsilon^2(H) operator
85  const GroupXML_t& invParam) const
86  {
87  Handle< LinearOperator<T> > lin(linOp4D(state,Real(0),invParam));
88  return new lDeltaLs(lin);
89  }
90 
91  //! Define quark propagator routine for 4D fermions
92  /*! Default implementation provided */
94  const GroupXML_t& invParam) const;
95 
96  //! Apply the Dminus operator on a fermion.
97  /*!
98  * Slightly more than a convenience function,
99  * it avoids specifying the type of the linOp.
100  * Used in the dwf_quarkProp routine.
101  */
102  void Dminus(T& chi,
103  const T& psi,
105  enum PlusMinus isign,
106  int s5) const
107  {
109  A->Dminus(chi,psi,isign,s5);
110  }
111 
112  };
113 
114 }
115 
116 #endif
Even-odd preconditioned Wilson-like fermion actions including derivatives.
Base class for unpreconditioned domain-wall-like fermion actions.
virtual LinearOperatorArray< T > * hermitianLinOp(Handle< FermState< T, P, Q > > state) const
Produce a hermitian version of the linear operator.
virtual LinearOperator< T > * linOp4D(Handle< FermState< T, P, Q > > state, const Real &m_q, const GroupXML_t &invParam) const
Produce an unpreconditioned linear operator projecting 5D to 4D (the inverse of qprop below)
virtual EvenOddPrecDWLikeLinOpBaseArray< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Override to produce a DWF-link even-odd prec. linear operator for this action.
SystemSolver< T > * qprop(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Define quark propagator routine for 4D fermions.
virtual Real getQuarkMass() const =0
Return the quark mass.
virtual EvenOddPrecDWLikeLinOpBaseArray< T, P, Q > * precLinOp(Handle< FermState< T, P, Q > > state, const Real &m_q) const =0
Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass.
virtual LinearOperator< T > * DeltaLs(Handle< FermState< T, P, Q > > state, const GroupXML_t &invParam) const
Produce a DeltaLs = 1-epsilon^2(H) operator.
void Dminus(T &chi, const T &psi, Handle< FermState< T, P, Q > > state, enum PlusMinus isign, int s5) const
Apply the Dminus operator on a fermion.
virtual UnprecDWLikeLinOpBaseArray< 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 EvenOddPrecDWLikeLinOpBaseArray< T, P, Q > * linOpPV(Handle< FermState< T, P, Q > > state) const
Override to produce a DWF-link even-odd prec. Pauli-Villars linear operator for this action.
4D Even Odd preconditioned domain-wall Dirac operator
Support class for fermion actions and linear operators.
Definition: state.h:94
Class for counted reference semantics.
Definition: handle.h:33
Linear Operator to arrays.
Definition: linearop.h:61
Linear Operator.
Definition: linearop.h:27
Linear system solvers.
Definition: syssolver.h:34
Unpreconditioned domain-wall Dirac operator.
Unpreconditioned projected DWF operator to 4D, using prec. 5D pieces.
GW Defect operator.
Definition: lDeltaLs_w.h:19
Even-odd const determinant Wilson-like fermact.
Base class for even-odd preconditioned domain-wall-like linops.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
A(A, psi, r, Ncb, PLUS)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
Hold group xml and type id.
Params for CG inverter.
Base class for unpreconditioned domain-wall-like fermion linear operator.
Unpreconditioned projected DWF operator to 4D using prec 5D bits.