mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-04 19:25:56 +01:00
some work on baryons
This commit is contained in:
parent
ec7d96ce3b
commit
acd5a01b65
@ -186,7 +186,7 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
|
||||
auto v2 = conjugate(two[j]._odata[ss]);
|
||||
// C = i gamma_2 gamma_4 => C gamma_5 = - i gamma_1 gamma_3
|
||||
//auto v2g = v2*Gamma(Gamma::Algebra::SigmaXZ);
|
||||
auto v2g=v2;
|
||||
//auto v2g=v2;
|
||||
|
||||
for(int k=0;k<threeBlock;k++){
|
||||
|
||||
@ -295,7 +295,7 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
|
||||
}
|
||||
}
|
||||
|
||||
grid->GlobalSumVector(&mat(0,0,0,0,0,0),Nmom*Nt*oneBlock*twoBlock*threeBlock);
|
||||
grid->GlobalSumVector(&mat(0,0,0,0,0,0),Nmom*Nt*oneBlock*twoBlock*threeBlock*4);
|
||||
}
|
||||
|
||||
|
||||
|
@ -250,7 +250,7 @@ const int Nt_inv{ full_tdil ? 1 : TI }
|
||||
|
||||
class BFieldIO: Serializable{
|
||||
public:
|
||||
using BaryonTensorSet = Eigen::Tensor<Complex, 7>;
|
||||
using BaryonTensorSet = Eigen::Tensor<ComplexD, 6>;
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(BFieldIO, BaryonTensorSet, BField );
|
||||
};
|
||||
|
||||
|
@ -158,6 +158,7 @@ void TBC2<FImpl>::execute(void)
|
||||
auto &one = envGet(std::vector<FermionField>, par().one);
|
||||
auto &two = envGet(std::vector<FermionField>, par().two);
|
||||
auto &three = envGet(std::vector<FermionField>, par().three);
|
||||
const std::string &output{par().output};
|
||||
|
||||
int N_1 = one.size();
|
||||
int N_2 = two.size();
|
||||
@ -172,8 +173,8 @@ void TBC2<FImpl>::execute(void)
|
||||
}
|
||||
|
||||
|
||||
int Nmom=1;
|
||||
int Nt=8;
|
||||
int Nmom = mom_.size();
|
||||
const int Nt{env().getDim(Tdir)};
|
||||
|
||||
int parity = 1;
|
||||
int orthogDim=3;
|
||||
@ -199,17 +200,29 @@ void TBC2<FImpl>::execute(void)
|
||||
}
|
||||
hasPhase_ = true;
|
||||
stopTimer("Momentum phases");
|
||||
}
|
||||
}
|
||||
envCache(std::vector<ComplexField>, momphName_, 1, mom_.size(), envGetGrid(ComplexField));
|
||||
|
||||
Eigen::Tensor<ComplexD, 6> m(Nmom,Nt,N_1,N_2,N_3,4);
|
||||
A2Autils<FImpl>::NucleonFieldMom(m, &one[0], &two[0], &three[0], ph, parity, orthogDim);
|
||||
//A2Autils<FImpl>::NucleonFieldMom(m, one, two, three, ph, parity, orthogDim);
|
||||
for (int is=0 ; is < 4 ; is++){
|
||||
for (int t=0 ; t < Nt ; t++){
|
||||
std::cout << "BaryonField(is=" << is << ",t=" << t << ") = " << m(0,t,is,0,0,0) << std::endl;
|
||||
std::cout << "BaryonField(is=" << is << ",t=" << t << ") = " << m(0,t,0,0,0,is) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
BFieldIO BField_save;
|
||||
BField_save.BField = m;
|
||||
|
||||
|
||||
GridCartesian * grid = env().getGrid();
|
||||
if(grid->IsBoss()) {
|
||||
std::string filename ="./" + output + ".h5";
|
||||
std::cout << "Writing to file " << filename << std::endl;
|
||||
Grid::Hdf5Writer writer(filename);
|
||||
write(writer,"BaryonField",BField_save.BField);
|
||||
}
|
||||
}
|
||||
|
||||
END_MODULE_NAMESPACE
|
||||
|
@ -144,7 +144,7 @@ void TBaryon2pt<FImpl>::execute(void)
|
||||
// using BaryonTensorSet = Eigen::Tensor<Complex, 7>;
|
||||
|
||||
BFieldIO BFieldL;
|
||||
BFieldL.BField.resize(Nmom,Ngamma,Nt,4,N_1,N_2,N_3);
|
||||
BFieldL.BField.resize(Nmom,Nt,N_1,N_2,N_3,4);
|
||||
|
||||
std::string filenameL ="./" + inputL + ".h5";
|
||||
std::cout << "Reading from file " << filenameL << std::endl;
|
||||
@ -152,7 +152,7 @@ void TBaryon2pt<FImpl>::execute(void)
|
||||
read(readerL,"BaryonField",BFieldL.BField);
|
||||
|
||||
BFieldIO BFieldR;
|
||||
BFieldR.BField.resize(Nmom,Ngamma,Nt,4,N_1,N_2,N_3);
|
||||
BFieldR.BField.resize(Nmom,Nt,N_1,N_2,N_3,4);
|
||||
|
||||
std::string filenameR ="./" + inputR + ".h5";
|
||||
std::cout << "Reading from file " << filenameR << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user