Skip to content

OpenCL release

Latest
Compare
Choose a tag to compare
@BrettRyland BrettRyland released this 09 Aug 10:42
· 7 commits to master since this release

My integrator for the nonlinear wave equation using Lobatto IIIA-IIIB discretisation in space and leapfrog in time for various boundary and initial conditions.

This version builds on the Qt version by implementing the integrator in OpenCL using boost.compute and transferring the resulting values directly to the OpenGL widget. This allows for significantly improved performance to the point where a 1 million element simulation with 3 stages in x and y can run in real time on my NVIDIA GeForce GTX 960M.

One of the boundary conditions (i.e. simulation configurations) has been changed to show off this improved performance. An extra boundary condition ("Double slit") and initial condition ("Localised wave") have been added to demonstrate interference patterns occurring due to a double slit-like experiment.

Caveats:

  • Fullscreen toggling is not implemented.
  • Some of the integrator controls are not yet exposed to the GUI.
  • The control "Dissipation factor" currently does nothing. When implemented, this will break the multisymplectic nature of the integrator, but will allow the waves to dissipate energy and die out.
  • If running under Linux (I haven't tested this version on Linux yet) on an optimus system, remember to use optirun to use the graphics card that supports OpenGL 3.30.

Changes from v3.0:

  • Refactoring of OpenCL kernels into their own files to simplify maintenance.