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