CHROMA
eoprec_clover_fermact_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Even-odd preconditioned Clover fermion action
3  */
4 
5 #include "chromabase.h"
7 
10 
11 //#include "actions/ferm/fermacts/fermact_factory_w.h"
13 
14 namespace Chroma
15 {
16 
17  //! Hooks to register the class with the fermact factory
18  namespace EvenOddPrecCloverFermActEnv
19  {
20  //! Callback function
21  WilsonTypeFermAct<LatticeFermion,
22  multi1d<LatticeColorMatrix>,
23  multi1d<LatticeColorMatrix> >* createFermAct4D(XMLReader& xml_in,
24  const std::string& path)
25  {
26  return new EvenOddPrecCloverFermAct(CreateFermStateEnv::reader(xml_in, path),
27  CloverFermActParams(xml_in, path));
28  }
29 
30  //! Callback function
31  /*! Differs in return type */
32  FermionAction<LatticeFermion,
33  multi1d<LatticeColorMatrix>,
34  multi1d<LatticeColorMatrix> >* createFermAct(XMLReader& xml_in,
35  const std::string& path)
36  {
37  return createFermAct4D(xml_in, path);
38  }
39 
40  //! Name to be used
41  const std::string name = "CLOVER";
42 
43  //! Local registration flag
44  static bool registered = false;
45 
46  //! Register all the factories
47  bool registerAll()
48  {
49  bool success = true;
50  if (! registered)
51  {
52  success &= Chroma::TheFermionActionFactory::Instance().registerObject(name, createFermAct);
54  registered = true;
55  }
56  return success;
57  }
58  }
59 
60  //! Produce a linear operator for this action
61  /*!
62  * The operator acts on the odd subset
63  *
64  * \param state gauge field (Read)
65  */
66  EvenOddPrecLogDetLinearOperator<LatticeFermion,
67  multi1d<LatticeColorMatrix>,
68  multi1d<LatticeColorMatrix> >*
70  {
72  }
73 
74 }
75 
Primary include file for CHROMA library code.
Even-odd preconditioned Clover fermion action.
EvenOddPrecLogDetLinearOperator< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
Even-odd preconditioned Clover-Dirac operator.
Even-odd preconditioned 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
Wilson-like fermion actions.
Definition: fermact.orig.h:344
Even-odd preconditioned Clover fermion action.
Even-odd preconditioned Clover fermion linear operator.
All ferm create-state method.
Fermion action factories.
Handle< CreateFermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the CreateFermState readers.
WilsonTypeFermAct< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct4D(XMLReader &xml_in, const std::string &path)
Callback function.
static bool registered
Local registration flag.
FermionAction< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct(XMLReader &xml_in, const std::string &path)
Callback function.
bool registerAll()
Register all the factories.
const std::string name
Name to be used.
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
Params for clover ferm acts.