Fixing index issue when trying to read full domain in lbpm_uCT_pp

This commit is contained in:
Mark Berrill
2016-06-16 14:03:39 -04:00
parent e494f34a66
commit 1eff3017d2
3 changed files with 19 additions and 7 deletions

View File

@@ -655,9 +655,9 @@ int main(int argc, char **argv)
}
{
RankInfoStruct info( rank, nprocx, nprocy, nprocz );
int x = dim[0]/2 + info.ix*nx;
int y = dim[1]/2 + info.jy*ny;
int z = dim[2]/2 + info.kz*nz;
int x = info.ix*nx;
int y = info.jy*ny;
int z = info.kz*nz;
// Read the local data
Array<short> VOLUME = netcdf::getVar<short>( fid, varname, {x,y,z}, {nx,ny,nz}, {1,1,1} );
// Copy the data and fill the halos