Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed buggy particle coupling for GPU LB.

  • Loading branch information...
commit 03b428de453652033f25a3e9ba791cd4f6c59dbb 1 parent 7066272
@kessel kessel authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/lbgpu.cu
View
4 src/lbgpu.cu
@@ -665,8 +665,8 @@ __device__ void calc_viscous_force(LB_nodes_gpu n_a, float *delta, LB_particle_g
/** see ahlrichs + duenweg page 8227 equ (10) and (11) */
#pragma unroll
for(int i=0; i<3; ++i){
- float scaledpos = particle_data[part_index].p[i]/para.agrid;
- my_left[i] = (int)(floorf(scaledpos - 0.5f));
+ float scaledpos = particle_data[part_index].p[i]/para.agrid - 0.5f;
+ my_left[i] = (int)(floorf(scaledpos));
//printf("scaledpos %f \t myleft: %d \n", scaledpos, my_left[i]);
temp_delta[3+i] = scaledpos - my_left[i];
temp_delta[i] = 1.f - temp_delta[3+i];
Please sign in to comment.
Something went wrong with that request. Please try again.