/SPHOpenCL3D

3D Smoothed Particle Hydrodynamics with OpenCL

Primary LanguageC++MIT LicenseMIT

SPHOpenCL3D

3D Smoothed Particle Hydrodynamics with OpenCL

Dependencies

  • OpenCL
  • OpenGL
  • SFML - Windowing and OpenGL context
  • libMC33++ - Marching Cubes
  • ehgl - OpenGL c++ wrapper

Result

YouTube: Dambreak Video

Build & Run

To start the simulation,

$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./sph

This will run the simulation and emit a vertices data file vertices.dat.

To render the simulation data,

$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./sph_render vertices.dat

Pressing 'Q' will play the simulation.