1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-09 21:50:45 +01:00

added parity

This commit is contained in:
Felix Erben 2019-02-28 11:05:31 +00:00
parent 18b603c5ae
commit 6d9f377913

View File

@ -102,13 +102,16 @@ public:
}; };
/* /*
template<class FImpl> template<class FImpl>
void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,5> &mat, void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,6> &mat,
const FermionField *one, const FermionField *one,
const FermionField *two, const FermionField *two,
const FermionField *three, const FermionField *three,
const std::vector<ComplexField > &mom, const std::vector<ComplexField > &mom,
int parity,
int orthogdim) int orthogdim)
{ {
assert(parity == 1 || parity == -1);
typedef typename FImpl::SiteSpinor vobj; typedef typename FImpl::SiteSpinor vobj;
typedef typename vobj::scalar_object sobj; typedef typename vobj::scalar_object sobj;
@ -166,6 +169,7 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,5> &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);
for(int j=0;j<twoBlock;j++){ for(int j=0;j<twoBlock;j++){
@ -178,12 +182,12 @@ void A2Autils<FImpl>::NucleonFieldMom(Eigen::Tensor<ComplexD,5> &mat,
auto gv3 = Gamma(Gamma::Algebra::SigmaXZ) * v3; auto gv3 = Gamma(Gamma::Algebra::SigmaXZ) * v3;
SpinVector_v vv; SpinVector_v vv;
vv()()() = v1()()(0) * v2()()(1) * gv3()()(2) //Cross product vv()()() = pv1()()(0) * v2()()(1) * gv3()()(2) //Cross product
- v1()()(0) * v2()()(2) * gv3()()(1) - pv1()()(0) * v2()()(2) * gv3()()(1)
+ v1()()(1) * v2()()(2) * gv3()()(0) + pv1()()(1) * v2()()(2) * gv3()()(0)
- v1()()(1) * v2()()(0) * gv3()()(2) - pv1()()(1) * v2()()(0) * gv3()()(2)
+ v1()()(2) * v2()()(0) * gv3()()(1) + pv1()()(2) * v2()()(0) * gv3()()(1)
- v1()()(2) * v2()()(1) * gv3()()(0); - pv1()()(2) * v2()()(1) * gv3()()(0);
// After getting the sitewise product do the mom phase loop // After getting the sitewise product do the mom phase loop