mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	Debugged Domain wall and Overlap feynman rules (infinite Ls, finite mass).
This commit is contained in:
		@@ -393,7 +393,7 @@ void WilsonFermion5D<Impl>::DW(const FermionField &in, FermionField &out,int dag
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
template<class Impl>
 | 
			
		||||
void WilsonFermion5D<Impl>::MomentumSpacePropagatorHt(FermionField &out,const FermionField &in) 
 | 
			
		||||
void WilsonFermion5D<Impl>::MomentumSpacePropagatorHt(FermionField &out,const FermionField &in, RealD mass) 
 | 
			
		||||
{
 | 
			
		||||
  // what type LatticeComplex 
 | 
			
		||||
  GridBase *_grid = _FourDimGrid;
 | 
			
		||||
@@ -414,18 +414,19 @@ void WilsonFermion5D<Impl>::MomentumSpacePropagatorHt(FermionField &out,const Fe
 | 
			
		||||
  std::vector<int> latt_size   = _grid->_fdimensions;
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
  FermionField   num  (_grid); num  = zero;
 | 
			
		||||
 | 
			
		||||
  LatComplex    sk(_grid);  sk = zero;
 | 
			
		||||
  LatComplex    sk2(_grid); sk2= zero;
 | 
			
		||||
 | 
			
		||||
  LatComplex    W(_grid); W= zero;
 | 
			
		||||
  LatComplex    a(_grid); a= zero;
 | 
			
		||||
    LatComplex    cosha(_grid); a= zero;
 | 
			
		||||
 | 
			
		||||
  LatComplex    one  (_grid); one = ScalComplex(1.0,0.0);
 | 
			
		||||
 | 
			
		||||
    FermionField   num  (_grid); num  = zero;
 | 
			
		||||
  LatComplex denom(_grid); denom= zero;
 | 
			
		||||
  LatComplex cosha(_grid); 
 | 
			
		||||
  LatComplex kmu(_grid); 
 | 
			
		||||
  LatComplex Wea(_grid); 
 | 
			
		||||
  LatComplex Wema(_grid); 
 | 
			
		||||
 | 
			
		||||
  ScalComplex ci(0.0,1.0);
 | 
			
		||||
  
 | 
			
		||||
  for(int mu=0;mu<Nd;mu++) {
 | 
			
		||||
@@ -437,48 +438,50 @@ void WilsonFermion5D<Impl>::MomentumSpacePropagatorHt(FermionField &out,const Fe
 | 
			
		||||
    kmu = TwoPiL * kmu;
 | 
			
		||||
    
 | 
			
		||||
    sk2 = sk2 + 2.0*sin(kmu*0.5)*sin(kmu*0.5);
 | 
			
		||||
      sk  = sk  + sin(kmu)*sin(kmu); 
 | 
			
		||||
    sk  = sk  +     sin(kmu)    *sin(kmu); 
 | 
			
		||||
    
 | 
			
		||||
    num = num - sin(kmu)*ci*(Gamma(Gmu[mu])*in);
 | 
			
		||||
    
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
    W = one - M5 - sk2;
 | 
			
		||||
  W = one - M5 + sk2;
 | 
			
		||||
 | 
			
		||||
  ////////////////////////////////////////////
 | 
			
		||||
  // Cosh alpha -> alpha
 | 
			
		||||
  ////////////////////////////////////////////
 | 
			
		||||
  cosha =  (one + W*W + sk) / (W*2.0);
 | 
			
		||||
 | 
			
		||||
  // FIXME Need a Lattice acosh
 | 
			
		||||
  for(int idx=0;idx<_grid->lSites();idx++){
 | 
			
		||||
    std::vector<int> lcoor(Nd);
 | 
			
		||||
    Tcomplex cc;
 | 
			
		||||
    RealD sgn;
 | 
			
		||||
      std::vector<int> lcoor(Nd);
 | 
			
		||||
    _grid->LocalIndexToLocalCoor(idx,lcoor);
 | 
			
		||||
    peekLocalSite(cc,cosha,lcoor);
 | 
			
		||||
      sgn= ::fabs(real(cc));
 | 
			
		||||
      cc = ScalComplex(::acosh(sgn),0.0);
 | 
			
		||||
    assert((double)real(cc)>=1.0);
 | 
			
		||||
    assert(fabs((double)imag(cc))<=1.0e-15);
 | 
			
		||||
    cc = ScalComplex(::acosh(real(cc)),0.0);
 | 
			
		||||
    pokeLocalSite(cc,a,lcoor);
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  std::cout << "Ht mom space num" << norm2(num)<<std::endl;// num ok
 | 
			
		||||
  std::cout << "Ht mom space W  " << norm2(W)<<std::endl;// w ok
 | 
			
		||||
  std::cout << "Ht mom space a  " << norm2(a)<<std::endl;// a ok
 | 
			
		||||
  denom= ( exp(a) ); 
 | 
			
		||||
  std::cout << "Ht mom space den" << norm2(denom)<<std::endl;
 | 
			
		||||
  denom= ( exp(a) * W  ); 
 | 
			
		||||
  std::cout << "Ht mom space den W" << norm2(denom)<<std::endl;
 | 
			
		||||
  denom= ( exp(a) * W - one ); 
 | 
			
		||||
  std::cout << "Ht mom space den W- 1" << norm2(denom)<<std::endl;
 | 
			
		||||
  denom=where(sk==ScalComplex(0,0),one,denom);
 | 
			
		||||
  std::cout << "Ht mom space den W- 1" << denom<<std::endl;
 | 
			
		||||
  std::cout << "Ht mom space one " << norm2(one)<<std::endl;
 | 
			
		||||
  denom= one/denom;
 | 
			
		||||
  std::cout << "Ht mom space div " << norm2(denom)<<std::endl;
 | 
			
		||||
  out = num*denom;
 | 
			
		||||
  std::cout << "Ht mom space out" << norm2(out)<<std::endl;
 | 
			
		||||
  Wea = ( exp( a) * W  ); 
 | 
			
		||||
  Wema= ( exp(-a) * W  ); 
 | 
			
		||||
  
 | 
			
		||||
  num   = num + ( one - Wema ) * mass * in;
 | 
			
		||||
  denom= ( Wea - one ) + mass*mass * (one - Wema); 
 | 
			
		||||
  out = num/denom;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
template<class Impl>
 | 
			
		||||
void WilsonFermion5D<Impl>::MomentumSpacePropagatorHw(FermionField &out,const FermionField &in) 
 | 
			
		||||
void WilsonFermion5D<Impl>::MomentumSpacePropagatorHw(FermionField &out,const FermionField &in,RealD mass) 
 | 
			
		||||
{
 | 
			
		||||
    // what type LatticeComplex 
 | 
			
		||||
    Gamma::GammaMatrix Gmu [] = {
 | 
			
		||||
      Gamma::GammaX,
 | 
			
		||||
      Gamma::GammaY,
 | 
			
		||||
      Gamma::GammaZ,
 | 
			
		||||
      Gamma::GammaT
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    GridBase *_grid = _FourDimGrid;
 | 
			
		||||
    conformable(_grid,out._grid);
 | 
			
		||||
 | 
			
		||||
@@ -487,16 +490,9 @@ void WilsonFermion5D<Impl>::MomentumSpacePropagatorHw(FermionField &out,const Fe
 | 
			
		||||
 | 
			
		||||
    typedef Lattice<iSinglet<vector_type> > LatComplex;
 | 
			
		||||
 | 
			
		||||
    Gamma::GammaMatrix Gmu [] = {
 | 
			
		||||
      Gamma::GammaX,
 | 
			
		||||
      Gamma::GammaY,
 | 
			
		||||
      Gamma::GammaZ,
 | 
			
		||||
      Gamma::GammaT
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    std::vector<int> latt_size   = _grid->_fdimensions;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    LatComplex    sk(_grid);  sk = zero;
 | 
			
		||||
    LatComplex    sk2(_grid); sk2= zero;
 | 
			
		||||
 | 
			
		||||
@@ -524,35 +520,17 @@ void WilsonFermion5D<Impl>::MomentumSpacePropagatorHw(FermionField &out,const Fe
 | 
			
		||||
      num = num - sin(kmu)*ci*(Gamma(Gmu[mu])*in);
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    num = num + mass * in ;
 | 
			
		||||
 | 
			
		||||
    b_k = sk2 - M5;
 | 
			
		||||
     
 | 
			
		||||
    w_k = sqrt(sk + b_k*b_k);
 | 
			
		||||
 | 
			
		||||
    std::cout << "Hw M5 " << M5<<std::endl;
 | 
			
		||||
    std::cout << "Hw mom space NUM" << norm2(num)<<std::endl;
 | 
			
		||||
    std::cout << "Hw mom space BK" << norm2(b_k)<<std::endl;
 | 
			
		||||
    std::cout << "Hw mom space BK" << b_k<<std::endl;
 | 
			
		||||
    std::cout << "Hw mom space WK" << norm2(w_k)<<std::endl;
 | 
			
		||||
    std::cout << "Hw mom space WK" << w_k<<std::endl;
 | 
			
		||||
 | 
			
		||||
    denom= ( w_k + b_k ) * (2.0 * M5);
 | 
			
		||||
    denom=where(sk==ScalComplex(0,0),one,denom);
 | 
			
		||||
 | 
			
		||||
    std::cout << "Hw mom space DEMON" << norm2(denom)<<std::endl;
 | 
			
		||||
 | 
			
		||||
    std::cout << "Hw mom space DEMON" << denom<<std::endl;
 | 
			
		||||
    
 | 
			
		||||
    std::cout << "Hw mom space one" << norm2(one)<<std::endl;
 | 
			
		||||
    denom= ( w_k + b_k + mass*mass) ;
 | 
			
		||||
 | 
			
		||||
    denom= one/denom;
 | 
			
		||||
 | 
			
		||||
    std::cout << "Hw mom space div " << norm2(denom)<<std::endl;
 | 
			
		||||
 | 
			
		||||
    std::cout << "denom " << denom<<std::endl;
 | 
			
		||||
 | 
			
		||||
    out = num*denom;
 | 
			
		||||
    std::cout << "Hw mom space OUT" << norm2(out)<<std::endl;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user