CHROMA
no_spin_insertion.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief No spin insertion
4  */
5 
6 #ifndef __no_spin_insertion_h__
7 #define __no_spin_insertion_h__
8 
10 
11 namespace Chroma
12 {
13  //! Name and registration
14  /*! @ingroup hadron */
15  namespace NoSpinInsertionEnv
16  {
17  extern const std::string name;
18  bool registerAll();
19 
20 
21  //! Params for no spin insertion
22  /*! @ingroup hadron */
23  struct Params
24  {
25  Params() {}
26  Params(XMLReader& in, const std::string& path);
27  void writeXML(XMLWriter& in, const std::string& path) const;
28  };
29 
30 
31  //! No spin insertion
32  /*! @ingroup hadron
33  *
34  * No spin insertion object
35  */
36  template<typename T>
37  class SpinInsert : public SpinInsertion<T>
38  {
39  public:
40  //! Full constructor
41  SpinInsert(const Params& p) : params(p) {}
42 
43  //! Displace the quark
44  T operator()(const T& quark) const {return quark;}
45 
46  private:
47  //! Hide partial constructor
49 
50  private:
51  Params params; /*!< displacement params */
52  };
53 
54  } // end namespace
55 
56  //! Reader
57  /*! @ingroup hadron */
58  void read(XMLReader& xml, const std::string& path, NoSpinInsertionEnv::Params& param);
59 
60  //! Writer
61  /*! @ingroup hadron */
62  void write(XMLWriter& xml, const std::string& path, const NoSpinInsertionEnv::Params& param);
63 
64 } // end namespace Chroma
65 
66 #endif
T operator()(const T &quark) const
Displace the quark.
SpinInsert(const Params &p)
Full constructor.
SpinInsert()
Hide partial constructor.
Base class for spin insertion.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
const std::string name
Name to be used.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LinOpSysSolverMGProtoClover::T T
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Spin insertions.
Params for no spin insertion.
void writeXML(XMLWriter &in, const std::string &path) const
Parameters for running code.