CHROMA
mescomp_w.cc
Go to the documentation of this file.
1 // $Id: mescomp_w.cc,v 3.0 2006-04-03 04:59:00 edwards Exp $
2 /*! \file
3  * \brief Construct all components of a meson propagator
4  */
5 
6 #include "chromabase.h"
8 
9 namespace Chroma
10 {
11 
12  //! Convert generalized correlator object
13  void convertMescomp(multi1d<Complex>& mesprop_1d, const multiNd<Complex>& mesprop,
14  const int j_decay)
15  {
16  int length = Layout::lattSize()[j_decay]; // Temporal extent of lattice
17 
18  multi1d<int> ranks(5);
19 
20  mesprop_1d.resize(length*Ns*Ns*Ns*Ns);
21 
22  int cnt = 0;
23  for(ranks[0]=0; ranks[0] < Ns; ++ranks[0]) // sf_2
24  for(ranks[1]=0; ranks[1] < Ns; ++ranks[1]) // sf_1
25  for(ranks[2]=0; ranks[2] < Ns; ++ranks[2]) // si_2
26  for(ranks[3]=0; ranks[3] < Ns; ++ranks[3]) // si_1
27  for(ranks[4] = 0; ranks[4] < length; ++ranks[4])
28  {
29  mesprop_1d[cnt++] = mesprop[ranks];
30  }
31  }
32 
33 
34  //! Construct all components of a meson propagator
35  /*!
36  * \ingroup hadron
37  *
38  * This routine is specific to Wilson fermions!
39  *
40  * In all mesons the colour components are contracted leaving only the
41  * spin components.
42  *
43  * \param mesprop meson correlation function (in real space) ( Write )
44  * \param quark_propagator_1 quark propagator ( Read )
45  * \param quark_propagator_2 quark propagator ( Read )
46  * \param phases object holds list of momenta ( Read )
47  * \param t0 coordinates of source in decay direction ( Read )
48  */
49 
50  void mescomp(multiNd<Complex>& mesprop,
51  const LatticePropagator& quark_propagator_1,
52  const LatticePropagator& quark_propagator_2,
53  const SftMom& phases,
54  int t0)
55  {
56  START_CODE();
57 
58  // Length of lattice in decay direction
59  int length = phases.numSubsets();
60  int j_decay = phases.getDir();
61  int G5 = Ns*Ns-1;
62 
63  multi1d<DComplex> hsum;
64 
65  multi1d<int> ranks(5);
66  ranks = Ns;
67  ranks[4] = length;
68  mesprop.resize(ranks);
69 
70  LatticePropagator antiquark_1 = adj(Gamma(G5) * quark_propagator_1 * Gamma(G5));
71  LatticeComplex m_prop;
72 
73  for(ranks[0]=0; ranks[0] < Ns; ++ranks[0]) // sf_2
74  for(ranks[1]=0; ranks[1] < Ns; ++ranks[1]) // sf_1
75  for(ranks[2]=0; ranks[2] < Ns; ++ranks[2]) // si_2
76  for(ranks[3]=0; ranks[3] < Ns; ++ranks[3]) // si_1
77  {
78  // Contract over color indices with antisym tensors
79  m_prop =
80  traceColor(peekSpin(antiquark_1,
81  ranks[1],ranks[3]) // (sf_1,si_1)
82  * peekSpin(quark_propagator_2,
83  ranks[0],ranks[2])); // (sf_2,si_2)
84 
85  /* Project on zero momentum: Do a slice-wise sum. */
86  hsum = sumMulti(m_prop, phases.getSet());
87 
88  for(ranks[4] = 0; ranks[4] < length; ++ranks[4]) // t
89  {
90  int t_eff = (ranks[4] - t0 + length) % length;
91  mesprop[ranks] = hsum[t_eff];
92  }
93  }
94 
95  END_CODE();
96  }
97 
98 } // end namespace Chroma
Primary include file for CHROMA library code.
Fourier transform phase factor support.
Definition: sftmom.h:35
int numSubsets() const
Number of subsets - length in decay direction.
Definition: sftmom.h:63
int getDir() const
Decay direction.
Definition: sftmom.h:69
const Set & getSet() const
The set to be used in sumMulti.
Definition: sftmom.h:57
void mescomp(multiNd< Complex > &mesprop, const LatticePropagator &quark_propagator_1, const LatticePropagator &quark_propagator_2, const SftMom &phases, int t0)
Construct all components of a meson propagator.
Definition: mescomp_w.cc:50
Construct all components of a meson propagator.
int j_decay
Definition: meslate.cc:22
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int G5
Definition: pbg5p_w.cc:57
void convertMescomp(multi1d< Complex > &mesprop_1d, const multiNd< Complex > &mesprop, const int j_decay)
Convert generalized correlator object.
Definition: mescomp_w.cc:13
START_CODE()