diff --git a/cpu/Color.cpp b/cpu/Color.cpp index 9e97b46a..ac628408 100644 --- a/cpu/Color.cpp +++ b/cpu/Color.cpp @@ -1416,31 +1416,7 @@ extern "C" void DensityStreamD3Q7(char *ID, double *Den, double *Copy, double *P } } } -/* -extern "C" void ComputePhi(char *ID, double *Phi, double *Copy, double *Den, int N, int S) -{ - int n; - double Na,Nb; - //................................................................... - // Update Phi - for (n=0; n 0 && n 0 && n 0 ){ // Get the density value (Streaming already performed) Na = Den[n]; Nb = Den[N+n]; diff --git a/gpu/Color.cu b/gpu/Color.cu index e219b42c..6ebb9b7c 100644 --- a/gpu/Color.cu +++ b/gpu/Color.cu @@ -7,7 +7,7 @@ __global__ void dvc_InitDenColor(char *ID, double *Den, double *Phi, double das { //int i,j,k; int n,N; - + char id; N = Nx*Ny*Nz; int S = N/NBLOCKS/NTHREADS + 1; @@ -15,18 +15,19 @@ __global__ void dvc_InitDenColor(char *ID, double *Den, double *Phi, double das //........Get 1-D index for this thread.................... n = S*blockIdx.x*blockDim.x + s*blockDim.x + threadIdx.x; if (n 0){ //.......Back out the 3-D indices for node n.............. k = n/(Nx*Ny); @@ -1388,7 +1389,7 @@ __global__ void dvc_ComputePhi(char *ID, double *Phi, double *Den, int N) n = S*blockIdx.x*blockDim.x + s*blockDim.x + threadIdx.x; if (n 0){ // Get the density value (Streaming already performed) Na = Den[n]; Nb = Den[N+n];