1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 09:45:36 +00:00

Merge branch 'feature/distil' of github.com:mmphys/Grid into feature/distil

This commit is contained in:
Michael Marshall 2019-03-02 00:24:47 +00:00
commit 00c3c6fc54

View File

@ -134,9 +134,7 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
int twoBlock = mat.dimension(3); int twoBlock = mat.dimension(3);
int threeBlock = mat.dimension(4); int threeBlock = mat.dimension(4);
assert(0 && "Apologies, Felix, next line was causing compile failure"); GridBase *grid = one[0]._grid;
//GridBase *grid = wi[0]._grid;
GridBase *grid = nullptr;
const int nd = grid->_ndimension; const int nd = grid->_ndimension;
const int Nsimd = grid->Nsimd(); const int Nsimd = grid->Nsimd();
@ -180,7 +178,7 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
for(int i=0;i<oneBlock;i++){ for(int i=0;i<oneBlock;i++){
auto v1 = one[i]._odata[ss]; auto v1 = one[i]._odata[ss];
auto pv1 = 0.5*(double)parity*(v1 + Gamma(Gamma::Algebra::GammaT)*v1); auto pv1 = 0.5*(v1 + (double)parity*Gamma(Gamma::Algebra::GammaT)*v1);
for(int j=0;j<twoBlock;j++){ for(int j=0;j<twoBlock;j++){
@ -193,18 +191,18 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
auto gv3 = Gamma(Gamma::Algebra::SigmaXZ) * v3; auto gv3 = Gamma(Gamma::Algebra::SigmaXZ) * v3;
SpinVector_v vv; SpinVector_v vv;
vv()()() = pv1()()(0) * v2()()(1) * gv3()()(2) //Cross product for(int s1=0;s1<Ns;s1++){
- pv1()()(0) * v2()()(2) * gv3()()(1) for(int s2=0;s2<Ns;s2++){
+ pv1()()(1) * v2()()(2) * gv3()()(0) vv()(s1)() = pv1()(s1)(0) * v2()(s2)(1) * gv3()(s2)(2) //Cross product
- pv1()()(1) * v2()()(0) * gv3()()(2) - pv1()(s1)(0) * v2()(s2)(2) * gv3()(s2)(1)
+ pv1()()(2) * v2()()(0) * gv3()()(1) + pv1()(s1)(1) * v2()(s2)(2) * gv3()(s2)(0)
- pv1()()(2) * v2()()(1) * gv3()()(0); - pv1()(s1)(1) * v2()(s2)(0) * gv3()(s2)(2)
+ pv1()(s1)(2) * v2()(s2)(0) * gv3()(s2)(1)
- pv1()(s1)(2) * v2()(s2)(1) * gv3()(s2)(0);
}}
// After getting the sitewise product do the mom phase loop // After getting the sitewise product do the mom phase loop
assert(0 && "Apologies, Felix, next line was causing compile failure"); int base = Nmom*i+Nmom*oneBlock*j+Nmom*oneBlock*twoBlock*k+Nmom*oneBlock*twoBlock*threeBlock*r;
//int base = Nmom*i+Nmom*Lblock*j+Nmom*Lblock*Rblock*r;
int base = 0;
for ( int m=0;m<Nmom;m++){ for ( int m=0;m<Nmom;m++){
int idx = m+base; int idx = m+base;
auto phase = mom[m]._odata[ss]; auto phase = mom[m]._odata[ss];