CHROMA
eo3dprec_s_cprec_t_wilson_fermact_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief EO3DPreconditioned Wilson fermion action
3  */
4 
5 #include "qdp_config.h"
6 #if QDP_NS == 4
7 #if QDP_NC == 3
8 #if QDP_ND == 4
9 
10 #include "chromabase.h"
13 
16 
17 #include "io/param_io.h"
18 
19 namespace Chroma
20 {
21 
22  //! Hooks to register the class with the fermact factory
23  namespace EO3DPrecSpaceCentralPrecTimeWilsonFermActEnv
24  {
25  //! Callback function
26  WilsonTypeFermAct<LatticeFermion,
27  multi1d<LatticeColorMatrix>,
28  multi1d<LatticeColorMatrix> >* createFermAct4D(XMLReader& xml_in,
29  const std::string& path)
30  {
31  return new EO3DPrecSpaceCentralPrecTimeWilsonFermAct(CreateFermStateEnv::reader(xml_in, path),
32  WilsonFermActParams(xml_in, path));
33  }
34 
35  //! Callback function
36  /*! Differs in return type */
37  FermionAction<LatticeFermion,
38  multi1d<LatticeColorMatrix>,
39  multi1d<LatticeColorMatrix> >* createFermAct(XMLReader& xml_in,
40  const std::string& path)
41  {
42  return createFermAct4D(xml_in, path);
43  }
44 
45  //! Name to be used
46  const std::string name = "EO3DPREC_SPACE_CPREC_TIME_WILSON";
47 
48  //! Local registration flag
49  static bool registered = false;
50 
51  //! Register all the factories
52  bool registerAll()
53  {
54  bool success = true;
55  if (! registered)
56  {
57  success &= Chroma::TheFermionActionFactory::Instance().registerObject(name, createFermAct);
59  registered = true;
60  }
61  return success;
62  }
63  }
64 
65 
66  //! Produce a linear operator for this action
67  /*!
68  * The operator acts on the entire lattice
69  *
70  * \param state gauge field (Read)
71  */
72  EO3DPrecSpaceCentralPrecTimeLinearOperator<LatticeFermion,
73  multi1d<LatticeColorMatrix>,
74  multi1d<LatticeColorMatrix> >*
75  EO3DPrecSpaceCentralPrecTimeWilsonFermAct::linOp(Handle< FermState<T,P,Q> > state) const
76  {
77  return new EO3DPrecSCprecTWilsonLinOp(state,param.Mass,param.anisoParam);
78  }
79 
80 }
81 
82 #endif
83 #endif
84 #endif
Primary include file for CHROMA library code.
static T & Instance()
Definition: singleton.h:432
All ferm create-state method.
Fermion action factories.
StaggeredTypeFermAct< LatticeStaggeredFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct4D(XMLReader &xml_in, const std::string &path)
Callback function.
bool registerAll()
Register all the factories.
FermionAction< LatticeStaggeredFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct(XMLReader &xml_in, const std::string &path)
Callback function.
static bool registered
Local registration flag.
const std::string name
Name to be used.
Handle< CreateFermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the CreateFermState readers.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
Definition: pbg5p_w.cc:28
::std::string string
Definition: gtest.h:1979
Various parameter structs and reader/writers.