CHROMA
eoprec_ovdwf_fermact_array_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief 4D style even-odd preconditioned Overlap-DWF (Borici) action
3  */
4 
5 #include "chromabase.h"
9 
12 
13 namespace Chroma
14 {
15  //! Hooks to register the class with the fermact factory
16  namespace EvenOddPrecOvDWFermActArrayEnv
17  {
18  //! Callback function
19  WilsonTypeFermAct5D<LatticeFermion,
20  multi1d<LatticeColorMatrix>,
21  multi1d<LatticeColorMatrix> >* createFermAct5D(XMLReader& xml_in,
22  const std::string& path)
23  {
25  EvenOddPrecOvDWFermActArrayParams(xml_in, path));
26  }
27 
28  //! Callback function
29  /*! Differs in return type */
30  FermionAction<LatticeFermion,
31  multi1d<LatticeColorMatrix>,
32  multi1d<LatticeColorMatrix> >* createFermAct(XMLReader& xml_in,
33  const std::string& path)
34  {
35  return createFermAct5D(xml_in, path);
36  }
37 
38  //! Name to be used
39  const std::string name = "OVDWF";
40 
41  //! Local registration flag
42  static bool registered = false;
43 
44  //! Register all the factories
45  bool registerAll()
46  {
47  bool success = true;
48  if (! registered)
49  {
50  success &= Chroma::TheFermionActionFactory::Instance().registerObject(name, createFermAct);
52  registered = true;
53  }
54  return success;
55  }
56  }
57 
58 
59  //! Read parameters
61  const std::string& path)
62  {
63  XMLReader paramtop(xml, path);
64 
65  // Read the stuff for the action
66  read(paramtop, "OverMass", OverMass);
67  read(paramtop, "Mass", Mass);
68  read(paramtop, "N5", N5);
69 
70  if (paramtop.count("a5") != 0)
71  read(paramtop, "a5", a5);
72  else
73  a5 = 1.0;
74  }
75 
76 
77  //! Read parameters
78  void read(XMLReader& xml, const std::string& path, EvenOddPrecOvDWFermActArrayParams& param)
79  {
81  param = tmp;
82  }
83 
84 
85  //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
86  EvenOddPrecDWLikeLinOpBaseArray<LatticeFermion,
87  multi1d<LatticeColorMatrix>,
88  multi1d<LatticeColorMatrix> >*
90  const Real& m_q) const
91  {
93  }
94 
95  //! Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass
96  UnprecDWLikeLinOpBaseArray<LatticeFermion,
97  multi1d<LatticeColorMatrix>,
98  multi1d<LatticeColorMatrix> >*
100  const Real& m_q) const
101  {
102  return new UnprecOvDWLinOpArray(state,OverMass,m_q,N5);
103  }
104 
105 }
106 
Primary include file for CHROMA library code.
4D Even Odd preconditioned domain-wall Dirac operator
4D style even-odd preconditioned Overlap-DWF (Borici) action
EvenOddPrecDWLikeLinOpBaseArray< T, P, Q > * precLinOp(Handle< FermState< T, P, Q > > state, const Real &m_q) const
Produce an even-odd preconditioned linear operator for this action with arbitrary quark mass.
UnprecDWLikeLinOpBaseArray< T, P, Q > * unprecLinOp(Handle< FermState< T, P, Q > > state, const Real &m_q) const
Produce an unpreconditioned linear operator for this action with arbitrary quark mass.
4D Even Odd preconditioned Overlap-DWF (Borici) linear operator
Support class for fermion actions and linear operators.
Definition: state.h:94
Base class for quadratic matter actions (e.g., fermions)
Definition: fermact.h:53
Class for counted reference semantics.
Definition: handle.h:33
static T & Instance()
Definition: singleton.h:432
Unpreconditioned domain-wall Dirac operator.
Unpreconditioned Overlap-DWF (Borici) linear operator.
Wilson-like fermion actions.
Definition: fermact.orig.h:403
4D style even-odd preconditioned Overlap-DWF (Borici) action
4D Even Odd preconditioned Overlap-DWF (Borici) linear operator
All ferm create-state method.
Fermion action factories.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
Handle< CreateFermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the CreateFermState readers.
FermionAction< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct(XMLReader &xml_in, const std::string &path)
Callback function.
bool registerAll()
Register all the factories.
static bool registered
Local registration flag.
WilsonTypeFermAct5D< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct5D(XMLReader &xml_in, const std::string &path)
Callback function.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
::std::string string
Definition: gtest.h:1979
EvenOddPrecOvDWFermActArrayParams(XMLReader &in, const std::string &path)
Read parameters.
Unpreconditioned Overlap-DWF (Borici) linear operator.