CHROMA
unprec_wilson_fermact_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Unpreconditioned Wilson fermion action
3  */
4 
5 #include "chromabase.h"
8 
11 
12 #include "io/param_io.h"
13 
14 namespace Chroma
15 {
16 
17  //! Hooks to register the class with the fermact factory
18  namespace UnprecWilsonFermActEnv
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 UnprecWilsonFermAct(CreateFermStateEnv::reader(xml_in, path),
27  WilsonFermActParams(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_WILSON";
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  {
73  }
74 
75 }
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 linear operator including derivatives.
Definition: linearop.h:185
Unpreconditioned Wilson fermion action.
UnprecLinearOperator< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
Unpreconditioned Wilson-Dirac operator.
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.
FermionAction< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct(XMLReader &xml_in, const std::string &path)
Callback function.
static bool registered
Local registration flag.
WilsonTypeFermAct< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct4D(XMLReader &xml_in, const std::string &path)
Callback function.
const std::string name
Name to be used.
bool registerAll()
Register all the factories.
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.
Params for wilson ferm acts.
Unpreconditioned Wilson fermion action.
Unpreconditioned Wilson fermion linear operator.