pranavsureshpn / gpusphsim

Automatically exported from code.google.com/p/gpusphsim
0 stars 0 forks source link

27 vs 8 neighbor search #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Oystein, 

I have a question, but could not find your email address. 

Why is it that you opted to use a 27 neighbor search (cell size = particle 
radius), instead of a 8 neighbor search (cell size = particle diameter)? 
Wouldn't the sorting have been 3x faster? 

Thanks,   Gordon.

Original issue reported on code.google.com by gordon.e...@gmail.com on 26 Aug 2010 at 7:29

GoogleCodeExporter commented 8 years ago
Hi Gordon:)
If I remember correctly I actually tried this but found that it was not worth 
it. 
The sorting step is actually fairly low cost compared to the large cost 
incurred by the SPH calculations (due to the amount of imperfectly coalesced 
memory reads in the neighborhood particle lookup).
Using a grid with larger cells would mean that more of the particles outside 
the smoothing length would have to be checked (and discarded),,
Now that a new and even better radix sort exists 
(http://code.google.com/p/back40computing/) this should be even more true.

Original comment by oystein....@gmail.com on 3 Sep 2010 at 8:18

GoogleCodeExporter commented 8 years ago
Following as a logical conclusion to this it would be interesting to see if the 
new sorting could would make it advantages to use an even finer grid..

Original comment by oystein....@gmail.com on 7 Sep 2010 at 9:49