CHROMA
unprec_ovdwf_fermact_array_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Unpreconditioned Overlap-DWF (Borici) action
3  */
4 
5 #include "chromabase.h"
8 
11 
12 namespace Chroma
13 {
14  //! Hooks to register the class with the fermact factory
15  namespace UnprecOvDWFermActArrayEnv
16  {
17  //! Callback function
18  WilsonTypeFermAct5D<LatticeFermion,
19  multi1d<LatticeColorMatrix>,
20  multi1d<LatticeColorMatrix> >* createFermAct5D(XMLReader& xml_in,
21  const std::string& path)
22  {
23  return new UnprecOvDWFermActArray(CreateFermStateEnv::reader(xml_in, path),
24  UnprecOvDWFermActArrayParams(xml_in, path));
25  }
26 
27  //! Callback function
28  /*! Differs in return type */
29  FermionAction<LatticeFermion,
30  multi1d<LatticeColorMatrix>,
31  multi1d<LatticeColorMatrix> >* createFermAct(XMLReader& xml_in,
32  const std::string& path)
33  {
34  return createFermAct5D(xml_in, path);
35  }
36 
37  //! Name to be used
38  const std::string name = "UNPRECONDITIONED_OVDWF";
39 
40  //! Local registration flag
41  static bool registered = false;
42 
43  //! Register all the factories
44  bool registerAll()
45  {
46  bool success = true;
47  if (! registered)
48  {
49  success &= Chroma::TheFermionActionFactory::Instance().registerObject(name, createFermAct);
51  registered = true;
52  }
53  return success;
54  }
55  }
56 
57 
58  //! Read parameters
60  const std::string& path)
61  {
62  XMLReader paramtop(xml, path);
63 
64  // Read the stuff for the action
65  read(paramtop, "OverMass", OverMass);
66  read(paramtop, "Mass", Mass);
67  read(paramtop, "N5", N5);
68 
69  if (paramtop.count("a5") != 0)
70  read(paramtop, "a5", a5);
71  else
72  a5 = 1.0;
73  }
74 
75 
76  //! Read parameters
77  void read(XMLReader& xml, const std::string& path, UnprecOvDWFermActArrayParams& param)
78  {
80  param = tmp;
81  }
82 
83 
84  //! Produce an unpreconditioned linear operator for this action with arbitrary quark mass
85  UnprecDWLikeLinOpBaseArray<LatticeFermion,
86  multi1d<LatticeColorMatrix>,
87  multi1d<LatticeColorMatrix> >*
89  const Real& m_q) const
90  {
91  return new UnprecOvDWLinOpArray(state,OverMass,m_q,N5);
92  }
93 
94 }
95 
Primary include file for CHROMA library code.
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-style (Borici) OvDWF fermion action.
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.
Unpreconditioned Overlap-DWF (Borici) linear operator.
Wilson-like fermion actions.
Definition: fermact.orig.h:403
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.
static bool registered
Local registration flag.
WilsonTypeFermAct5D< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct5D(XMLReader &xml_in, const std::string &path)
Callback function.
const std::string name
Name to be used.
bool registerAll()
Register all the factories.
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
Unpreconditioned Overlap-DWF (Borici) action.
Unpreconditioned Overlap-DWF (Borici) linear operator.