CHROMA
unprec_s_cprec_t_wilson_fermact_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Unpreconditioned Wilson fermion action
3  */
4 
5 #include "qdp_config.h"
6 
7 #if QDP_NS == 4
8 #if QDP_NC == 3
9 #if QDP_ND == 4
10 
11 #include "chromabase.h"
14 
17 
18 #include "io/param_io.h"
19 
20 namespace Chroma
21 {
22 
23  //! Hooks to register the class with the fermact factory
24  namespace UnprecSpaceCentralPrecTimeWilsonFermActEnv
25  {
26  //! Callback function
27  WilsonTypeFermAct<LatticeFermion,
28  multi1d<LatticeColorMatrix>,
29  multi1d<LatticeColorMatrix> >* createFermAct4D(XMLReader& xml_in,
30  const std::string& path)
31  {
32  return new UnprecSpaceCentralPrecTimeWilsonFermAct(CreateFermStateEnv::reader(xml_in, path),
33  WilsonFermActParams(xml_in, path));
34  }
35 
36  //! Callback function
37  /*! Differs in return type */
38  FermionAction<LatticeFermion,
39  multi1d<LatticeColorMatrix>,
40  multi1d<LatticeColorMatrix> >* createFermAct(XMLReader& xml_in,
41  const std::string& path)
42  {
43  return createFermAct4D(xml_in, path);
44  }
45 
46  //! Name to be used
47  const std::string name = "UNPREC_SPACE_CPREC_TIME_WILSON";
48 
49  //! Local registration flag
50  static bool registered = false;
51 
52  //! Register all the factories
53  bool registerAll()
54  {
55  bool success = true;
56  if (! registered)
57  {
58  success &= Chroma::TheFermionActionFactory::Instance().registerObject(name, createFermAct);
60  registered = true;
61  }
62  return success;
63  }
64  }
65 
66 
67  //! Produce a linear operator for this action
68  /*!
69  * The operator acts on the entire lattice
70  *
71  * \param state gauge field (Read)
72  */
73  UnprecSpaceCentralPrecTimeLinearOperator<LatticeFermion,
74  multi1d<LatticeColorMatrix>,
75  multi1d<LatticeColorMatrix> >*
76  UnprecSpaceCentralPrecTimeWilsonFermAct::linOp(Handle< FermState<T,P,Q> > state) const
77  {
78  return new UnprecSCprecTWilsonLinOp(state,param.Mass,param.anisoParam);
79  }
80 
81 }
82 
83 #endif
84 #endif
85 #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.
Unpreconditioned Wilson fermion linear operator.