tAdded break when contact is found in contact list - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
 (HTM) git clone git://src.adamsgaard.dk/sphere
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit c398f9510e7217e16bea1edabeaa5f2cea4cb22d
 (DIR) parent 4d12eb6ddfdb27fcdd047f02ebfb0d7f8de02d9d
 (HTM) Author: Anders Damsgaard <adc@geo.au.dk>
       Date:   Wed, 10 Oct 2012 11:37:13 +0200
       
       Added break when contact is found in contact list
       
       Diffstat:
         M src/contactsearch.cuh               |       6 ++++--
       
       1 file changed, 4 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/src/contactsearch.cuh b/src/contactsearch.cuh
       t@@ -259,10 +259,12 @@ __device__ void findContactsInCell(int3 targetCell,
                  for (int i=0; i<devC_nc; ++i) {
                    __syncthreads();
                    cidx = dev_contacts[(unsigned int)(idx_a_orig*devC_nc+i)];
       -            if (cidx == idx_b_orig) // Write to position of same contact
       -              cpos = i;
                    if (cidx == devC_np) // Write to position of now-deleted contact
                      cpos = i;
       +            else if (cidx == idx_b_orig) { // Write to position of same contact
       +              cpos = i;
       +              break;
       +            }
                  }
        
                  __syncthreads();