modify gpu/D3Q7.cu

This commit is contained in:
James E McClure 2015-06-30 19:02:53 -04:00
parent db1f96cdf1
commit 7c972ec79c

View File

@ -128,7 +128,7 @@ __global__ void dvc_SwapD3Q7(char *ID, double *disteven, double *distodd, int N
if (!(i+1<Nx)) nn -= Nx; // periodic BC along the x-boundary
//if (i+1<Nx){
f2 = disteven[N+nn]; // pull neighbor for distribution 2
if (!(f2 < 0.0)){
if (f2 > 0.0){
distodd[n] = f2;
disteven[N+nn] = f1;
}
@ -138,7 +138,7 @@ __global__ void dvc_SwapD3Q7(char *ID, double *disteven, double *distodd, int N
if (!(j+1<Ny)) nn -= Nx*Ny; // Perioidic BC along the y-boundary
//if (j+1<Ny){
f4 = disteven[2*N+nn]; // pull neighbor for distribution 4
if (!(f4 < 0.0)){
if (f4 > 0.0){
distodd[N+n] = f4;
disteven[2*N+nn] = f3;
// }
@ -148,7 +148,7 @@ __global__ void dvc_SwapD3Q7(char *ID, double *disteven, double *distodd, int N
if (!(k+1<Nz)) nn -= Nx*Ny*Nz; // Perioidic BC along the z-boundary
//if (k+1<Nz){
f6 = disteven[3*N+nn]; // pull neighbor for distribution 6
if (!(f6 < 0.0)){
if (f6 > 0.0){
distodd[2*N+n] = f6;
disteven[3*N+nn] = f5;
// }