1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

continued on baryons

This commit is contained in:
Felix Erben 2019-07-02 17:55:28 +01:00
parent ae3abbe53d
commit 2c1a077369
2 changed files with 9 additions and 8 deletions

View File

@ -131,15 +131,15 @@ void TBaryon2pt<FImpl>::execute(void)
const std::string &output{par().output}; const std::string &output{par().output};
int Nmom=1; int Nmom=1;
int Nt=64; int Nt=32;
int Nc=3; //Num colours int Nc=3; //Num colours
std::vector<std::vector<int>> epsilon = {{0,1,2},{1,2,0},{2,0,1},{0,2,1},{2,1,0},{1,0,2}}; std::vector<std::vector<int>> epsilon = {{0,1,2},{1,2,0},{2,0,1},{0,2,1},{2,1,0},{1,0,2}};
std::vector<int> epsilon_sgn = {1,1,1,-1,-1,-1}; std::vector<int> epsilon_sgn = {1,1,1,-1,-1,-1};
int Ngamma=3; int Ngamma=3;
int N_1=20; int N_1=12;
int N_2=20; int N_2=12;
int N_3=20; int N_3=12;
// using BaryonTensorSet = Eigen::Tensor<Complex, 7>; // using BaryonTensorSet = Eigen::Tensor<Complex, 7>;
@ -192,8 +192,8 @@ void TBaryon2pt<FImpl>::execute(void)
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);
for (int is=0 ; is < 4 ; is++){ for (int is=0 ; is < 4 ; is++){
Eigen::Tensor<Complex,3> B3L = B4L.chip(is,0); Eigen::Tensor<Complex,3> B3L = B4L.chip(is,3);
Eigen::Tensor<Complex,3> B3R = B4R.chip(is,0); Eigen::Tensor<Complex,3> B3R = B4R.chip(is,3);
Eigen::Tensor<Complex,0> C2 = B3L.contract(B3R,product_dims); Eigen::Tensor<Complex,0> C2 = B3L.contract(B3R,product_dims);
corr(imom,t) += static_cast<Real>(epsilon_sgn[pairs[ipair]])*C2(0); corr(imom,t) += static_cast<Real>(epsilon_sgn[pairs[ipair]])*C2(0);
} }
@ -204,13 +204,14 @@ void TBaryon2pt<FImpl>::execute(void)
std::cout << "C2(t=" << t << ") = " << corr(0,t) << std::endl; std::cout << "C2(t=" << t << ") = " << corr(0,t) << std::endl;
} }
C2IO C2_save; /* C2IO C2_save;
C2_save.C2 = corr; C2_save.C2 = corr;
std::string filename ="./" + output + ".h5"; std::string filename ="./" + output + ".h5";
std::cout << "Writing to file " << filename << std::endl; std::cout << "Writing to file " << filename << std::endl;
Hdf5Writer writer(filename); Hdf5Writer writer(filename);
write(writer,"C2",C2_save.C2); write(writer,"C2",C2_save.C2);
*/
} }
END_MODULE_NAMESPACE END_MODULE_NAMESPACE