From c1341b8ed234eeb651757c6112f57aee3e22e92a Mon Sep 17 00:00:00 2001 From: ferben Date: Fri, 8 Feb 2019 14:33:06 +0000 Subject: [PATCH 1/3] bugfix --- Hadrons/Modules/MDistil/BContraction.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Hadrons/Modules/MDistil/BContraction.hpp b/Hadrons/Modules/MDistil/BContraction.hpp index 9a017ebd..c0843273 100644 --- a/Hadrons/Modules/MDistil/BContraction.hpp +++ b/Hadrons/Modules/MDistil/BContraction.hpp @@ -151,7 +151,7 @@ void TBContraction::execute(void) Gamma::Algebra::SigmaYT, // C = i gamma_2 gamma_4 Gamma::Algebra::GammaYGamma5, // i gamma_4 C gamma_5 = i gamma_2 gamma_5 }; - //std::vector factor23 = {(0.,-1.),(0.,1.),(0.,1.)}; + std::vector factor23 = {(0.,-1.),(0.,1.),(0.,1.)}; for (int i1=0 ; i1 < N_1 ; i1++){ for (int i2=0 ; i2 < N_2 ; i2++){ @@ -160,6 +160,8 @@ void TBContraction::execute(void) for (int t=0 ; t < Nt ; t++){ Bindex = i1 + N_1*(i2 + N_2*(i3 + N_3*(imom+Nmom*t))); ExtractSliceLocal(tmp1,one[i1],0,t,3); + ExtractSliceLocal(tmp2,two[i2],0,t,3); + ExtractSliceLocal(tmp3,three[i3],0,t,3); parallel_for (unsigned int sU = 0; sU < grid3d->oSites(); ++sU) { for (int ie=0 ; ie < 6 ; ie++){ @@ -186,7 +188,6 @@ void TBContraction::execute(void) g_diquark()(isl,isr)() = tmp111()(isl)(); } } - // Really only the trace? Should check baryons again! laph paper lists c_{alpha,beta,gamma}, gattringer-lang two gamma matrices. for (int is=0 ; is < 4 ; is++){ BField[Bindex]+=(double)epsilon_sgn[ie]*tmp11s()(is)()*g_diquark()(is,is)(); } From d26a5dce12de0cfcdccda02e938aad2bfbbb2562 Mon Sep 17 00:00:00 2001 From: ferben Date: Fri, 8 Feb 2019 14:37:09 +0000 Subject: [PATCH 2/3] bugfix --- Hadrons/Modules/MDistil/BContraction.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Hadrons/Modules/MDistil/BContraction.hpp b/Hadrons/Modules/MDistil/BContraction.hpp index 7fc5fc7c..b1d1f3dd 100644 --- a/Hadrons/Modules/MDistil/BContraction.hpp +++ b/Hadrons/Modules/MDistil/BContraction.hpp @@ -215,6 +215,8 @@ void TBContraction::execute(void) for (int t=0 ; t < Nt ; t++){ Bindex = i1 + N_1*(i2 + N_2*(i3 + N_3*(imom+Nmom*t))); ExtractSliceLocal(tmp1,one[i1],0,t,3); + ExtractSliceLocal(tmp2,two[i2],0,t,3); + ExtractSliceLocal(tmp3,three[i3],0,t,3); parallel_for (unsigned int sU = 0; sU < grid3d->oSites(); ++sU) { for (int ie=0 ; ie < 6 ; ie++){ From c4d27ee30f860549ea102f8c59d1a593a61a6fcf Mon Sep 17 00:00:00 2001 From: ferben Date: Fri, 8 Feb 2019 15:49:52 +0000 Subject: [PATCH 3/3] added parity operator to baryon fields --- Hadrons/Modules/MDistil/BContraction.hpp | 12 +++++++++- tests/hadrons/Test_hadrons_distil.cc | 28 +++++++++++++++++++----- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/Hadrons/Modules/MDistil/BContraction.hpp b/Hadrons/Modules/MDistil/BContraction.hpp index b1d1f3dd..4401e8cd 100644 --- a/Hadrons/Modules/MDistil/BContraction.hpp +++ b/Hadrons/Modules/MDistil/BContraction.hpp @@ -26,6 +26,7 @@ public: std::string, two, std::string, three, std::string, output, + int, parity, std::vector, mom); }; @@ -104,6 +105,8 @@ void TBContraction::execute(void) int N_2 = two.size(); int N_3 = three.size(); + int parity = par().parity; + LOG(Message) << "Computing distillation baryon fields" << std::endl; LOG(Message) << "One: '" << par().one << "' Two: '" << par().two << "' Three: '" << par().three << "'" << std::endl; LOG(Message) << "Momenta:" << std::endl; @@ -138,9 +141,13 @@ void TBContraction::execute(void) SpinVector tmp222; SpinVector tmp111; + assert(parity == 1 || parity == -1); + 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}; + Gamma g4(Gamma::Algebra::GammaT); + gamma12_ = { Gamma::Algebra::Identity, // I Gamma::Algebra::Gamma5, // gamma_5 @@ -227,8 +234,11 @@ void TBContraction::execute(void) tmp33s()(is)() = tmp33[sU]()(is)(epsilon[ie][2]); } tmp333 = Gamma(gamma23_[0])*tmp33s; + tmp111 = Gamma(gamma12_[0])*tmp11s; + tmp222 = g4*tmp111; + tmp111 = 0.5*(double)parity*(tmp111 + tmp222); // P_\pm * ... diquark2 = factor23[0]*innerProduct(tmp22s,tmp333); - BField2[Bindex]+=(double)epsilon_sgn[ie]*tmp11s*diquark2; + BField2[Bindex]+=(double)epsilon_sgn[ie]*tmp111*diquark2; } } } diff --git a/tests/hadrons/Test_hadrons_distil.cc b/tests/hadrons/Test_hadrons_distil.cc index 1529eb15..b5b5503c 100644 --- a/tests/hadrons/Test_hadrons_distil.cc +++ b/tests/hadrons/Test_hadrons_distil.cc @@ -225,19 +225,36 @@ void test_MesonField(Application &application) application.createModule("DistilMesonField",A2AMesonFieldPar); } ///////////////////////////////////////////////////////////// -// BaryonFields +// BaryonFields - phiphiphi ///////////////////////////////////////////////////////////// -void test_BaryonField(Application &application) +void test_BaryonFieldPhi(Application &application) { // DistilVectors parameters MDistil::BContraction::Par BContractionPar; BContractionPar.one="DistilVecs_phi"; BContractionPar.two="DistilVecs_phi"; BContractionPar.three="DistilVecs_phi"; - BContractionPar.output="BaryonField"; + BContractionPar.output="BaryonFieldPhi"; + BContractionPar.parity=1; BContractionPar.mom={"0 0 0"}; - application.createModule("BaryonField",BContractionPar); + application.createModule("BaryonFieldPhi",BContractionPar); +} +///////////////////////////////////////////////////////////// +// BaryonFields - rhorhorho +///////////////////////////////////////////////////////////// + +void test_BaryonFieldRho(Application &application) +{ + // DistilVectors parameters + MDistil::BContraction::Par BContractionPar; + BContractionPar.one="DistilVecs_rho"; + BContractionPar.two="DistilVecs_rho"; + BContractionPar.three="DistilVecs_rho"; + BContractionPar.output="BaryonFieldRho"; + BContractionPar.parity=1; + BContractionPar.mom={"0 0 0"}; + application.createModule("BaryonFieldRho",BContractionPar); } bool bNumber( int &ri, const char * & pstr, bool bGobbleWhiteSpace = true ) @@ -565,7 +582,8 @@ int main(int argc, char *argv[]) test_LapEvec( application ); test_Perambulators( application ); test_DistilVectors( application ); - test_BaryonField( application ); + test_BaryonFieldPhi( application ); + test_BaryonFieldRho( application ); break; } LOG(Message) << "====== XML creation for test " << iTestNum << " complete ======" << std::endl;