mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	MultiRHS coarse
This commit is contained in:
		@@ -244,8 +244,13 @@ int main (int argc, char ** argv)
 | 
			
		||||
 | 
			
		||||
  GridCartesian *CoarseMrhs = new GridCartesian(rhLatt,rhSimd,rhMpi); 
 | 
			
		||||
 | 
			
		||||
  MultiGeneralCoarsenedMatrix mrhs(LittleDiracOp,CoarseMrhs);
 | 
			
		||||
  
 | 
			
		||||
  MultiGeneralCoarsenedMatrix mrhs(LittleDiracOp,CoarseMrhs);
 | 
			
		||||
  typedef decltype(mrhs) MultiGeneralCoarsenedMatrix_t;
 | 
			
		||||
  
 | 
			
		||||
  //////////////////////////////////////////
 | 
			
		||||
  // Test against single RHS
 | 
			
		||||
  //////////////////////////////////////////
 | 
			
		||||
  {
 | 
			
		||||
    GridParallelRNG          rh_CRNG(CoarseMrhs);rh_CRNG.SeedFixedIntegers(cseeds);
 | 
			
		||||
    CoarseVector rh_phi(CoarseMrhs);
 | 
			
		||||
@@ -287,6 +292,21 @@ int main (int argc, char ** argv)
 | 
			
		||||
    std::cout << nrhs<< " srhs " << t1/ncall/nrhs <<" us"<<std::endl;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  //////////////////////////////////////////
 | 
			
		||||
  // Test against single RHS
 | 
			
		||||
  //////////////////////////////////////////
 | 
			
		||||
  {
 | 
			
		||||
    typedef HermitianLinearOperator<MultiGeneralCoarsenedMatrix_t,CoarseVector> HermMatrix;
 | 
			
		||||
    HermMatrix MrhsCoarseOp     (mrhs);
 | 
			
		||||
 | 
			
		||||
    GridParallelRNG          rh_CRNG(CoarseMrhs);rh_CRNG.SeedFixedIntegers(cseeds);
 | 
			
		||||
    ConjugateGradient<CoarseVector>  mrhsCG(1.0e-8,2000,true);
 | 
			
		||||
    CoarseVector rh_res(CoarseMrhs);
 | 
			
		||||
    CoarseVector rh_src(CoarseMrhs);
 | 
			
		||||
    random(rh_CRNG,rh_src);
 | 
			
		||||
    rh_res= Zero();
 | 
			
		||||
    mrhsCG(MrhsCoarseOp,rh_src,rh_res);
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  std::cout<<GridLogMessage<<std::endl;
 | 
			
		||||
  std::cout<<GridLogMessage<<std::endl;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user