CHROMA
unprec_graphene_fermact_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Unpreconditioned Graphene fermion action.
3  *
4  * This formulation follows Borici's variant of Creutz's graphene
5  * fermion construction. Borici's variant is described in
6  * arXiv:0712.4401 and Cruetz's original construction is described
7  * in arXiv:0712.1201
8  */
9 
10 #include "chromabase.h"
13 
16 
17 #include "io/param_io.h"
18 
19 namespace Chroma
20 {
21 
22  //! Hooks to register the class with the fermact factory
23  namespace UnprecGrapheneFermActEnv
24  {
25  //! Callback function
26  WilsonTypeFermAct<LatticeFermion,
27  multi1d<LatticeColorMatrix>,
28  multi1d<LatticeColorMatrix> >* createFermAct4D(XMLReader& xml_in,
29  const std::string& path)
30  {
31  return new UnprecGrapheneFermAct(CreateFermStateEnv::reader(xml_in, path),
32  WilsonFermActParams(xml_in, path));
33  }
34 
35  //! Callback function
36  /*! Differs in return type */
37  FermionAction<LatticeFermion,
38  multi1d<LatticeColorMatrix>,
39  multi1d<LatticeColorMatrix> >* createFermAct(XMLReader& xml_in,
40  const std::string& path)
41  {
42  return createFermAct4D(xml_in, path);
43  }
44 
45  //! Name to be used
46  const std::string name = "UNPRECONDITIONED_GRAPHENE";
47 
48  //! Local registration flag
49  static bool registered = false;
50 
51  //! Register all the factories
52  bool registerAll()
53  {
54  bool success = true;
55  if (! registered)
56  {
57  success &= Chroma::TheFermionActionFactory::Instance().registerObject(name, createFermAct);
59  registered = true;
60  }
61  return success;
62  }
63  }
64 
65 
66  //! Produce a linear operator for this action
67  /*!
68  * The operator acts on the entire lattice
69  *
70  * \param state gauge field (Read)
71  */
72  UnprecLinearOperator<LatticeFermion,
73  multi1d<LatticeColorMatrix>,
74  multi1d<LatticeColorMatrix> >*
76  {
78  }
79 
80 }
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 Graphene fermion action.
UnprecLinearOperator< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
Unpreconditioned Graphene 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.
bool registerAll()
Register all the factories.
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.
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
Various parameter structs and reader/writers.
Params for wilson ferm acts.
Unpreconditioned Graphene fermion action.
Unpreconditioned Graphene fermion linear operator.