CHROMA
extfield_fermstate_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief External field ferm state and a creator
3  */
4 
10 
11 namespace Chroma
12 {
13 
14  /*! \ingroup fermstates */
15  namespace CreateExtFieldFermStateEnv
16  {
17  CreateFermState<LatticeFermion,
18  multi1d<LatticeColorMatrix>,
19  multi1d<LatticeColorMatrix> >* createFerm(XMLReader& xml,
20  const std::string& path)
21  {
22 
23  return new CreateExtFieldFermState< LatticeFermion,
24  multi1d<LatticeColorMatrix>,
25  multi1d<LatticeColorMatrix> >(WilsonTypeFermBCEnv::reader(xml, path),
26  ExternalFieldEnv::reader(xml,path));
27  }
28 
29  const std::string name = "EXTERNAL_FIELD_FERM_STATE";
30 
31  //! Local registration flag
32  static bool registered = false;
33 
34  //! Register all the factories
35  bool registerAll()
36  {
37  bool success = true;
38  if (! registered)
39  {
40  success &= Chroma::TheCreateFermStateFactory::Instance().registerObject(name, createFerm);
41 
42  success &= ExternalFieldEnv::registerAll();
43 
44  registered = true;
45  }
46  return success;
47  }
48  }
49 
50 }
Create a simple ferm connection state.
Create a fermion connection state.
Definition: create_state.h:69
static T & Instance()
Definition: singleton.h:432
External field functions.
Fermion external field state and a creator.
All ferm create-state method.
Fermion create state factory.
Fermionic boundary condition reader.
Handle< FermBC< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the FermionAction readers.
CreateFermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createFerm(XMLReader &xml, const std::string &path)
bool registerAll()
Register all the factories.
static bool registered
Local registration flag.
Handle< ExternalField > reader(XMLReader &xml, const std::string &path)
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979