diff --git a/lib/qcd/action/fermion/CayleyFermion5D.cc b/lib/qcd/action/fermion/CayleyFermion5D.cc index 8996a4dd..f69bbfe6 100644 --- a/lib/qcd/action/fermion/CayleyFermion5D.cc +++ b/lib/qcd/action/fermion/CayleyFermion5D.cc @@ -215,8 +215,14 @@ void CayleyFermion5D::MeooeDag5D (const FermionField &psi, FermionField std::vector diag =bs; std::vector upper=cs; std::vector lower=cs; - upper[Ls-1]=-mass*upper[Ls-1]; - lower[0] =-mass*lower[0]; + for(int i=0;i<(Ls-1);i++){ + diag[i] = conjugate(bs[i]); + upper[i] = conjugate(cs[i+1]); + lower[i+1] = conjugate(cs[i]); + } + diag[Ls-1]=conjugate(bs[Ls-1]); + upper[Ls-1]=-mass*conjugate(cs[0]); + lower[0] =-mass*conjugate(cs[Ls-1]); M5Ddag(psi,psi,Din,lower,diag,upper); }