mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	some cleanup, but hard-coded src in LapEvec unclear
This commit is contained in:
		@@ -198,7 +198,6 @@ void TDistilVectors<FImpl>::setup(void)
 | 
			
		||||
  
 | 
			
		||||
  
 | 
			
		||||
  envTmp(LatticeSpinColourVector, "tmp2",1,LatticeSpinColourVector(grid4d));
 | 
			
		||||
  //envTmp(LatticeColourVector, "tmp_nospin",1,LatticeColourVector(grid4d));
 | 
			
		||||
  envTmp(LatticeSpinColourVector, "tmp3d",1,LatticeSpinColourVector(grid3d));
 | 
			
		||||
  envTmp(LatticeColourVector, "tmp3d_nospin",1,LatticeColourVector(grid3d));
 | 
			
		||||
  envTmp(LatticeSpinColourVector, "sink_tslice",1,LatticeSpinColourVector(grid3d));
 | 
			
		||||
@@ -261,7 +260,6 @@ void TDistilVectors<FImpl>::execute(void)
 | 
			
		||||
                for (int ik = dk; ik < nvec; ik += LI){
 | 
			
		||||
                  for (int is = ds; is < Ns; is += SI){
 | 
			
		||||
                    ExtractSliceLocal(evec3d,epack.evec[ik],0,t_inv-Ntfirst,Tdir);
 | 
			
		||||
                    //tmp3d_nospin = evec3d * noise[inoise + nnoise*(t_inv + Nt*(ik+nvec*is))];
 | 
			
		||||
                    tmp3d_nospin = evec3d * noise(inoise, t_inv, ik, is);
 | 
			
		||||
                    tmp3d=0;
 | 
			
		||||
                    pokeSpin(tmp3d,tmp3d_nospin,is);
 | 
			
		||||
 
 | 
			
		||||
@@ -51,7 +51,7 @@ BEGIN_MODULE_NAMESPACE(MDistil)
 | 
			
		||||
struct StoutParameters: Serializable {
 | 
			
		||||
  GRID_SERIALIZABLE_CLASS_MEMBERS(StoutParameters,
 | 
			
		||||
                                  int, steps,
 | 
			
		||||
                                  double, rho) // TODO: change name of this to rho
 | 
			
		||||
                                  double, rho) 
 | 
			
		||||
  StoutParameters() = default;
 | 
			
		||||
  template <class ReaderClass> StoutParameters(Reader<ReaderClass>& Reader){read(Reader,"StoutSmearing",*this);}
 | 
			
		||||
};
 | 
			
		||||
@@ -243,7 +243,7 @@ void TLapEvec<GImpl>::execute(void)
 | 
			
		||||
    Chebyshev<LatticeColourVector> Cheb(ChebPar.alpha,ChebPar.beta,ChebPar.PolyOrder);
 | 
			
		||||
    
 | 
			
		||||
    // Construct source vector according to Test_dwf_compressed_lanczos.cc
 | 
			
		||||
    src = 11.0;
 | 
			
		||||
    src = 11.0;  //TODO: Why hard-coded 11?
 | 
			
		||||
    RealD nn = norm2(src);
 | 
			
		||||
    nn = Grid::sqrt(nn);
 | 
			
		||||
    src = src * (1.0/nn);
 | 
			
		||||
 
 | 
			
		||||
@@ -132,7 +132,7 @@ void TNoises<FImpl>::execute(void)
 | 
			
		||||
  if( UniqueIdentifier.length() == 0 ) {
 | 
			
		||||
    UniqueIdentifier = getName();
 | 
			
		||||
  }
 | 
			
		||||
  UniqueIdentifier.append( std::to_string( vm().getTrajectory() ) ); //maybe add more??
 | 
			
		||||
  UniqueIdentifier.append( std::to_string( vm().getTrajectory() ) ); 
 | 
			
		||||
  
 | 
			
		||||
  GridSerialRNG sRNG;
 | 
			
		||||
  sRNG.SeedUniqueString(UniqueIdentifier);
 | 
			
		||||
@@ -143,13 +143,11 @@ void TNoises<FImpl>::execute(void)
 | 
			
		||||
      for( int ivec = 0; ivec < nvec; ivec++ ) {
 | 
			
		||||
        for( int is = 0; is < Ns; is++ ) {
 | 
			
		||||
          if( exact_distillation )
 | 
			
		||||
            //noise[inoise + nnoise*(t + Nt*(ivec+nvec*is))] = 1.;
 | 
			
		||||
            noise(inoise, t, ivec, is) = 1.;
 | 
			
		||||
          else{
 | 
			
		||||
            random(sRNG,rn);
 | 
			
		||||
            // We could use a greater number of complex roots of unity
 | 
			
		||||
            // ... but this seems to work well
 | 
			
		||||
            //noise[inoise + nnoise*(t + Nt*(ivec+nvec*is))] = (rn > 0.5) ? -1 : 1;
 | 
			
		||||
            noise(inoise, t, ivec, is) = (rn > 0.5) ? -1 : 1;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -126,7 +126,6 @@ void TPerambFromSolve<FImpl>::setup(void)
 | 
			
		||||
  const int LI_reduced{ Hadrons::MDistil::DistilParameters::ParameterDefault( par().LI_reduced, LI, true) };
 | 
			
		||||
  grid4d = env().getGrid();
 | 
			
		||||
  grid3d = MakeLowerDimGrid(grid4d);
 | 
			
		||||
  //std::array<std::string,6> sIndexNames{"Nt", "nvec", "LI", "nnoise", "Nt_inv", "SI"};
 | 
			
		||||
  envCreate(PerambTensor, getName(), 1, PerambIndexNames,Nt,nvec_reduced,LI_reduced,nnoise,Nt_inv,SI);
 | 
			
		||||
  envCreate(NoiseTensor, getName() + "_noise", 1, nnoise, Nt, nvec, Ns );
 | 
			
		||||
  envTmp(LatticeColourVector, "result_3d",1,LatticeColourVector(grid3d));
 | 
			
		||||
@@ -173,7 +172,7 @@ void TPerambFromSolve<FImpl>::execute(void)
 | 
			
		||||
              for (int ivec = 0; ivec < nvec_reduced; ivec++) {
 | 
			
		||||
                ExtractSliceLocal(evec3d,epack.evec[ivec],0,t-Ntfirst,Tdir);
 | 
			
		||||
                pokeSpin(perambulator(t, ivec, dk, inoise,dt,ds),static_cast<Complex>(innerProduct(evec3d, result_3d)),is);
 | 
			
		||||
                std::cout <<  "perambulator(t, ivec, dk, inoise,dt,ds)(is) = (" << t << "," << ivec << "," << dk << "," << inoise << "," << dt << "," << ds << ")(" << is << ") = " <<  perambulator(t, ivec, dk, inoise,dt,ds)()(is)() << std::endl;
 | 
			
		||||
                LOG(Message) <<  "perambulator(t, ivec, dk, inoise,dt,ds)(is) = (" << t << "," << ivec << "," << dk << "," << inoise << "," << dt << "," << ds << ")(" << is << ") = " <<  perambulator(t, ivec, dk, inoise,dt,ds)()(is)() << std::endl;
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
@@ -188,7 +187,6 @@ void TPerambFromSolve<FImpl>::execute(void)
 | 
			
		||||
      sPerambName = getName();
 | 
			
		||||
    sPerambName.append( "." );
 | 
			
		||||
    sPerambName.append( std::to_string(vm().getTrajectory()));
 | 
			
		||||
    //perambulator.WriteBinary(sPerambName);
 | 
			
		||||
    perambulator.write(sPerambName.c_str());
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user