mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-27 22:25:56 +01:00
fixed contraction issue
This commit is contained in:
parent
acd5a01b65
commit
435653490e
@ -183,7 +183,8 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
|
|||||||
|
|
||||||
for(int j=0;j<twoBlock;j++){
|
for(int j=0;j<twoBlock;j++){
|
||||||
|
|
||||||
auto v2 = conjugate(two[j]._odata[ss]);
|
//auto v2 = conjugate(two[j]._odata[ss]);
|
||||||
|
auto v2 = two[j]._odata[ss];
|
||||||
// C = i gamma_2 gamma_4 => C gamma_5 = - i gamma_1 gamma_3
|
// C = i gamma_2 gamma_4 => C gamma_5 = - i gamma_1 gamma_3
|
||||||
//auto v2g = v2*Gamma(Gamma::Algebra::SigmaXZ);
|
//auto v2g = v2*Gamma(Gamma::Algebra::SigmaXZ);
|
||||||
//auto v2g=v2;
|
//auto v2g=v2;
|
||||||
@ -210,6 +211,13 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
|
|||||||
- pv1()(s1)(2) * v2()(s2)(1) * gv3()(s2)(0);
|
- pv1()(s1)(2) * v2()(s2)(1) * gv3()(s2)(0);
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
/*if (i+j+k == 0) {
|
||||||
|
Serializable::WriteMember(std::cout, pv1);
|
||||||
|
Serializable::WriteMember(std::cout, v2);
|
||||||
|
Serializable::WriteMember(std::cout, gv3);
|
||||||
|
Serializable::WriteMember(std::cout, vv);
|
||||||
|
}*/
|
||||||
|
|
||||||
// After getting the sitewise product do the mom phase loop
|
// After getting the sitewise product do the mom phase loop
|
||||||
int base = Nmom*i+Nmom*oneBlock*j+Nmom*oneBlock*twoBlock*k+Nmom*oneBlock*twoBlock*threeBlock*r;
|
int base = Nmom*i+Nmom*oneBlock*j+Nmom*oneBlock*twoBlock*k+Nmom*oneBlock*twoBlock*threeBlock*r;
|
||||||
for ( int m=0;m<Nmom;m++){
|
for ( int m=0;m<Nmom;m++){
|
||||||
|
@ -186,11 +186,8 @@ void TBaryon2pt<FImpl>::execute(void)
|
|||||||
Eigen::array<Eigen::IndexPair<int>, 3> product_dims = { Eigen::IndexPair<int>(0,epsilon[pairs[ipair]][0]),Eigen::IndexPair<int>(1,epsilon[pairs[ipair]][1]) ,Eigen::IndexPair<int>(2,epsilon[pairs[ipair]][2]) };
|
Eigen::array<Eigen::IndexPair<int>, 3> product_dims = { Eigen::IndexPair<int>(0,epsilon[pairs[ipair]][0]),Eigen::IndexPair<int>(1,epsilon[pairs[ipair]][1]) ,Eigen::IndexPair<int>(2,epsilon[pairs[ipair]][2]) };
|
||||||
for (int imom=0 ; imom < Nmom ; imom++){
|
for (int imom=0 ; imom < Nmom ; imom++){
|
||||||
std::cout << imom << std::endl;
|
std::cout << imom << std::endl;
|
||||||
Eigen::Tensor<Complex,6> B6L = BFieldL.BField.chip(imom,0);
|
Eigen::Tensor<Complex,5> B5L = BFieldL.BField.chip(imom,0);
|
||||||
Eigen::Tensor<Complex,6> B6R = BFieldR.BField.chip(imom,0);
|
Eigen::Tensor<Complex,5> B5R = BFieldR.BField.chip(imom,0);
|
||||||
for (int ig=0 ; ig < Ngamma ; ig++){
|
|
||||||
Eigen::Tensor<Complex,5> B5L = B6L.chip(ig,0);
|
|
||||||
Eigen::Tensor<Complex,5> B5R = B6R.chip(ig,0);
|
|
||||||
for (int t=0 ; t < Nt ; t++){
|
for (int t=0 ; t < Nt ; t++){
|
||||||
Eigen::Tensor<Complex,4> B4L = B5L.chip(t,0);
|
Eigen::Tensor<Complex,4> B4L = B5L.chip(t,0);
|
||||||
Eigen::Tensor<Complex,4> B4R = B5R.chip(tsrc,0);
|
Eigen::Tensor<Complex,4> B4R = B5R.chip(tsrc,0);
|
||||||
@ -203,7 +200,6 @@ void TBaryon2pt<FImpl>::execute(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
for (int t=0 ; t < Nt ; t++){
|
for (int t=0 ; t < Nt ; t++){
|
||||||
std::cout << "C2(t=" << t << ") = " << corr(0,t) << std::endl;
|
std::cout << "C2(t=" << t << ") = " << corr(0,t) << std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user