Fixed bugs in swap algorithm for D3Q19, checked D3Q7 also which I think was right

This commit is contained in:
James McClure 2016-07-25 11:09:05 -04:00
parent f6a0d331be
commit 1cc1c82427
3 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ extern "C" void SwapD3Q19(char *ID, double *disteven, double *distodd, int Nx, i
//.......Back out the 3-D indices for node n..............
k = n/(Nx*Ny);
j = (n-Nx*Ny*k)/Nx;
i = n-Nx*Ny*k-Nz*j;
i = n-Nx*Ny*k-Nx*j;
if (ID[n] > 0){
//........................................................................

View File

@ -123,7 +123,7 @@ __global__ void dvc_SwapD3Q19(char *ID, double *disteven, double *distodd, int
//.......Back out the 3-D indices for node n..............
k = n/(Nx*Ny);
j = (n-Nx*Ny*k)/Nx;
i = n-Nx*Ny*k-Nz*j;
i = n-Nx*Ny*k-Nx*j;
//........................................................................
// Retrieve even distributions from the local node (swap convention)
// f0 = disteven[n]; // Does not particupate in streaming

View File

@ -112,7 +112,7 @@ __global__ void dvc_SwapD3Q7(char *ID, double *disteven, double *distodd, int N
//.......Back out the 3-D indices for node n..............
k = n/(Nx*Ny);
j = (n-Nx*Ny*k)/Nx;
i = n-Nx*Ny*k-Nz*j;
i = n-Nx*Ny*k-Nx*j;
//........................................................................
// Retrieve even distributions from the local node (swap convention)
// f0 = disteven[n]; // Does not particupate in streaming