Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed buggy particle coupling for GPU LB.

  • Loading branch information...
commit 03b428de453652033f25a3e9ba791cd4f6c59dbb 1 parent 7066272
kessel authored July 02, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  src/lbgpu.cu
4  src/lbgpu.cu
@@ -665,8 +665,8 @@ __device__ void calc_viscous_force(LB_nodes_gpu n_a, float *delta, LB_particle_g
665 665
   /** see ahlrichs + duenweg page 8227 equ (10) and (11) */
666 666
   #pragma unroll
667 667
   for(int i=0; i<3; ++i){
668  
-    float scaledpos = particle_data[part_index].p[i]/para.agrid;
669  
-    my_left[i] = (int)(floorf(scaledpos - 0.5f));
  668
+    float scaledpos = particle_data[part_index].p[i]/para.agrid - 0.5f;
  669
+    my_left[i] = (int)(floorf(scaledpos));
670 670
     //printf("scaledpos %f \t myleft: %d \n", scaledpos, my_left[i]);
671 671
     temp_delta[3+i] = scaledpos - my_left[i];
672 672
     temp_delta[i] = 1.f - temp_delta[3+i];

0 notes on commit 03b428d

Please sign in to comment.
Something went wrong with that request. Please try again.