Cleaning up Color/D3Q7 .cu/.cpp

This commit is contained in:
James E McClure
2015-06-30 15:35:55 -04:00
parent 2822c8e2b3
commit ade1e8fb69
4 changed files with 11 additions and 12 deletions

View File

@@ -978,7 +978,7 @@ extern "C" void ColorCollideOpt( char *ID, double *disteven, double *distodd, do
// PERFORM RELAXATION PROCESS
//........................................................................
//..........Toelke, Fruediger et. al. 2006...............
if (C == 0.0) nx = ny = nz = 1.0;
if (C == 0.0) nx = ny = nz = 0.0;
m1 = m1 + rlx_setA*((19*(jx*jx+jy*jy+jz*jz)/rho - 11*rho) -alpha*C - m1);
m2 = m2 + rlx_setA*((3*rho - 5.5*(jx*jx+jy*jy+jz*jz)/rho)- m2);
m4 = m4 + rlx_setB*((-0.6666666666666666*jx)- m4);

View File

@@ -111,7 +111,7 @@ extern "C" void SwapD3Q7(char *ID, double *disteven, double *distodd, int Nx, in
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;
}
@@ -121,7 +121,7 @@ extern "C" void SwapD3Q7(char *ID, double *disteven, double *distodd, int Nx, in
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;
// }
@@ -131,7 +131,7 @@ extern "C" void SwapD3Q7(char *ID, double *disteven, double *distodd, int Nx, in
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;
// }