CHROMA
simple_baryon_operator_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Construct simple baryon operators
4  */
5 
6 #ifndef __simple_baryon_operator_w_h__
7 #define __simple_baryon_operator_w_h__
8 
9 #include "handle.h"
12 #include "io/xml_group_reader.h"
13 
14 namespace Chroma
15 {
16 
17  //! Name and registration
18  /*! @ingroup hadron */
19  namespace SimpleBaryonOperatorEnv
20  {
21  extern const std::string name;
22  bool registerAll();
23 
24 
25  //! Simple baryon operator
26  /*! @ingroup hadron */
27  struct Params
28  {
29  Params();
30  Params(XMLReader& in, const std::string& path);
31  void writeXML(XMLWriter& in, const std::string& path) const;
32 
33  GroupXML_t source_quark_smearing; /*!< xml std::string holding smearing params */
34  GroupXML_t sink_quark_smearing; /*!< xml std::string holding smearing params */
35  GroupXML_t link_smearing; /*!< link smearing xml */
36  };
37 
38 
39  //! Nucleon with Cg5
40  /*! @ingroup hadron
41  *
42  * Create a simple nucleon
43  */
44  class BarNuclCg5 : public BaryonOperator<LatticeFermion>
45  {
46  public:
47  //! Full constructor
48  BarNuclCg5(const Params& p, const multi1d<LatticeColorMatrix>& u);
49 
50  //! Compute the operator
51  multi1d<LatticeComplex> operator()(const LatticeFermion& quark1,
52  const LatticeFermion& quark2,
53  const LatticeFermion& quark3,
54  enum PlusMinus isign) const;
55 
56  multi1d<LatticeComplex> operator()(const LatticeFermion& quark1,
57  const LatticeFermion& quark2,
58  const LatticeFermion& quark3,
59  int* qindices,
60  enum PlusMinus isign) const
61  {
62  QDPIO::cerr << "Not implemented yet\n";
63  QDP_abort(1);
64  multi1d<LatticeComplex> tmp; // Happy compilers
65  return tmp;
66  }
67  LatticeComplex operator()(const LatticeFermion& quark1,
68  const LatticeFermion& quark2,
69  const LatticeFermion& quark3,
70  int* qindices ) const
71  {
72  QDPIO::cerr << "Not implemented yet\n";
73  QDP_abort(1);
74  LatticeComplex tmp;
75  return tmp;
76  }
77 
78  //! Add this hack for the moment
79  LatticeComplex operator()(const LatticeFermion& quark1,
80  const LatticeFermion& quark2,
81  const LatticeFermion& quark3) const
82  {
83  QDPIO::cerr << "BarNuclCg5 operator not implemented at this moment\n";
84  QDP_abort(1);
85  LatticeComplex tmp;
86  return tmp;
87  }
88 
89  protected:
90  //! Manipulate the quark fields
91  void quarkManip(multi1d<LatticeFermion>& q,
92  const LatticeFermion& q1,
93  const LatticeFermion& q2,
94  const LatticeFermion& q3,
95  enum PlusMinus isign) const;
96 
97  private:
98  //! Hide partial constructor
100 
101  private:
102  Params params; /*!< parameters */
103  multi1d<LatticeColorMatrix> u_smr;
104 
107  };
108 
109  } // end namespace
110 
111 
112  //! Reader
113  /*! @ingroup hadron */
114  void read(XMLReader& xml, const std::string& path, SimpleBaryonOperatorEnv::Params& param);
115 
116  //! Writer
117  /*! @ingroup hadron */
118  void write(XMLWriter& xml, const std::string& path, const SimpleBaryonOperatorEnv::Params& param);
119 
120 } // end namespace Chroma
121 
122 
123 #endif
Construct baryon operator.
Construct baryon operators.
Class for counted reference semantics.
Definition: handle.h:33
multi1d< LatticeComplex > operator()(const LatticeFermion &quark1, const LatticeFermion &quark2, const LatticeFermion &quark3, int *qindices, enum PlusMinus isign) const
Handle< QuarkSmearing< LatticeFermion > > sinkQuarkSmearing
multi1d< LatticeComplex > operator()(const LatticeFermion &quark1, const LatticeFermion &quark2, const LatticeFermion &quark3, enum PlusMinus isign) const
Compute the operator.
void quarkManip(multi1d< LatticeFermion > &q, const LatticeFermion &q1, const LatticeFermion &q2, const LatticeFermion &q3, enum PlusMinus isign) const
Manipulate the quark fields.
LatticeComplex operator()(const LatticeFermion &quark1, const LatticeFermion &quark2, const LatticeFermion &quark3, int *qindices) const
LatticeComplex operator()(const LatticeFermion &quark1, const LatticeFermion &quark2, const LatticeFermion &quark3) const
Add this hack for the moment.
Handle< QuarkSmearing< LatticeFermion > > sourceQuarkSmearing
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.
Class for counted reference semantics.
Double q
Definition: mesq.cc:17
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Quark smearing.
Hold group xml and type id.
void writeXML(XMLWriter &in, const std::string &path) const
Read an XML group as a std::string.