Fixed bugs in swap algorithm for D3Q19, checked D3Q7 also which I think was right
This commit is contained in:
parent
f6a0d331be
commit
1cc1c82427
@ -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){
|
||||
//........................................................................
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user