mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	Prepare to store the action in refresh
This commit is contained in:
		@@ -97,21 +97,9 @@ public:
 | 
			
		||||
    tmp = Zero();
 | 
			
		||||
    ActionSolver(MdagMOp,Phi,tmp);  // (VdagV)^-1 Mdag eta = V^-1 Vdag^-1 Mdag eta
 | 
			
		||||
    NumOp.M(tmp,Phi);               // Vdag^-1 Mdag eta
 | 
			
		||||
#define FILTER
 | 
			
		||||
#ifdef FILTER
 | 
			
		||||
    Integer OrthogDir=0;
 | 
			
		||||
    Integer plane=0;
 | 
			
		||||
    if ( getenv("DIR") ) OrthogDir = atoi(getenv("DIR"));
 | 
			
		||||
    if ( getenv("COOR") ) plane = atoi(getenv("COOR"));
 | 
			
		||||
    std::cout << " *** PseudoFermion FILTER DIR " <<OrthogDir << " plane "<<plane<<std::endl;
 | 
			
		||||
    Lattice<iScalar<vInteger> >  coor(NumOp.FermionGrid());
 | 
			
		||||
    LatticeCoordinate(coor,OrthogDir);
 | 
			
		||||
    tmp = Zero();
 | 
			
		||||
    Phi = where(coor==plane,Phi,tmp);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    Phi=Phi*scale;
 | 
			
		||||
	
 | 
			
		||||
    std::cout << GridLogMessage<<" TwoFlavourRatio Expect action to be "<<norm2(eta)*scale*scale<<std::endl;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  //////////////////////////////////////////////////////
 | 
			
		||||
@@ -133,6 +121,7 @@ public:
 | 
			
		||||
    DenOp.M(X,Y);                  // Y=  Mdag^-1 Vdag phi
 | 
			
		||||
 | 
			
		||||
    RealD action = norm2(Y);
 | 
			
		||||
    std::cout << GridLogMessage<<" TwoFlavourRatio action is "<<action<<std::endl;
 | 
			
		||||
 | 
			
		||||
    return action;
 | 
			
		||||
  };
 | 
			
		||||
@@ -177,25 +166,6 @@ public:
 | 
			
		||||
    dSdU *= -1.0;
 | 
			
		||||
    //dSdU = - Ta(dSdU);
 | 
			
		||||
 | 
			
		||||
#ifdef FILTER
 | 
			
		||||
    std::cout <<" In force  "<<std::endl;
 | 
			
		||||
    force = dSdU;
 | 
			
		||||
    int mu=0;
 | 
			
		||||
    std::cout << " FORCE mu " <<mu<<" L2 "<< norm2(force)<< " Linf " << maxLocalNorm2(force)<<std::endl;
 | 
			
		||||
    int plane=0;
 | 
			
		||||
    if ( getenv("COOR") ) plane = atoi(getenv("COOR"));
 | 
			
		||||
    Lattice<iScalar<vInteger> >  coor(NumOp.GaugeGrid());
 | 
			
		||||
 | 
			
		||||
    LatticeCoordinate(coor,mu);
 | 
			
		||||
    int L = NumOp.GaugeGrid()->FullDimensions()[mu];
 | 
			
		||||
    for (Integer p=0;p<L;p++) {
 | 
			
		||||
      force = Zero();
 | 
			
		||||
      force = where(coor==p,dSdU,force);
 | 
			
		||||
      std::cout << " FORCE mu " <<mu<<" PF plane "<<plane<<" T= " <<p<<" L2 "<< norm2(force)<< " Linf " << maxLocalNorm2(force)<<std::endl;
 | 
			
		||||
    }
 | 
			
		||||
    exit(0);
 | 
			
		||||
#endif
 | 
			
		||||
    
 | 
			
		||||
  };
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user