mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	Subslicing
This commit is contained in:
		@@ -331,8 +331,8 @@ void InsertSlice(const Lattice<vobj> &lowDim,Lattice<vobj> & higherDim,int slice
 | 
				
			|||||||
  typedef typename vobj::scalar_object sobj;
 | 
					  typedef typename vobj::scalar_object sobj;
 | 
				
			||||||
  sobj s;
 | 
					  sobj s;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  GridBase *lg = lowdim._grid;
 | 
					  GridBase *lg = lowDim._grid;
 | 
				
			||||||
  GridBase *hg = higherdim._grid;
 | 
					  GridBase *hg = higherDim._grid;
 | 
				
			||||||
  int nl = lg->_ndimension;
 | 
					  int nl = lg->_ndimension;
 | 
				
			||||||
  int nh = hg->_ndimension;
 | 
					  int nh = hg->_ndimension;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -358,8 +358,8 @@ void InsertSlice(const Lattice<vobj> &lowDim,Lattice<vobj> & higherDim,int slice
 | 
				
			|||||||
    lg->LocalIndexToLocalCoor(idx,lcoor);
 | 
					    lg->LocalIndexToLocalCoor(idx,lcoor);
 | 
				
			||||||
    dl=0;
 | 
					    dl=0;
 | 
				
			||||||
    for(int d=0;d<nh;d++){
 | 
					    for(int d=0;d<nh;d++){
 | 
				
			||||||
      if ( d!orthog ) { 
 | 
					      if ( d!=orthog ) { 
 | 
				
			||||||
	hcoor[d]=lcoor[ld++];
 | 
						hcoor[d]=lcoor[dl++];
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    peekLocalSite(s,higherDim,hcoor);
 | 
					    peekLocalSite(s,higherDim,hcoor);
 | 
				
			||||||
@@ -368,13 +368,13 @@ void InsertSlice(const Lattice<vobj> &lowDim,Lattice<vobj> & higherDim,int slice
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template<class vobj>
 | 
					template<class vobj>
 | 
				
			||||||
void ExtractSlice(Lattice<vobj> &lowDim,const Lattice<vobj> & higherDim,int slice, int dir)
 | 
					void ExtractSlice(Lattice<vobj> &lowDim,const Lattice<vobj> & higherDim,int slice, int orthog)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  typedef typename vobj::scalar_object sobj;
 | 
					  typedef typename vobj::scalar_object sobj;
 | 
				
			||||||
  sobj s;
 | 
					  sobj s;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  GridBase *lg = lowdim._grid;
 | 
					  GridBase *lg = lowDim._grid;
 | 
				
			||||||
  GridBase *hg = higherdim._grid;
 | 
					  GridBase *hg = higherDim._grid;
 | 
				
			||||||
  int nl = lg->_ndimension;
 | 
					  int nl = lg->_ndimension;
 | 
				
			||||||
  int nh = hg->_ndimension;
 | 
					  int nh = hg->_ndimension;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -399,8 +399,8 @@ void ExtractSlice(Lattice<vobj> &lowDim,const Lattice<vobj> & higherDim,int slic
 | 
				
			|||||||
    lg->LocalIndexToLocalCoor(idx,lcoor);
 | 
					    lg->LocalIndexToLocalCoor(idx,lcoor);
 | 
				
			||||||
    dl=0;
 | 
					    dl=0;
 | 
				
			||||||
    for(int d=0;d<nh;d++){
 | 
					    for(int d=0;d<nh;d++){
 | 
				
			||||||
      if ( d!orthog ) { 
 | 
					      if ( d!=orthog ) { 
 | 
				
			||||||
	hcoor[d]=lcoor[ld++];
 | 
						hcoor[d]=lcoor[dl++];
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    peekLocalSite(s,lowDim,lcoor);
 | 
					    peekLocalSite(s,lowDim,lcoor);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user