From fa597895806065948bb4be4327c0adc7e8731a3e Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Sun, 1 May 2016 18:29:20 -0700 Subject: [PATCH 1/3] ConjugateGradient: cleaner output --- lib/algorithms/iterative/ConjugateGradient.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/algorithms/iterative/ConjugateGradient.h b/lib/algorithms/iterative/ConjugateGradient.h index 7cb2d64b..e0431a53 100644 --- a/lib/algorithms/iterative/ConjugateGradient.h +++ b/lib/algorithms/iterative/ConjugateGradient.h @@ -84,7 +84,7 @@ public: return; } - std::cout< Date: Sun, 1 May 2016 18:29:57 -0700 Subject: [PATCH 2/3] SliceSum: shutting down warning about non-threaded code for now --- lib/lattice/Lattice_reduction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lattice/Lattice_reduction.h b/lib/lattice/Lattice_reduction.h index 344e5da2..4599f2f9 100644 --- a/lib/lattice/Lattice_reduction.h +++ b/lib/lattice/Lattice_reduction.h @@ -152,7 +152,7 @@ template inline void sliceSum(const Lattice &Data,std::vector< assert(grid!=NULL); // FIXME - std::cout<SumArraySize()<<" threads "<SumArraySize()<<" threads "<_ndimension; const int Nsimd = grid->Nsimd(); From c698b16d75f6ddcee79067c6088b85f87361da1f Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Sun, 1 May 2016 18:30:35 -0700 Subject: [PATCH 3/3] function to generate Chroma-style gamma matrix products --- lib/qcd/spin/Dirac.cc | 25 +++++++++++++++++++++++++ lib/qcd/spin/Dirac.h | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/qcd/spin/Dirac.cc b/lib/qcd/spin/Dirac.cc index 51c06348..8279a4a7 100644 --- a/lib/qcd/spin/Dirac.cc +++ b/lib/qcd/spin/Dirac.cc @@ -60,6 +60,31 @@ namespace Grid { "-Gamma5 ", " " }; + + SpinMatrix makeGammaProd(const unsigned int i) + { + SpinMatrix g; + + g = 1.; + if (i & 0x1) + { + g = g*Gamma(Gamma::GammaMatrix::GammaX); + } + if (i & 0x2) + { + g = g*Gamma(Gamma::GammaMatrix::GammaY); + } + if (i & 0x4) + { + g = g*Gamma(Gamma::GammaMatrix::GammaZ); + } + if (i & 0x8) + { + g = g*Gamma(Gamma::GammaMatrix::GammaT); + } + + return g; + } // void sprojMul( vHalfSpinColourVector &out,vColourMatrix &u, vSpinColourVector &in){ // vHalfSpinColourVector hspin; diff --git a/lib/qcd/spin/Dirac.h b/lib/qcd/spin/Dirac.h index 8654b5a8..00bd519c 100644 --- a/lib/qcd/spin/Dirac.h +++ b/lib/qcd/spin/Dirac.h @@ -82,7 +82,10 @@ namespace QCD { GammaMatrix _g; }; - + + // Make gamma products (Chroma convention) + SpinMatrix makeGammaProd(const unsigned int i); + /* Gx * 0 0 0 i * 0 0 i 0