Sunday, April 1, 2012

CPU implementation of SPH

I finally got the CPU implementation run, but there are two main problems
first is that  the speed is too slow, there are 4k particles in this picture, and the FPS I guess is  below 1.0...I used several "for loop within for loop"  which I believe is the main reason for such a low speed. But, if I implement this on GPU, I believe the speed will be much faster. If i use OpenMP to deal with those loops, the speed should also be somehow faster..

Another thing need to be improved is that the movement of particles doesn't  look like fluid... Since SPH method require that the fluids must simulate at real-world, which means the value or units must be physically right. I think that I gave some parameters wrong values, which result in the strange behavior of particles...

2 comments:

  1. Focus on the GPU implementation, but if you also use OpenMP, it will be interesting to see the performance comparisons between naive CPU, OpenMP, and CUDA.

    ReplyDelete
    Replies
    1. I have worked out a GPU implementation, it's much faster than the CPU one. I will try it on OpenMP later.

      Delete