CHROMA
unprec_w12_fermact_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Unpreconditioned W12 fermion action
3  */
4 
5 #include "chromabase.h"
8 
11 
12 namespace Chroma
13 {
14 
15  //! Hooks to register the class with the fermact factory
16  namespace UnprecW12FermActEnv
17  {
18  //! Callback function
19  WilsonTypeFermAct<LatticeFermion,
20  multi1d<LatticeColorMatrix>,
21  multi1d<LatticeColorMatrix> >* createFermAct4D(XMLReader& xml_in,
22  const std::string& path)
23  {
24  return new UnprecW12FermAct(CreateFermStateEnv::reader(xml_in, path),
25  CloverFermActParams(xml_in, path));
26  }
27 
28  //! Callback function
29  /*! Differs in return type */
30  FermionAction<LatticeFermion,
31  multi1d<LatticeColorMatrix>,
32  multi1d<LatticeColorMatrix> >* createFermAct(XMLReader& xml_in,
33  const std::string& path)
34  {
35  return createFermAct4D(xml_in, path);
36  }
37 
38  //! Name to be used
39  const std::string name = "UNPRECONDITIONED_W12";
40 
41  //! Local registration flag
42  static bool registered = false;
43 
44  //! Register all the factories
45  bool registerAll()
46  {
47  bool success = true;
48  if (! registered)
49  {
50  success &= Chroma::TheFermionActionFactory::Instance().registerObject(name, createFermAct);
52  registered = true;
53  }
54  return success;
55  }
56  }
57 
58 
59  //! Produce a linear operator for this action
60  /*!
61  * The operator acts on the entire lattice
62  *
63  * \param state gauge field (Read)
64  */
65  UnprecLinearOperator<LatticeFermion,
66  multi1d<LatticeColorMatrix>,
67  multi1d<LatticeColorMatrix> >*
69  {
71  {
72  QDPIO::cerr << "UnprecW12FermAct::linOp - currently no aniso support" << std::endl;
73  QDP_abort(1);
74  }
75 
76  return new UnprecW12LinOp(state, param);
77  }
78 
79 }
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 W12 fermion action.
UnprecLinearOperator< T, P, Q > * linOp(Handle< FermState< T, P, Q > > state) const
Produce a linear operator for this action.
Unpreconditioned W12 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.
WilsonTypeFermAct< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFermAct4D(XMLReader &xml_in, const std::string &path)
Callback function.
FermionAction< LatticeFermion, 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.
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
Params for clover ferm acts.
Unpreconditioned W12 fermion action.
Unpreconditioned W12 action.