CHROMA
baryon_2pt_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Construct baryon 2pt correlators.
3  */
4 
6 #include "meas/hadron/hadron_2pt_factory_w.h"
7 
8 namespace Chroma
9 {
10 
11  //! Anonymous namespace
12  /*! @ingroup hadron */
13  namespace
14  {
15  //! Get fermion bc
16  multi1d<int>
17  barSeqSourceGetBC(const multi1d<ForwardProp_t>& forward_headers)
18  {
19  multi1d<int> bc = getFermActBoundary(forward_headers[0].prop_header.fermact);
20 
21  for(int loop=1; loop < forward_headers.size(); ++loop)
22  {
23  multi1d<int> bc_b = getFermActBoundary(forward_headers[loop].prop_header.fermact);
24 
25  // Bummer, I wish qdp++ had a multi1d.operator!=()
26  bool same = true;
27  for(int i=0; i < bc.size(); ++i)
28  {
29  if (bc_b[i] != bc[i])
30  same = false;
31  }
32 
33  if (! same)
34  {
35  QDPIO::cerr << __func__ << ": the bc in the forward props are not all equal"
36  << std::endl;
37  QDP_abort(1);
38  }
39  }
40 
41  return bc;
42  }
43 
44  }
45 
46 
47 
48  // Default versions
49  void
50  BaryonSeqSourceBase::setBC(const multi1d<ForwardProp_t>& forward_headers)
51  {
52  getBC() = barSeqSourceGetBC(forward_headers);
53  }
54 
55 } // end namespace Chroma
Construct baryon 2pt correlators.
virtual multi1d< int > & getBC()=0
Set bc.
virtual void setBC(const multi1d< ForwardProp_t > &forward_headers)
Convenience function to yank the boundary condition from the forward prop headers.
Definition: baryon_2pt_w.cc:50
multi1d< int > bc
ForwardProp_t prop_header
multi1d< ForwardProp_t > & forward_headers
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int i
Definition: pbg5p_w.cc:55
multi1d< int > getFermActBoundary(const GroupXML_t &fermact)
Given a fermion action in std::string form, return the boundary.
Definition: qprop_io.cc:61