Cleaning up D3Qy.cu/.cpp

This commit is contained in:
James E McClure 2015-06-30 15:16:41 -04:00
parent 08e14cc261
commit 34e45e715a

View File

@ -108,7 +108,7 @@ __global__ void dvc_SwapD3Q7(char *ID, double *disteven, double *distodd, int N
if (n<N ){ if (n<N ){
id = ID[n]; id = ID[n];
if (id != 0){ if (id > 0){
//.......Back out the 3-D indices for node n.............. //.......Back out the 3-D indices for node n..............
k = n/(Nx*Ny); k = n/(Nx*Ny);
j = (n-Nx*Ny*k)/Nx; j = (n-Nx*Ny*k)/Nx;
@ -173,7 +173,7 @@ __global__ void dvc_ComputeDensityD3Q7(char *ID, double *disteven, double *dist
n = S*blockIdx.x*blockDim.x + s*blockDim.x + threadIdx.x; n = S*blockIdx.x*blockDim.x + s*blockDim.x + threadIdx.x;
if (n<N){ if (n<N){
id = ID[n]; id = ID[n];
if ( id != 0 ){ if ( id > 0 ){
// Read the distributions // Read the distributions
f0 = disteven[n]; f0 = disteven[n];
f2 = disteven[N+n]; f2 = disteven[N+n];