Trying desperate stuff

This commit is contained in:
James E McClure
2015-06-26 18:52:18 -04:00
parent ee182c3259
commit 18222bea09
2 changed files with 7 additions and 6 deletions

View File

@@ -1084,6 +1084,7 @@ __global__ void dvc_ColorCollideOpt( char *ID, double *disteven, double *distod
}// check if n is in the solid
}
} // loop over n
}
@@ -1383,13 +1384,13 @@ __global__ void dvc_ComputePhi(char *ID, double *Phi, double *Den, int N)
//........Get 1-D index for this thread....................
n = S*blockIdx.x*blockDim.x + s*blockDim.x + threadIdx.x;
if (n<N){
id=ID[n];
if (id != 0){
// id=ID[n];
// if (id != 0){
// Get the density value (Streaming already performed)
Na = Den[n];
Nb = Den[N+n];
Phi[n] = (Na-Nb)/(Na+Nb);
}
// }
}
}
//...................................................................

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)){
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)){
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)){
if (!(f6 < 0.0)){
distodd[2*N+n] = f6;
disteven[3*N+nn] = f5;
// }