CHROMA
fermbcs_reader_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Fermionic BC reader
3  */
4 
8 
9 namespace Chroma
10 {
11 
12  //! Name and registration
13  namespace WilsonTypeFermBCEnv
14  {
15  // Helper function for the FermionAction readers
16  /*
17  * This structure should not be replicated. This routine helps maintain
18  * backwards compatibility with the FermionAction readers by looking for
19  * either the "boundary" tag or the FermionBC group
20  */
21  Handle< FermBC<LatticeFermion,
22  multi1d<LatticeColorMatrix>,
23  multi1d<LatticeColorMatrix> > > reader(XMLReader& xml_in,
24  const std::string& path)
25  {
26  XMLReader top(xml_in, path);
27 
28  std::string fermbc;
29  std::string fermbc_path;
30  if (top.count("FermionBC") != 0)
31  {
32  fermbc_path = "FermionBC";
33  read(top, fermbc_path + "/FermBC", fermbc);
34  }
35  else if (top.count("boundary") != 0)
36  {
37  fermbc_path = ".";
39  }
40  else
41  {
42  QDPIO::cerr << "Error: neither FermionBC group nor boundary found" << std::endl;
43  QDP_abort(1);
44  }
45 
46  Handle< FermBC<LatticeFermion,
47  multi1d<LatticeColorMatrix>,
48  multi1d<LatticeColorMatrix> > >
49  fbc(TheWilsonTypeFermBCFactory::Instance().createObject(fermbc,
50  top,
51  fermbc_path));
52 
53  return fbc;
54  }
55  }
56 
57 }
Base class for all fermion action boundary conditions.
Definition: fermbc.h:20
Class for counted reference semantics.
Definition: handle.h:33
static T & Instance()
Definition: singleton.h:432
Fermion Boundary Condition factories.
Fermionic boundary condition reader.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
Handle< FermBC< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > reader(XMLReader &xml_in, const std::string &path)
Helper function for the FermionAction readers.
const std::string name
Name to be used.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Simple fermionic BC.