CHROMA
unprec_clover_fermact_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Unpreconditioned 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 UnprecCloverFermActEnv
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 UnprecCloverFermAct(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 = "UNPRECONDITIONED_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 
61  //! Produce a linear operator for this action
62  /*!
63  * The operator acts on the entire lattice
64  *
65  * \param state gauge field (Read)
66  */
67  UnprecLinearOperator<LatticeFermion,
68  multi1d<LatticeColorMatrix>,
69  multi1d<LatticeColorMatrix> >*
71  {
72  return new UnprecCloverLinOp(state,param);
73  }
74 
75 }
76 
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 Clover fermion action.
UnprecLinearOperator< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
Unpreconditioned Clover-Dirac operator.
Unpreconditioned linear operator including derivatives.
Definition: linearop.h:185
Wilson-like fermion actions.
Definition: fermact.orig.h:344
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.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
FermionAction< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct(XMLReader &xml_in, const std::string &path)
Callback function.
const std::string name
Name to be used.
WilsonTypeFermAct< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct4D(XMLReader &xml_in, const std::string &path)
Callback function.
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.
Unpreconditioned Clover fermion action.
Unpreconditioned Clover fermion linear operator.