11 void transpose(multi2d<LatticeColorVector>& dist_rep,
12 const multi2d<LatticeColorVector>& prop_rep)
15 if (prop_rep.nrows() != Ns || prop_rep.ncols() != Ns)
17 QDPIO::cerr << __func__ <<
": invalid size of prop_rep\n";
21 dist_rep.resize(Ns,Ns);
24 for(
int sl = 0; sl < Ns; ++sl)
27 for(
int sr = 0; sr < Ns; ++sr)
29 dist_rep(sl,sr) = prop_rep(sr,sl);
46 multi2d<LatticeColorVector> tmp1_rep;
51 multi2d<LatticeColorVector> tmp2_rep;
60 const std::vector<MatrixSpinRep_t>& spin,
const multi2d<LatticeColorVector>& prop_rep)
63 if (prop_rep.nrows() != Ns || prop_rep.ncols() != Ns)
65 QDPIO::cerr << __func__ <<
": invalid size of prop_rep\n";
70 dist_rep.resize(Ns,Ns);
82 for(
int aks = 0; aks < spin.size(); ++aks)
84 int left = spin[aks].left;
85 int right = spin[aks].right;
86 ComplexD spin_weight(spin[aks].op);
90 for(
int sr = 0; sr < Ns; ++sr)
92 dist_rep(left,sr) += spin_weight * prop_rep(right,sr);
101 const multi2d<LatticeColorVector>& prop_rep,
const std::vector<MatrixSpinRep_t>& spin)
104 if (prop_rep.nrows() != Ns || prop_rep.ncols() != Ns)
106 QDPIO::cerr << __func__ <<
": invalid size of prop_rep\n";
111 dist_rep.resize(Ns,Ns);
123 for(
int bks = 0; bks < spin.size(); ++bks)
125 int left = spin[bks].left;
126 int right = spin[bks].right;
127 ComplexD spin_weight(spin[bks].op);
130 for(
int sl = 0; sl < Ns; ++sl)
132 dist_rep(sl,right) += prop_rep(sl,left) * spin_weight;
LatticePropagator gamma5Herm(const LatticePropagator &source_prop)
Return gamma_5*adj(source)*gamma_f.
Asqtad Staggered-Dirac operator.
void transpose(multi2d< LatticeColorVector > &dist_rep, const multi2d< LatticeColorVector > &prop_rep)
Take transpose of a matrix in (explicit) spin space.
std::vector< MatrixSpinRep_t > convertTwoQuarkSpinDP(int gamma)
Convert a DP gamma matrix indexed by gamma into a sparse spin representation.
void multiplyRep(multi2d< LatticeColorVector > &dist_rep, const std::vector< MatrixSpinRep_t > &spin, const multi2d< LatticeColorVector > &prop_rep)
Dist(t2) = SpinMatrix*Prop(t2)
Contraction operators for two quarks.