diff --git a/Grid/qcd/utils/BaryonUtils.h b/Grid/qcd/utils/BaryonUtils.h index 468c1f78..c658a220 100644 --- a/Grid/qcd/utils/BaryonUtils.h +++ b/Grid/qcd/utils/BaryonUtils.h @@ -165,24 +165,19 @@ LatticeSpinColourMatrix BaryonUtils::quarkContract13(const PropagatorFiel { GridBase *grid = q1._grid; - std::vector> epsilon = {{0,1,2},{1,2,0},{2,0,1},{0,2,1},{2,1,0},{1,0,2}}; std::vector epsilon_sgn = {1,1,1,-1,-1,-1}; std::vector wick_contraction = {0,0,0,0,0,0}; - LatticeSpinColourMatrix q_out=zero; + // TODO: Felix, made a few changes to fix this as there were compiler errors. Please validate! + LatticeSpinColourMatrix q_out(grid); + // q_out = zero; TODO: Don't think you need this, as you'll set each site explicitly anyway parallel_for(int ss=0;ssoSites();ss++){ - - typedef typename ComplexField::vector_object vobj; - - auto D1 = q1._odata[ss]; - auto D2 = q2._odata[ss]; - //auto D_out = q_out._odata[ss]; - //D_out=zero; - - SpinColourMatrix D_out=zero; - + const auto & D1 = q1._odata[ss]; + const auto & D2 = q2._odata[ss]; + auto & D_out = q_out._odata[ss]; + D_out=zero; for (int ie_src=0; ie_src < 6 ; ie_src++){ int a_src = epsilon[ie_src][0]; //a int b_src = epsilon[ie_src][1]; //b @@ -198,14 +193,8 @@ LatticeSpinColourMatrix BaryonUtils::quarkContract13(const PropagatorFiel }}} } } - - q_out._odata[ss]=D_out; - - } //end loop over lattice sites - + } return q_out; - } - }} diff --git a/Hadrons/Modules.hpp b/Hadrons/Modules.hpp index 889763ea..c8c6cd99 100644 --- a/Hadrons/Modules.hpp +++ b/Hadrons/Modules.hpp @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include diff --git a/Hadrons/Modules/MContraction/Baryon2.hpp b/Hadrons/Modules/MContraction/Baryon2.hpp index df928472..3004248b 100644 --- a/Hadrons/Modules/MContraction/Baryon2.hpp +++ b/Hadrons/Modules/MContraction/Baryon2.hpp @@ -182,7 +182,7 @@ void TBaryon2::execute(void) const Gamma GammaA{ Gamma::Algebra::Identity }; const Gamma GammaB{ al }; - LatticeSpinColourMatrix diquark; + LatticeSpinColourMatrix diquark( q1._grid ); // TODO: Felix, I added "q1._grid". I presume this is correct? diquark = BaryonUtils::quarkContract13(q2*GammaB,GammaB*q3); diff --git a/Hadrons/modules.inc b/Hadrons/modules.inc index a18afd53..1a88f14c 100644 --- a/Hadrons/modules.inc +++ b/Hadrons/modules.inc @@ -142,7 +142,6 @@ modules_hpp =\ Modules/MContraction/WeakEye3pt.hpp \ Modules/MContraction/WeakNonEye3pt.hpp \ Modules/MContraction/Baryon.hpp \ - Modules/MContraction/Baryon_old.hpp \ Modules/MContraction/Meson.hpp \ Modules/MContraction/A2ALoop.hpp \ Modules/MContraction/Gamma3pt.hpp \