Cleaning up D3Qy.cu/.cpp
This commit is contained in:
parent
08e14cc261
commit
34e45e715a
@ -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];
|
||||||
|
Loading…
Reference in New Issue
Block a user