From a10006917db6c9dd83127ba1a59d23a9e3ca5fb1 Mon Sep 17 00:00:00 2001 From: James E McClure Date: Sat, 28 Nov 2015 19:39:01 -0500 Subject: [PATCH] Fixed bug in gpu/D3Q19.cu from re-initilizing distribution within solid (both CPU and GPU versions should now be OK) --- gpu/D3Q19.cu | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/gpu/D3Q19.cu b/gpu/D3Q19.cu index f240a416..866e141e 100644 --- a/gpu/D3Q19.cu +++ b/gpu/D3Q19.cu @@ -262,6 +262,11 @@ __global__ void dvc_ComputeVelocityD3Q19(char *ID, double *disteven, double *di id = ID[n]; if (id==0){ vel[n] = 0.0; vel[N+n] = 0.0; vel[2*N+n]=0.0; + for(int q=0; q<9; q++){ + disteven[q*N+n] = -1.0; + distodd[q*N+n] = -1.0; + } + disteven[9*N+n] = -1.0; } else{ //........................................................................ @@ -296,14 +301,6 @@ __global__ void dvc_ComputeVelocityD3Q19(char *ID, double *disteven, double *di vel[2*N+n] = vz; //........................................................................ } - else{ - for(int q=0; q<9; q++){ - disteven[q*N+n] = -1.0; - distodd[q*N+n] = -1.0; - } - disteven[9*N+n] = -1.0; - } - } } }