Skip to content

Commit

Permalink
fixed buggy particle coupling for GPU LB.
Browse files Browse the repository at this point in the history
  • Loading branch information
kessel committed Jul 2, 2012
1 parent 496d042 commit d62d647
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lbgpu.cu
Expand Up @@ -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];
Expand Down

0 comments on commit d62d647

Please sign in to comment.